mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:17:36 +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
|
@ -110,6 +110,7 @@ cp "$SERENITY_SOURCE_DIR"/README.md mnt/home/anon/
|
|||
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibJS/Tests mnt/home/anon/js-tests
|
||||
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibWeb/Tests mnt/home/anon/web-tests
|
||||
cp -r "$SERENITY_SOURCE_DIR"/Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests mnt/home/anon/cpp-tests/comprehension
|
||||
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibCpp/Tests mnt/home/anon/cpp-tests/parser
|
||||
chmod 700 mnt/root
|
||||
chmod 700 mnt/home/anon
|
||||
chmod 700 mnt/home/nona
|
||||
|
|
|
@ -12,7 +12,7 @@ cd "$script_path/.." || exit 1
|
|||
# */
|
||||
GOOD_LICENSE_HEADER_PATTERN=$'^/\*\n( \* Copyright \(c\) [0-9]{4}(-[0-9]{4})?, .*\n)+ \*\n \* SPDX-License-Identifier: BSD-2-Clause\n \*/\n\n'
|
||||
BAD_LICENSE_HEADER_ERRORS=()
|
||||
LICENSE_HEADER_CHECK_EXCLUDES=(AK/Checked.h AK/Function.h Userland/Libraries/LibC/elf.h Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests/*)
|
||||
LICENSE_HEADER_CHECK_EXCLUDES=(AK/Checked.h AK/Function.h Userland/Libraries/LibC/elf.h Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests/* Userland/Libraries/LibCpp/Tests/*)
|
||||
|
||||
# We check that "#pragma once" is present
|
||||
PRAGMA_ONCE_PATTERN='#pragma once'
|
||||
|
|
|
@ -13,7 +13,8 @@ if [ "$#" -eq "1" ]; then
|
|||
':!:Base' \
|
||||
':!:Kernel/FileSystem/ext2_fs.h' \
|
||||
':!:Userland/Libraries/LibC/syslog.h' \
|
||||
':!:Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests/*'
|
||||
':!:Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests/*' \
|
||||
':!:Userland/Libraries/LibCpp/Tests/*'
|
||||
)
|
||||
else
|
||||
files=()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue