diff options
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5b7d6fd3..08c8d541 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,24 +12,17 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/googletest) enable_testing() set(SIMULATION_RUNS 1000) -function(make_test test_name cycles) - add_executable("${test_name}test" ${test_name}/test.cpp) +function(make_test test_file_name cycles) + string(REPLACE "_test.cpp" "" test_name ${test_file_name}) + add_executable("${test_name}test" ${test_file_name}) target_link_libraries("${test_name}test" gtest_main yage) add_test(NAME ${test_name} COMMAND "${test_name}test" --gtest_repeat=${cycles} --gtest_break_on_failure) endfunction(make_test) -make_test(yage 1) -make_test(matrix ${SIMULATION_RUNS}) -make_test(particlebody 100) -make_test(window ${SIMULATION_RUNS}) -make_test(spritesheet ${SIMULATION_RUNS}) -make_test(vector3 ${SIMULATION_RUNS}) -make_test(vector4 ${SIMULATION_RUNS}) -make_test(log 1) -make_test(thread 1) -make_test(syncqueue 1) -make_test(active 1) -make_test(struct ${SIMULATION_RUNS}) -make_test(engine ${SIMULATION_RUNS}) +file(GLOB YAGE_TEST_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *_test.cpp) + +foreach(yage_test ${YAGE_TEST_SOURCES}) + make_test(${yage_test} 100) +endforeach() |