fixes revealed by cover

This commit is contained in:
alisdair sullivan 2010-05-24 14:59:20 -07:00
parent 89f26ed1c9
commit 3b3e33c6e3
22 changed files with 464 additions and 4 deletions

View file

@ -1 +1 @@
["foo","bar", "baz",true,false,null,{"key":"value"},[null,null,null,[]],"\n\r\\"]
["foo","bar", "baz",[true],[false],[null],true, false, null, 0.7, {"key":"value"},[{}, null,null,null,[]],"\n\r\\", [-1]]

View file

@ -1 +1 @@
[start_array, {string, "foo"}, {string, "bar"}, {string, "baz"}, {literal, true}, {literal, false}, {literal, null}, start_object, {key, "key"}, {string, "value"}, end_object, start_array, {literal, null}, {literal, null}, {literal, null}, start_array, end_array, end_array, {string, "\n\r\\"}, end_array].
[start_array, {string, "foo"}, {string, "bar"}, {string, "baz"}, start_array, {literal, true}, end_array, start_array, {literal, false}, end_array, start_array, {literal, null}, end_array, {literal, true}, {literal, false}, {literal, null}, {number, "0.7"}, start_object, {key, "key"}, {string, "value"}, end_object, start_array, start_object, end_object, {literal, null}, {literal, null}, {literal, null}, start_array, end_array, end_array, {string, "\n\r\\"}, start_array, {number, "-1"}, end_array, end_array].

View file

@ -1 +1 @@
[/*array open comment*/ "a string"/*string comment*/, 1/*number comment*/, {/*object open comment*/"key"/*post key comment*/:/*colon comment*/[]/*object close comment*/}, true/*literal comment*/]
/*preceding comment*/ [/*array open comment*/ "a string"/*string comment*/, 1/*number comment*/, {/*object open comment*/"key"/*post key comment*/:/*colon comment*/[], /*pre key comment*/"another key": 0/*object close comment*/}, true/*literal comment*/] /*concluding comment*/

View file

@ -1,2 +1,2 @@
[start_array, {string, "a string"}, {number, "1"}, start_object, {key, "key"}, start_array, end_array, end_object, {literal, true}, end_array].
[start_array, {string, "a string"}, {number, "1"}, start_object, {key, "key"}, start_array, end_array, {key, "another key"}, {number, "0"}, end_object, {literal, true}, end_array].
[{comments, true}].

View file

@ -0,0 +1 @@
42

View file

@ -0,0 +1,2 @@
[{number, "42"}].
[{naked_values, true}].

View file

@ -0,0 +1 @@
-42

View file

@ -0,0 +1,2 @@
[{number, "-42"}].
[{naked_values, true}].

View file

@ -0,0 +1 @@
-0.7

View file

@ -0,0 +1,2 @@
[{number, "-0.7"}].
[{naked_values, true}].

View file

@ -0,0 +1 @@
0.7

View file

@ -0,0 +1,2 @@
[{number, "0.7"}].
[{naked_values, true}].

1
test/cases/object.json Normal file
View file

@ -0,0 +1 @@
{"foo":"bar", "baz":true, "false":null,"object":{ "key" : "value" },"list":[null,null,null,[],"\n\r\\"]}

1
test/cases/object.test Normal file
View file

@ -0,0 +1 @@
[start_object, {key, "foo"}, {string, "bar"}, {key, "baz"}, {literal, true}, {key, "false"}, {literal, null}, {key, "object"}, start_object, {key, "key"}, {string, "value"}, end_object, {key, "list"}, start_array, {literal, null}, {literal, null}, {literal, null}, start_array, end_array, {string, "\n\r\\"}, end_array, end_object].

View file

@ -0,0 +1 @@
[ "arabic letter alef: ", "\u0627" ]

View file

@ -0,0 +1,2 @@
[start_array, {string, "arabic letter alef: "}, {string, [16#0627]}, end_array].
[{escaped_unicode, codepoint}].

View file

@ -0,0 +1 @@
[ "arabic letter alef: ", "\u0627" ]

View file

@ -0,0 +1 @@
[start_array, {string, "arabic letter alef: "}, {string, "\\u0627"}, end_array].

View file

@ -0,0 +1,4 @@
[0.3]

View file

@ -0,0 +1 @@
[start_array, {number, "0.3"}, end_array].