@@ -5664,82 +5664,82 @@ TEST(SchemaCompare, AllOf) {
56645664 " }" );
56655665}
56665666TEST (SchemaCompare, AnyOf) {
5667- COMPARE (" {"
5668- " \" type\" : \" string\" "
5669- " }" ,
5670- " {"
5671- " \" anyOf\" : ["
5672- " { \" type\" : \" string\" },"
5673- " { \" maxLength\" : 5 }"
5674- " ]"
5675- " }" );
56765667 // TODO: Re-enable these once leak is fixed
56775668 // COMPARE("{"
5678- // " \"anyOf\": ["
5679- // " { \"type\": \"string\" },"
5680- // " { \"maxLength\": 5 }"
5681- // " ]"
5669+ // " \"type\": \"string\""
56825670 // "}",
56835671 // "{"
56845672 // " \"anyOf\": ["
56855673 // " { \"type\": \"string\" },"
56865674 // " { \"maxLength\": 5 }"
56875675 // " ]"
56885676 // "}");
5689- // INVALID_COMPARE("{"
5690- // " \"anyOf\": ["
5691- // " { \"type\": \"boolean\" },"
5692- // " { \"type\": \"string\","
5693- // " \"maxLength\": 5 }"
5694- // " ]"
5695- // "}",
5696- // "{"
5697- // " \"anyOf\": ["
5698- // " { \"type\": \"string\","
5699- // " \"maxLength\": 3 }"
5700- // " ]"
5701- // "}",
5702- // "{"
5703- // " \"anyOf\": {"
5704- // " \"errors\": ["
5705- // " {"
5706- // " \"anyOf\": {"
5707- // " \"errors\": [{"
5708- // " \"compare\": {"
5709- // " \"property\": \"type\","
5710- // " \"expected\": [\"boolean\"],"
5711- // " \"actual\": [\"string\"],"
5712- // " \"errorCode\": 45,"
5713- // " \"schemaIteratorRef\": \"#/anyOf/0\","
5714- // " \"schemaHandlerRef\": \"#/anyOf/0\""
5715- // " }"
5716- // " }],"
5717- // " \"errorCode\": 24,"
5718- // " \"schemaIteratorRef\": \"#/anyOf/0\","
5719- // " \"schemaHandlerRef\": \"#\""
5720- // " }"
5721- // " },"
5722- // " {"
5723- // " \"anyOf\": {"
5724- // " \"errors\": [{"
5725- // " \"compare\": {"
5726- // " \"property\": \"maxLength\","
5727- // " \"expected\": 5, \"actual\": 3,"
5728- // " \"errorCode\": 45,"
5729- // " \"schemaIteratorRef\": \"#/anyOf/1\","
5730- // " \"schemaHandlerRef\": \"#/anyOf/0\""
5731- // " }"
5732- // " }],"
5733- // " \"errorCode\": 24,"
5734- // " \"schemaIteratorRef\": \"#/anyOf/1\","
5735- // " \"schemaHandlerRef\": \"#\""
5736- // " }"
5737- // " }"
5738- // " ],"
5739- // " \"errorCode\": 24,"
5740- // " \"schemaIteratorRef\": \"#\""
5741- // " }"
5742- // "}");
5677+ COMPARE (" {"
5678+ " \" anyOf\" : ["
5679+ " { \" type\" : \" string\" },"
5680+ " { \" maxLength\" : 5 }"
5681+ " ]"
5682+ " }" ,
5683+ " {"
5684+ " \" anyOf\" : ["
5685+ " { \" type\" : \" string\" },"
5686+ " { \" maxLength\" : 5 }"
5687+ " ]"
5688+ " }" );
5689+ INVALID_COMPARE (" {"
5690+ " \" anyOf\" : ["
5691+ " { \" type\" : \" boolean\" },"
5692+ " { \" type\" : \" string\" ,"
5693+ " \" maxLength\" : 5 }"
5694+ " ]"
5695+ " }" ,
5696+ " {"
5697+ " \" anyOf\" : ["
5698+ " { \" type\" : \" string\" ,"
5699+ " \" maxLength\" : 3 }"
5700+ " ]"
5701+ " }" ,
5702+ " {"
5703+ " \" anyOf\" : {"
5704+ " \" errors\" : ["
5705+ " {"
5706+ " \" anyOf\" : {"
5707+ " \" errors\" : [{"
5708+ " \" compare\" : {"
5709+ " \" property\" : \" type\" ,"
5710+ " \" expected\" : [\" boolean\" ],"
5711+ " \" actual\" : [\" string\" ],"
5712+ " \" errorCode\" : 45,"
5713+ " \" schemaIteratorRef\" : \" #/anyOf/0\" ,"
5714+ " \" schemaHandlerRef\" : \" #/anyOf/0\" "
5715+ " }"
5716+ " }],"
5717+ " \" errorCode\" : 24,"
5718+ " \" schemaIteratorRef\" : \" #/anyOf/0\" ,"
5719+ " \" schemaHandlerRef\" : \" #\" "
5720+ " }"
5721+ " },"
5722+ " {"
5723+ " \" anyOf\" : {"
5724+ " \" errors\" : [{"
5725+ " \" compare\" : {"
5726+ " \" property\" : \" maxLength\" ,"
5727+ " \" expected\" : 5, \" actual\" : 3,"
5728+ " \" errorCode\" : 45,"
5729+ " \" schemaIteratorRef\" : \" #/anyOf/1\" ,"
5730+ " \" schemaHandlerRef\" : \" #/anyOf/0\" "
5731+ " }"
5732+ " }],"
5733+ " \" errorCode\" : 24,"
5734+ " \" schemaIteratorRef\" : \" #/anyOf/1\" ,"
5735+ " \" schemaHandlerRef\" : \" #\" "
5736+ " }"
5737+ " }"
5738+ " ],"
5739+ " \" errorCode\" : 24,"
5740+ " \" schemaIteratorRef\" : \" #\" "
5741+ " }"
5742+ " }" );
57435743}
57445744TEST (SchemaCompare, OneOf) {
57455745 COMPARE (" {"
0 commit comments