Skip to content

add a name to the copyright, and add some type mismatch cases to the tests #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012
Copyright (c) 2012 Julian Berman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -17,3 +17,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

If you make any changes to the data stord underneath the directory
tests, you may no longer call this body of work the
JSON-Schema-Test-Suite unless you provide your changes to Julian
Berman at <some-emal-address@somewhere>
10 changes: 10 additions & 0 deletions tests/draft3/items.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,21 @@
"data": [ 1, 2, 3 ],
"valid": true
},
{
"description": "valid items with extras",
"data": [ 1, 2, 3 ],
"valid": false
},
{
"description": "wrong type of items",
"data": [1, "x"],
"valid": false
}
{
"description": "wrong type for items",
"data": "foo",
"valid": false
}
]
},
{
Expand Down
5 changes: 4 additions & 1 deletion tests/draft3/maxItems.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"description": "too long is invalid",
"data": [1, 2, 3],
"valid": false
}
},
{ "description": "maxItem can't be applied to a has h" ,
"data": {"ga":"ba"}
}
]
}
]
5 changes: 5 additions & 0 deletions tests/draft3/maxLength.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"data": "foo",
"valid": false
}
{
"description": "maxLength is for strings, not arrays" ,
"data": [1,2,3],
"valid": false
}
]
}
]
2 changes: 2 additions & 0 deletions tests/draft3/maximum.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// I'd line to figure out a way to test
// that implementations are doing correct rounding.
[
{
"description": "maximum validation",
Expand Down
5 changes: 5 additions & 0 deletions tests/draft3/type.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"data": 1,
"valid": true
},
{
"description": "an integer with a . in it is an integer",
"data": 1.0,
"valid": false
},
{
"description": "a float is not an integer",
"data": 1.1,
Expand Down
5 changes: 5 additions & 0 deletions tests/draft3/uniqueItems.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"data": [1, 2],
"valid": true
},
{
"description": "non-unique array of integers is invalid",
"data": [1, 1.0],
"valid": false
},
{
"description": "non-unique array of integers is invalid",
"data": [1, 1],
Expand Down