]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/json/reader/reader-tests.factor
use radix literals
[factor.git] / basis / json / reader / reader-tests.factor
index 390fce1f949e77a93e0ce6e5389f4bab6cb5a833..430be777bcb1e5757e70c5953f2d6540b53d1bbd 100644 (file)
@@ -1,5 +1,5 @@
 USING: assocs arrays json.reader kernel strings tools.test
-hashtables json ;
+hashtables json io.streams.string ;
 IN: json.reader.tests
 
 { f } [ "false" json> ] unit-test
@@ -31,7 +31,7 @@ IN: json.reader.tests
 ! unicode is allowed in json
 { "ß∂¬ƒ˚∆" } [ """  "ß∂¬ƒ˚∆""""  json> ] unit-test
 { 8 9 10 12 13 34 47 92 } >string 1array [ """ "\\b\\t\\n\\f\\r\\"\\/\\\\" """ json> ] unit-test
-{ HEX: abcd } >string 1array [ """ "\\uaBCd" """ json> ] unit-test
+{ 0xabcd } >string 1array [ """ "\\uaBCd" """ json> ] unit-test
 
 { H{ { "a" { } } { "b" 123 } } } [ "{\"a\":[],\"b\":123}" json> ] unit-test
 { { } } [ "[]" json> ] unit-test 
@@ -59,5 +59,8 @@ IN: json.reader.tests
 { 0 } [ "0      " json> ] unit-test
 { 0 } [ "   0   " json> ] unit-test
 
+{ V{ H{ { "a" "b" } } H{ { "c" "d" } } } }
+[ """{"a": "b"} {"c": "d"}""" [ read-jsons ] with-string-reader ] unit-test
+
 ! empty objects are allowed as values in objects
 { H{ { "foo" H{ } } } } [ "{ \"foo\" : {}}" json> ] unit-test