| 364 | } |
| 365 | |
| 366 | void checkDeclFileReconstruction(const std::string& declFile) |
| 367 | { |
| 368 | auto originalText = algorithm::loadTextFromVfsFile(declFile); |
| 369 | auto syntaxTree = parseText(originalText); |
| 370 | |
| 371 | auto reconstructedText = syntaxTree->getString(); |
| 372 | EXPECT_EQ(reconstructedText, originalText) << "Parsed file " << declFile << " couldn't be reconstructed"; |
| 373 | } |
| 374 | // Attempt to parse a whole file and reconstruct it from the syntax tree |
| 375 | TEST_F(DefBlockSyntaxParserTest, ReconstructFileFromSyntaxTree) |
| 376 | { |
no test coverage detected