Skip to content

Commit

Permalink
remove the errors_struct test entries
Browse files Browse the repository at this point in the history
I think they are of questionable usefulness and require a lot of
machinery that is not clearly going to be worth implementing in
other implementations, and which is also not necessarily going
to work for data-descent methods other than dicts and arrays.
  • Loading branch information
rjbs committed Jul 1, 2012
1 parent e29e60e commit 66b8f97
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 57 deletions.
6 changes: 2 additions & 4 deletions spec/schemata/multi/all-ii.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
[ [
{ "data": [ ], "check": [ "of", 0 ], "error": [ "value" ] }, { "data": [ ], "check": [ "of", 0 ], "error": [ "value" ] },
{ "data": [ ], "check": [ "of", 1 ], "error": [ "range" ] } { "data": [ ], "check": [ "of", 1 ], "error": [ "range" ] }
], ]
"errors_struct": "value,range"
} }
}, },
"str": { "str": {
Expand All @@ -30,8 +29,7 @@
[ [
{ "data": [ ], "check": [ "of", 0 ], "error": [ "type" ] }, { "data": [ ], "check": [ "of", 0 ], "error": [ "type" ] },
{ "data": [ ], "check": [ "of", 1 ], "error": [ "type" ] } { "data": [ ], "check": [ "of", 1 ], "error": [ "type" ] }
], ]
"errors_struct": "type,type"
} }
} }
} }
Expand Down
4 changes: 1 addition & 3 deletions spec/schemata/multi/array-3-int.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
[ [
{ "data": [ ], "check": [ ], "error": [ "size" ] }, { "data": [ ], "check": [ ], "error": [ "size" ] },
{ "data": [ 0 ], "check": [ "contents" ], "error": [ "type" ] } { "data": [ 0 ], "check": [ "contents" ], "error": [ "type" ] }
], ]
"errors_struct":
[ "type", null, "size" ]
} }
} }
} }
Expand Down
4 changes: 1 addition & 3 deletions spec/schemata/multi/map-int.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
[ [
{ "data": [ "opt" ], "check": [ "values" ], "error": [ "type" ] }, { "data": [ "opt" ], "check": [ "values" ], "error": [ "type" ] },
{ "data": [ "rest" ], "check": [ "values" ], "error": [ "type" ] } { "data": [ "rest" ], "check": [ "values" ], "error": [ "type" ] }
], ]
"errors_struct":
{ "opt": "type", "rest": "type" }
} }
} }
} }
Expand Down
4 changes: 1 addition & 3 deletions spec/schemata/multi/rec-key-opt-rest.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
"check": [ "rest", "values" ], "check": [ "rest", "values" ],
"error": [ "type" ] "error": [ "type" ]
} }
], ]
"errors_struct":
{ "key": "missing", "opt": "type", "rest": "type" }
} }
} }
} }
Expand Down
8 changes: 2 additions & 6 deletions spec/schemata/multi/seq-ii-2bools.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
[ [
{ "data": [ ], "check": [ ], "error": [ "size" ] }, { "data": [ ], "check": [ ], "error": [ "size" ] },
{ "data": [ 0 ], "check": [ "contents", 0 ], "error": [ "type" ] } { "data": [ 0 ], "check": [ "contents", 0 ], "error": [ "type" ] }
], ]
"errors_struct":
[ "type", "size" ]
}, },
"0-str-3-T-str": { "0-str-3-T-str": {
"errors": "errors":
Expand All @@ -29,9 +27,7 @@
{ "data": [ ], "check": [ "tail" ], "error": [ "size" ] }, { "data": [ ], "check": [ "tail" ], "error": [ "size" ] },
{ "data": [ 2 ], "check": [ "tail", "contents" ], "error": [ "type" ] }, { "data": [ 2 ], "check": [ "tail", "contents" ], "error": [ "type" ] },
{ "data": [ 4 ], "check": [ "tail", "contents" ], "error": [ "type" ] } { "data": [ 4 ], "check": [ "tail", "contents" ], "error": [ "type" ] }
], ]
"errors_struct":
[ null, "type", "type", null, "type", "size" ]
} }
} }
} }
Expand Down
4 changes: 1 addition & 3 deletions spec/schemata/multi/seq-ii.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
[ [
{ "data": [ 1 ], "check": [ "contents", 1 ], "error": [ "type" ] }, { "data": [ 1 ], "check": [ "contents", 1 ], "error": [ "type" ] },
{ "data": [ ], "check": [ ], "error": [ "size" ] } { "data": [ ], "check": [ ], "error": [ "size" ] }
], ]
"errors_struct":
[ null, "type", null, "size" ]
} }
} }
} }
Expand Down
36 changes: 1 addition & 35 deletions spec/spec.json
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
{ {
"count" : 1633, "count" : 1625,
"tests" : { "tests" : {
"all-2recs" : { "all-2recs" : {
"schema" : { "schema" : {
Expand Down Expand Up @@ -8653,7 +8653,6 @@
] ]
} }
], ],
"errors_struct" : "value,range",
"input" : "5" "input" : "5"
}, },
"str/x" : { "str/x" : {
Expand All @@ -8679,7 +8678,6 @@
] ]
} }
], ],
"errors_struct" : "type,type",
"input" : "\"x\"" "input" : "\"x\""
} }
} }
Expand Down Expand Up @@ -8717,11 +8715,6 @@
] ]
} }
], ],
"errors_struct" : [
"type",
null,
"size"
],
"input" : "[\"string\", 1 ]" "input" : "[\"string\", 1 ]"
} }
} }
Expand Down Expand Up @@ -8759,10 +8752,6 @@
] ]
} }
], ],
"errors_struct" : {
"opt" : "type",
"rest" : "type"
},
"input" : "{\"key\": 0, \"opt\": true, \"rest\": false}" "input" : "{\"key\": 0, \"opt\": true, \"rest\": false}"
} }
} }
Expand Down Expand Up @@ -8868,11 +8857,6 @@
] ]
} }
], ],
"errors_struct" : {
"key" : "missing",
"opt" : "type",
"rest" : "type"
},
"input" : "{\"opt\": \"pants\", \"rest\": \"pants\"}" "input" : "{\"opt\": \"pants\", \"rest\": \"pants\"}"
} }
} }
Expand Down Expand Up @@ -8912,12 +8896,6 @@
] ]
} }
], ],
"errors_struct" : [
null,
"type",
null,
"size"
],
"input" : "[ 0, \"string\", 3 ]" "input" : "[ 0, \"string\", 3 ]"
} }
} }
Expand Down Expand Up @@ -8992,14 +8970,6 @@
] ]
} }
], ],
"errors_struct" : [
null,
"type",
"type",
null,
"type",
"size"
],
"input" : "[ 0, \"string\", 3, true, \"false\" ]" "input" : "[ 0, \"string\", 3, true, \"false\" ]"
}, },
"arr/str" : { "arr/str" : {
Expand All @@ -9024,10 +8994,6 @@
] ]
} }
], ],
"errors_struct" : [
"type",
"size"
],
"input" : "[\"string\" ]" "input" : "[\"string\" ]"
} }
} }
Expand Down

0 comments on commit 66b8f97

Please sign in to comment.