Update 'dependencies' constraint to pass v7 tests

This commit is contained in:
Tristan Penman 2019-09-24 21:46:03 +10:00
parent 5430e79754
commit 5f8c73fdf7
2 changed files with 5 additions and 2 deletions

View File

@ -1410,7 +1410,7 @@ private:
// exercised the flexibility by loosely-typed Adapter types. If the
// value of the dependency mapping is an object, then we'll try to
// process it as a dependent schema.
} else if (member.second.isObject()) {
} else if (member.second.isObject() || (version == kDraft7 && member.second.maybeBool())) {
// Parse dependent subschema
const Subschema *childSubschema =
makeOrReuseSchema<AdapterType>(rootSchema, rootNode,

View File

@ -463,7 +463,10 @@ TEST_F(TestValidator, Draft7_Contains)
// TOOD: untested default
// TODO: untested dependencies
TEST_F(TestValidator, Draft7_Dependencies)
{
processDraft7TestFile(TEST_SUITE_DIR "draft7/dependencies.json");
}
TEST_F(TestValidator, Draft7_Enum)
{