Add gtest
This commit is contained in:
parent
28367bd088
commit
170c18762d
4 changed files with 20 additions and 1 deletions
|
@ -1 +1,2 @@
|
|||
add_subdirectory(src)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(test)
|
|
@ -9,6 +9,7 @@ class ConanDependencies(ConanFile):
|
|||
}
|
||||
|
||||
def requirements(self):
|
||||
self.requires("gtest/1.10.0")
|
||||
self.requires("sdl2/2.0.9@bincrafters/stable")
|
||||
self.requires("sdl2_image/2.0.4@bincrafters/stable")
|
||||
|
||||
|
|
11
pacman/test/CMakeLists.txt
Normal file
11
pacman/test/CMakeLists.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
enable_testing()
|
||||
find_package(GTest REQUIRED)
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
add_executable(tests tests.cpp)
|
||||
target_link_libraries(tests GTest::GTest)
|
||||
|
||||
gtest_add_tests(TARGET tests TEST_PREFIX old_pacman:)
|
||||
gtest_discover_tests(tests TEST_PREFIX new_pacman:)
|
||||
add_test(NAME monolithic COMMAND tests)
|
6
pacman/test/tests.cpp
Normal file
6
pacman/test/tests.cpp
Normal file
|
@ -0,0 +1,6 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
Loading…
Reference in a new issue