Initial commit
This commit is contained in:
commit
311a93cdd6
15 changed files with 2702 additions and 0 deletions
13
tests/CMakeLists.txt
Normal file
13
tests/CMakeLists.txt
Normal 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)
|
8
tests/unit_tests/CMakeLists.txt
Normal file
8
tests/unit_tests/CMakeLists.txt
Normal 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)
|
5
tests/unit_tests/test_example.cpp
Normal file
5
tests/unit_tests/test_example.cpp
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include "gtest/gtest.h"
|
||||
|
||||
TEST(Example, Equals) {
|
||||
EXPECT_EQ(1, 1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue