diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-03-27 16:39:52 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-03-27 16:39:52 -0400 |
| commit | 373464d30d87bd8702fe27b920ed1406a0833ef3 (patch) | |
| tree | c357c0a4fdd8f3f6ea8eb812ddc853f263c6c550 /base/src/test/java/bjc/utils/funcutils/StringUtilsTest.java | |
| parent | e99f6c758c9e1ea5601e1076845912db5153e38c (diff) | |
Refactor test structure
Tests are now in a 'test' sub-package, so it is clear that they are
indeed test code, not just disjoint parts of the main code
Diffstat (limited to 'base/src/test/java/bjc/utils/funcutils/StringUtilsTest.java')
| -rw-r--r-- | base/src/test/java/bjc/utils/funcutils/StringUtilsTest.java | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/base/src/test/java/bjc/utils/funcutils/StringUtilsTest.java b/base/src/test/java/bjc/utils/funcutils/StringUtilsTest.java deleted file mode 100644 index 434912c..0000000 --- a/base/src/test/java/bjc/utils/funcutils/StringUtilsTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package bjc.utils.funcutils; - -import java.io.StringReader; - -import java.util.Scanner; - -import org.junit.Test; - -import static bjc.utils.funcutils.StringUtils.readLines; -import static bjc.utils.funcutils.TestUtils.assertIteratorEquals; - -/** - * Tests of stuff in StringUtils. - * - * @author Ben Culkin - */ -public class StringUtilsTest { - @SuppressWarnings("javadoc") - @Test - public void testReadLines() { - assertReadLines("", ""); - - assertReadLines("hallo there", "hallo there"); - - assertReadLines("hallo there\na second line", "hallo there", "a second line"); - - assertReadLines("hallo there \\\na continued line", "hallo there a continued line"); - - assertReadLines("hallo there\\\\\na second line", "hallo there\\", "a second line"); - - assertReadLines("a\n\nb", "a", "", "b"); - } - - private static void assertReadLines(String inp, String... outp) { - StringReader sr = new StringReader(inp); - Scanner scn = new Scanner(sr); - assertIteratorEquals(readLines(scn), outp); - } -} |
