Feat: Added tests

This commit is contained in:
Leon De Andrade 2021-09-05 10:55:52 +02:00
parent 73bebfd031
commit 343bbfc838
2 changed files with 31 additions and 0 deletions

View File

@ -64,6 +64,7 @@ if(JSON_SCHEMA_TEST_SUITE_PATH)
JSON-Suite::Optional::Format::uri-reference
JSON-Suite::Optional::Format::uri-template
JSON-Suite::Optional::Format::uri
JSON-Suite::Optional::Format::uuid
PROPERTIES
WILL_FAIL ON)

View File

@ -0,0 +1,30 @@
[
{
"description": "validation of uuids",
"schema": {
"format": "uuid"
},
"tests": [
{
"description": "a valid uuid",
"data": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"valid": true
},
{
"description": "an invalid uuid with shorter length",
"data": "3fa85f64-5717-4562-b3fc-2c963",
"valid": false
},
{
"description": "an invalid uuid with missing hyphens",
"data": "3fa85f6457174562b3fc2c963f66afa6",
"valid": true
},
{
"description": "an invalid uuid with hyphens at wrong position",
"data": "3fa85f645-717-4562b-3fc2c9-63f66afa6",
"valid": true
}
]
}
]