| 58 | } |
| 59 | |
| 60 | void TestParseError(const std::string& input, size_t off, SonicError err) { |
| 61 | Document doc; |
| 62 | doc.Parse(input.data(), input.size()); |
| 63 | EXPECT_TRUE(doc.HasParseError()) << input; |
| 64 | EXPECT_EQ(doc.GetParseError(), err) << input; |
| 65 | // TODO: test offset |
| 66 | (void)(off); |
| 67 | } |
| 68 | |
| 69 | void TestParseInf(size_t off, const std::string& input) { |
| 70 | TestParseError(input, off, kParseErrorInfinity); |
no test coverage detected