| 50 | } |
| 51 | |
| 52 | void TestFailed(const std::string schema, const std::string json) { |
| 53 | Document doc; |
| 54 | doc.Parse(schema); |
| 55 | if (doc.HasParseError()) |
| 56 | FAIL() << "failed parsing schema: " << schema << std::endl; |
| 57 | |
| 58 | doc.ParseSchema(json); |
| 59 | |
| 60 | EXPECT_TRUE(doc.HasParseError()) |
| 61 | << "unexpect parsing json success: " << json << std::endl; |
| 62 | } |
| 63 | |
| 64 | TEST(ParseSchema, SuccessBasic) { |
| 65 | TestSuccess( |
no test coverage detected