@@ -17,8 +17,8 @@ public void test_ascii_string() throws IOException {
1717 assertEquals ("hello" , iter .readString ());
1818 assertEquals ("world" , iter .readString ());
1919 iter = JsonIterator .parse ("'hello''world'" .replace ('\'' , '"' ));
20- assertEquals ("hello" , iter .readString ());
21- assertEquals ("world" , iter .readString ());
20+ assertEquals ("hello" , iter .readStringAsSlice (). toString ());
21+ assertEquals ("world" , iter .readStringAsSlice (). toString ());
2222 }
2323
2424 public void test_ascii_string_with_escape () throws IOException {
@@ -55,6 +55,9 @@ public void test_string_across_buffer() throws IOException {
5555 JsonIterator iter = JsonIterator .parse (new ByteArrayInputStream ("'hello''world'" .replace ('\'' , '"' ).getBytes ()), 2 );
5656 assertEquals ("hello" , iter .readString ());
5757 assertEquals ("world" , iter .readString ());
58+ iter = JsonIterator .parse (new ByteArrayInputStream ("'hello''world'" .replace ('\'' , '"' ).getBytes ()), 2 );
59+ assertEquals ("hello" , iter .readStringAsSlice ().toString ());
60+ assertEquals ("world" , iter .readStringAsSlice ().toString ());
5861 }
5962
6063 @ org .junit .experimental .categories .Category (StreamingCategory .class )
0 commit comments