Add unit tests for StringReader.isAllowedInUnquotedString

These tests were written by Diffblue Deeptest.
This commit is contained in:
diffblue-assistant 2018-10-16 15:12:49 +01:00
parent 7ee589b29b
commit 3818b71d8e

View file

@ -8,7 +8,9 @@ import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
public class StringReaderTest {
@ -527,4 +529,24 @@ public class StringReaderTest {
assertThat(ex.getCursor(), is(0));
}
}
@Test
public void isAllowedInUnquotedStringInput2OutputTrue() {
assertTrue(StringReader.isAllowedInUnquotedString('2'));
}
@Test
public void isAllowedInUnquotedStringInputNotNullOutputFalse() {
assertFalse(StringReader.isAllowedInUnquotedString('\u0000'));
}
@Test
public void isAllowedInUnquotedStringInputNotNullOutputFalse2() {
assertFalse(StringReader.isAllowedInUnquotedString(':'));
}
@Test
public void isAllowedInUnquotedStringInputrOutputTrue() {
assertTrue(StringReader.isAllowedInUnquotedString('r'));
}
}