From 466d861e0bfa1801b5c83ef66eeb6fa3a9ea2fab Mon Sep 17 00:00:00 2001 From: Pasha Bibko <156938226+PashaBibko@users.noreply.github.com> Date: Wed, 20 Aug 2025 21:37:58 +0100 Subject: [PATCH] Started implementing parser tests --- tests/CMakeLists.txt | 10 +++++++--- tests/src/ParserTests.cpp | 10 ++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 tests/src/ParserTests.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b8571ec..c13c1e3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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) diff --git a/tests/src/ParserTests.cpp b/tests/src/ParserTests.cpp new file mode 100644 index 0000000..93d0a7e --- /dev/null +++ b/tests/src/ParserTests.cpp @@ -0,0 +1,10 @@ +#include + +// The tests for the parser // +namespace PashaBibko::LXC::Parser +{ + TEST(ParserTests, ARE_PARSER_TESTS_COMPILING) + { + EXPECT_TRUE(true); + } +}