Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- run: sudo snap install jsonschema
- uses: sourcemeta/jsonschema@v12.4.0
- uses: actions/checkout@v4
- run: make lint
- run: make test
Expand Down
12 changes: 12 additions & 0 deletions schemas/iso/c/2024/uint64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ISO/IEC 9899:2024 Unsigned 64-bit Integer (uint64_t)",
"description": "An unsigned integer type with width of exactly 64 bits",
"$comment": "This schema requires a JSON Schema evaluator that supports big integers beyond the 64-bit signed integer interoperability guidelines defined in RFC 8259 for the JSON grammar",
"examples": [ 0, 1, 18446744073709551615, 9223372036854775808, 42 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.iso.org/standard/82075.html" ],
"type": "integer",
"maximum": 18446744073709551615,
"minimum": 0
}
3 changes: 1 addition & 2 deletions schemas/w3c/xmlschema/2001/unsigned-long.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"examples": [ 0, 1, 9007199254740991, 4294967296 ],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.w3.org/TR/xmlschema-2/#unsignedLong" ],
"type": "integer",
"minimum": 0
"$ref": "../../../iso/c/2024/uint64.json"
}
86 changes: 86 additions & 0 deletions test/iso/c/2024/uint64.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"target": "../../../../schemas/iso/c/2024/uint64.json",
"tests": [
{
"description": "Valid - zero",
"data": 0,
"valid": true
},
{
"description": "Valid - minimum value",
"data": 0,
"valid": true
},
{
"description": "Valid - maximum value",
"data": 18446744073709551615,
"valid": true
},
{
"description": "Valid - mid-range value",
"data": 9223372036854775808,
"valid": true
},
{
"description": "Valid - positive value",
"data": 42,
"valid": true
},
{
"description": "Valid - large value",
"data": 10000000000000000000,
"valid": true
},
{
"description": "Invalid - negative value",
"data": -1,
"valid": false
},
{
"description": "Invalid - above maximum",
"data": 18446744073709551616,
"valid": false
},
{
"description": "Invalid - large above maximum",
"data": 20000000000000000000,
"valid": false
},
{
"description": "Invalid - large negative value",
"data": -1000,
"valid": false
},
{
"description": "Invalid type - string",
"data": "42",
"valid": false
},
{
"description": "Invalid type - boolean",
"data": true,
"valid": false
},
{
"description": "Invalid type - null",
"data": null,
"valid": false
},
{
"description": "Invalid type - array",
"data": [],
"valid": false
},
{
"description": "Invalid type - object",
"data": {},
"valid": false
},
{
"description": "Invalid type - float",
"data": 42.5,
"valid": false
}
]
}