summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-12-14 14:17:59 +0100
committerPetr Mrázek <peterix@gmail.com>2013-12-14 14:17:59 +0100
commitf15306a0ac0b9e449344da07fd6304c5704c0913 (patch)
tree29e3ed4eb22c3367ec103e4280f45dc437a4052e /tests
parent8f856f55732e6427e9b4994343b01f9ac0e0daee (diff)
downloadMultiMC-f15306a0ac0b9e449344da07fd6304c5704c0913.tar
MultiMC-f15306a0ac0b9e449344da07fd6304c5704c0913.tar.gz
MultiMC-f15306a0ac0b9e449344da07fd6304c5704c0913.tar.lz
MultiMC-f15306a0ac0b9e449344da07fd6304c5704c0913.tar.xz
MultiMC-f15306a0ac0b9e449344da07fd6304c5704c0913.zip
Use ctest
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 20863c73..e115af17 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,3 +1,4 @@
+# run the unit tests with `make test`
find_package(Qt5 COMPONENTS Test Core Network Widgets)
include_directories(${MMC_SRC})
@@ -11,18 +12,14 @@ macro(add_unit_test name)
add_executable(tst_${name} ${srcs})
qt5_use_modules(tst_${name} Test Core Network Widgets)
target_link_libraries(tst_${name} MultiMC_common)
- add_test(tst_${name} tst_${name})
list(APPEND MultiMC_TESTS tst_${name})
-endmacro()
-
-macro(add_unit_test2 name)
- add_unit_test(${name} tst_${name}.cpp)
+ add_test(NAME ${name} COMMAND tst_${name})
endmacro()
# Tests START #
-add_unit_test2(pathutils)
-add_unit_test2(userutils)
+add_unit_test(pathutils tst_pathutils.cpp)
+add_unit_test(userutils tst_userutils.cpp)
# Tests END #