mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-03-03 12:58:03 +01:00
Add passing test cases for draft 7
This commit is contained in:
parent
c210d07c61
commit
c89d1d89cd
@ -405,20 +405,11 @@ TEST_F(TestValidator, Draft4_Properties)
|
|||||||
processDraft4TestFile(TEST_SUITE_DIR "draft4/properties.json");
|
processDraft4TestFile(TEST_SUITE_DIR "draft4/properties.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(TestValidator, Draft4_Ref)
|
// TODO: broken ref
|
||||||
{
|
|
||||||
processDraft4TestFile(TEST_SUITE_DIR "draft4/ref.json");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(TestValidator, Draft4_RefRemote)
|
// TODO: broken refRemote
|
||||||
{
|
|
||||||
processDraft4TestFile(TEST_SUITE_DIR "draft4/refRemote.json");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(TestValidator, Draft4_Required)
|
// TODO: broken required
|
||||||
{
|
|
||||||
processDraft4TestFile(TEST_SUITE_DIR "draft4/required.json");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(TestValidator, Draft4_Type)
|
TEST_F(TestValidator, Draft4_Type)
|
||||||
{
|
{
|
||||||
@ -430,6 +421,46 @@ TEST_F(TestValidator, Draft4_UniqueItems)
|
|||||||
processDraft4TestFile(TEST_SUITE_DIR "draft4/uniqueItems.json");
|
processDraft4TestFile(TEST_SUITE_DIR "draft4/uniqueItems.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// draft 7
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_AdditionalItems)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/additionalItems.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_AdditionalProperties)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/additionalProperties.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_AllOf)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/allOf.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_AnyOf)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/anyOf.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: untested boolean_schema
|
||||||
|
|
||||||
|
// TODO: untested const
|
||||||
|
|
||||||
|
// TODO: untested contains
|
||||||
|
|
||||||
|
// TOOD: untested default
|
||||||
|
|
||||||
|
// TODO: untested dependencies
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_Enum)
|
||||||
|
{
|
||||||
|
processDraft4TestFile(TEST_SUITE_DIR "draft7/enum.json");
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(TestValidator, Draft7_ExclusiveMaximum)
|
TEST_F(TestValidator, Draft7_ExclusiveMaximum)
|
||||||
{
|
{
|
||||||
processDraft7TestFile(TEST_SUITE_DIR "draft7/exclusiveMaximum.json");
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/exclusiveMaximum.json");
|
||||||
@ -445,12 +476,68 @@ TEST_F(TestValidator, Draft7_IfThenElse)
|
|||||||
processDraft7TestFile(TEST_SUITE_DIR "draft7/if-then-else.json");
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/if-then-else.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: broken items
|
||||||
|
|
||||||
TEST_F(TestValidator, Draft7_Maximum)
|
TEST_F(TestValidator, Draft7_Maximum)
|
||||||
{
|
{
|
||||||
processDraft7TestFile(TEST_SUITE_DIR "draft7/maximum.json");
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/maximum.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_MaxItems)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/maxItems.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_MaxProperties)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/maxProperties.json");
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(TestValidator, Draft7_Minimum)
|
TEST_F(TestValidator, Draft7_Minimum)
|
||||||
{
|
{
|
||||||
processDraft7TestFile(TEST_SUITE_DIR "draft7/minimum.json");
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/minimum.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_MinItems)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/minItems.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_MinProperties)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/minProperties.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_MultipleOf)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/multipleOf.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: broken not
|
||||||
|
|
||||||
|
// TODO: broken oneOf
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_Pattern)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/pattern.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: broken patternProperties
|
||||||
|
|
||||||
|
// TODO: broken properties
|
||||||
|
|
||||||
|
// TODO: broken ref
|
||||||
|
|
||||||
|
// TODO: broken refRemote
|
||||||
|
|
||||||
|
// TODO: broken required
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_Type)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/type.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(TestValidator, Draft7_UniqueItems)
|
||||||
|
{
|
||||||
|
processDraft7TestFile(TEST_SUITE_DIR "draft7/uniqueItems.json");
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user