Initial commit

This commit is contained in:
Alex Selimov 2025-04-15 19:07:31 +00:00
commit 311a93cdd6
15 changed files with 2702 additions and 0 deletions

13
tests/CMakeLists.txt Normal file
View file

@ -0,0 +1,13 @@
project(${CMAKE_PROJECT_NAME}_tests)
# Clone Google Test
set(GOOGLETEST_DIR ${CMAKE_SOURCE_DIR}/tests/lib/googletest)
if(NOT EXISTS ${GOOGLETEST_DIR})
find_package(Git REQUIRED)
execute_process(
COMMAND ${GIT_EXECUTABLE} clone https://github.com/google/googletest ${GOOGLETEST_DIR}
)
endif()
add_subdirectory(lib/googletest)
add_subdirectory(unit_tests)

View file

@ -0,0 +1,8 @@
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
add_executable(Unit_Tests_run
test_example.cpp
)
target_link_libraries(Unit_Tests_run gtest gtest_main)
target_link_libraries(Unit_Tests_run ${CMAKE_PROJECT_NAME}_lib)

View file

@ -0,0 +1,5 @@
#include "gtest/gtest.h"
TEST(Example, Equals) {
EXPECT_EQ(1, 1);
}