diff --git a/src/test/java/io/usethesource/vallang/io/StandardTextReaderTest.java b/src/test/java/io/usethesource/vallang/io/StandardTextReaderTest.java deleted file mode 100644 index 90752bf63..000000000 --- a/src/test/java/io/usethesource/vallang/io/StandardTextReaderTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.usethesource.vallang.io; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import java.io.IOException; -import java.io.Reader; -import java.io.StringReader; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ArgumentsSource; -import io.usethesource.vallang.IString; -import io.usethesource.vallang.IValueFactory; -import io.usethesource.vallang.ValueProvider; -import io.usethesource.vallang.type.TypeFactory; -import io.usethesource.vallang.type.TypeStore; - -class StandardTextReaderTest { - private IString readString(IValueFactory valueFactory, TypeStore typeStore, String s) throws IOException { - Reader reader = new StringReader(s); - StandardTextReader textReader = new StandardTextReader(); - return (IString) textReader.read(valueFactory, typeStore, TypeFactory.getInstance().stringType(), reader); - - } - - @ParameterizedTest @ArgumentsSource(ValueProvider.class) - void escapeNormalCharacters(IValueFactory valueFactory, TypeStore typeStore) throws IOException { - IString s = readString(valueFactory, typeStore, "\"\\$\""); - assertEquals("$", s.getValue()); - } -} diff --git a/src/test/java/io/usethesource/vallang/issues/RegressionTests.java b/src/test/java/io/usethesource/vallang/issues/RegressionTests.java index 987447d2e..19ba0c6cf 100644 --- a/src/test/java/io/usethesource/vallang/issues/RegressionTests.java +++ b/src/test/java/io/usethesource/vallang/issues/RegressionTests.java @@ -5,6 +5,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.IOException; +import java.io.Reader; +import java.io.StringReader; import java.io.StringWriter; import org.junit.jupiter.params.ParameterizedTest; @@ -14,8 +16,10 @@ import io.usethesource.vallang.IConstructor; import io.usethesource.vallang.ISet; import io.usethesource.vallang.ISourceLocation; +import io.usethesource.vallang.IString; import io.usethesource.vallang.IValueFactory; import io.usethesource.vallang.ValueProvider; +import io.usethesource.vallang.io.StandardTextReader; import io.usethesource.vallang.io.StandardTextWriter; import io.usethesource.vallang.type.Type; import io.usethesource.vallang.type.TypeFactory; @@ -60,5 +64,18 @@ void keywordFieldsMakeConstructorsDifferent(IValueFactory vf, TypeFactory tf, Ty assertFalse(cons1.equals(cons2)); } - + + private IString readString(IValueFactory valueFactory, TypeStore typeStore, String s) throws IOException { + Reader reader = new StringReader(s); + StandardTextReader textReader = new StandardTextReader(); + return (IString) textReader.read(valueFactory, typeStore, TypeFactory.getInstance().stringType(), reader); + + } + + @ParameterizedTest @ArgumentsSource(ValueProvider.class) + void escapeNormalCharacters(IValueFactory valueFactory, TypeStore typeStore) throws IOException { + IString s = readString(valueFactory, typeStore, "\"\\$\""); + assertEquals("$", s.getValue()); + } + }