diff --git a/test/unittest/schematest.cpp b/test/unittest/schematest.cpp index 3d12398..733841f 100644 --- a/test/unittest/schematest.cpp +++ b/test/unittest/schematest.cpp @@ -118,6 +118,12 @@ TEST(SchemaValidator, Hasher) { #define VALIDATE_(schema, json, expected, expected2) \ {\ EXPECT_TRUE(expected2 == schema.GetError().ObjectEmpty());\ + if (expected2 && !schema.GetError().ObjectEmpty()) {\ + StringBuffer ssb;\ + Writer ws(ssb);\ + schema.GetError().Accept(ws);\ + printf("Schema error: %s\n", ssb.GetString());\ + }\ SchemaValidator validator(schema);\ Document d;\ /*printf("\n%s\n", json);*/\ @@ -156,6 +162,12 @@ TEST(SchemaValidator, Hasher) { flags, SchemaValidatorType, PointerType) \ {\ EXPECT_TRUE(schema.GetError().ObjectEmpty());\ + if (!schema.GetError().ObjectEmpty()) {\ + StringBuffer ssb;\ + Writer ws(ssb);\ + schema.GetError().Accept(ws);\ + printf("Schema error: %s\n", ssb.GetString());\ + }\ SchemaValidatorType validator(schema);\ validator.SetValidateFlags(flags);\ Document d;\