Added google testing library

This commit is contained in:
Pasha Bibko
2025-07-22 19:13:09 +01:00
parent 9fb3816160
commit 829d4c224a
5 changed files with 32 additions and 0 deletions

12
tests/CMakeLists.txt Normal file
View File

@@ -0,0 +1,12 @@
# Creates the binary to run the tests #
file (GLOB TestSources src/*.cpp inc/*.h)
add_executable(LXC_Tests ${TestSources})
# Links with GoogleTest #
target_link_libraries(LXC_Tests
gtest
gtest_main
)
# Registers the test #
include(GoogleTest)

11
tests/src/LXC_Tests.cpp Normal file
View File

@@ -0,0 +1,11 @@
#include <gtest/gtest.h>
TEST(IWantSomeTestsToPass, BasicTest1)
{
EXPECT_EQ(1 + 1, 2);
}
TEST(IWantSomeTestsToPass, BasicTest2)
{
EXPECT_EQ(1 + 2, 2);
}