Started implementing parser tests

This commit is contained in:
Pasha Bibko
2025-08-20 21:37:58 +01:00
parent b6db61b2c3
commit 466d861e0b
2 changed files with 17 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
# Creates the binary to run the tests #
# Creates the binary to run the tests, the order they appear here is the order that they are run #
# For exampe, the parser tests require the lexer to be working so they must be run after #
add_executable(LXC_Tests
src/LexerTests.cpp
src/ParserTests.cpp
)
# Creates the shared precompiled header #
@@ -10,17 +12,19 @@ target_precompile_headers(LXC_Tests PRIVATE ${CMAKE_SOURCE_DIR}/external/util/Ut
# Includes headers for modules to test #
target_include_directories(LXC_Tests PRIVATE
${CMAKE_SOURCE_DIR}/lexer/inc
${CMAKE_SOURCE_DIR}/parser/inc
)
# Links with GoogleTest #
# Links with all needed libraries #
target_link_libraries(LXC_Tests
# Testing libraries #
gtest
gtest_main
# Libraries to test #
Parser
Lexer
)
# Registers the test #
# Registers the test to be run #
include(GoogleTest)

10
tests/src/ParserTests.cpp Normal file
View File

@@ -0,0 +1,10 @@
#include <gtest/gtest.h>
// The tests for the parser //
namespace PashaBibko::LXC::Parser
{
TEST(ParserTests, ARE_PARSER_TESTS_COMPILING)
{
EXPECT_TRUE(true);
}
}