diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-07-02 16:59:14 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-07-02 16:59:14 -0400 |
| commit | 5a1b096b47fbcca7e9cc6a24db558128f4cdd87f (patch) | |
| tree | 8e5046c58978e0fd62a2758889cf61defdd807b5 /src/test/java/bjc/everge/StringUtilsTest.java | |
| parent | 20000281fc88c188eb81d9d3d954119725a03ca6 (diff) | |
Convert to using ControlledString
All of the places that parse controls now use ControlledString instead
of doing their own stuff. -\(o-o)/-
Diffstat (limited to 'src/test/java/bjc/everge/StringUtilsTest.java')
| -rw-r--r-- | src/test/java/bjc/everge/StringUtilsTest.java | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/src/test/java/bjc/everge/StringUtilsTest.java b/src/test/java/bjc/everge/StringUtilsTest.java index b20e074..bba5e11 100644 --- a/src/test/java/bjc/everge/StringUtilsTest.java +++ b/src/test/java/bjc/everge/StringUtilsTest.java @@ -6,8 +6,15 @@ import java.util.List; import org.junit.Test; +import static bjc.everge.TestUtils.*; + import static org.junit.Assert.*; +/** + * Test for StringUtils. + * + * @author Ben Culkin + */ public class StringUtilsTest { @Test public void testNullSplit() { @@ -48,35 +55,4 @@ public class StringUtilsTest { assertSplitsTo("a/", "|", "/", "a"); } - private void assertSplitsTo(String inp, String esc, String splat, String... right) { - assertSplitsTo(false, inp, esc, splat, right); - } - - private void assertSplitsTo(boolean doLog, String inp, String esc, String splat, String... right) { - try { - if (doLog) StringUtils.isDebug = true; - - String[] lst = StringUtils.escapeSplit(esc, splat, inp); - - if (doLog) { - System.err.printf("[TRACE] Returned "); - - for (String str : lst) { - System.err.printf("(%s) ", str); - } - - System.err.println(); - } - - assertArrayEquals(right, lst); - } catch (Exception ex) { - System.err.println("EXCEPTION"); - ex.printStackTrace(); - System.err.println(); - - assertTrue(false); - } finally { - if (doLog) StringUtils.isDebug = false; - } - } } |
