From 24253190c92c9d7ef669061670a3b7596f9ee190 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 22 Dec 2017 18:34:29 +0000 Subject: Changing directories and adding input support --- tests/CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/CMakeLists.txt (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 00000000..613e0bdb --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,37 @@ +# Initializing google test +# prevents overriding the parent project's compiler/linter settings on windows +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +set(BUILD_GTEST ON CACHE BOOL "" FORCE) +set(BUILD_GMOCK OFF CACHE BOOL "" FORCE) + +# Add googletest directly to our build. This defines +# the gtest and gtest_main targets. +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/googletest) + +add_executable(simplegame simplegame.cpp) +target_link_libraries(simplegame yage) + +# enable tests +enable_testing() +set(SIMULATION_RUNS 1000) + +function(make_test test_name cycles) + add_executable(${test_name} ${test_name}.cpp) + target_link_libraries(${test_name} + gtest_main + yage) + add_test(NAME ${test_name} COMMAND ${test_name} --gtest_repeat=${cycles} --gtest_break_on_failure) +endfunction(make_test) + +make_test(yagetest 1) +make_test(matrixtest ${SIMULATION_RUNS}) +make_test(particlebodytest 100) +make_test(windowtest ${SIMULATION_RUNS}) +make_test(spritesheettest ${SIMULATION_RUNS}) +make_test(vector3test ${SIMULATION_RUNS}) +make_test(vector4test ${SIMULATION_RUNS}) +make_test(logtest 1) +make_test(threadtest 1) +make_test(syncqueuetest 1) +make_test(activetest 1) +make_test(structtest ${SIMULATION_RUNS}) -- cgit