diff --git a/CMakeLists.txt b/CMakeLists.txt index 3df4917..f61829c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,4 +35,6 @@ target_link_libraries(${PROJECT_NAME} PUBLIC ${PROJECT_OBJECTS} ) -add_subdirectory(test) +# Tests +enable_testing() +add_subdirectory(test) \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f8c1bfd..a25a440 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,5 +1,3 @@ -enable_testing() - include(GoogleTest) set(TEST_PROJECT ${PROJECT_NAME}_unit_tests) diff --git a/test/test_main.cpp b/test/test_main.cpp index 341c9ed..8a7df25 100644 --- a/test/test_main.cpp +++ b/test/test_main.cpp @@ -1,10 +1,10 @@ #include "addition-operation.h" -#include "gtest/gtest.h" +#include // Testing reference section in GTest documentation // https://google.github.io/googletest/reference/testing.html TEST(MathTest, AdditionOperation) -{ +{ // Assertions section in GTest documentation // https://google.github.io/googletest/reference/assertions.html#EXPECT_EQ EXPECT_EQ(AdditionOperation(2, 3), 5);