mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 13:27:34 +00:00
LibCpp: Add regression tests for the parser
For each .cpp file in the test suite data, there is a .ast file that represents the "known good" baseline of the parser result. Each .cpp file goes through the parser, and the result of invoking `ASTNode::dump()` on the root node is compared to the baseline to find regressions. We also check that there were no parser errors when parsing the .cpp files.
This commit is contained in:
parent
fbf796cd9f
commit
832e9c6e02
16 changed files with 1264 additions and 3 deletions
10
Userland/Libraries/LibCpp/Tests/function-decl.ast
Normal file
10
Userland/Libraries/LibCpp/Tests/function-decl.ast
Normal file
|
@ -0,0 +1,10 @@
|
|||
TranslationUnit[0:0->2:0]
|
||||
FunctionDeclaration[0:0->2:0]
|
||||
Type[0:0->0:4]
|
||||
int
|
||||
foo
|
||||
(
|
||||
)
|
||||
FunctionDefinition[1:0->2:0]
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue