onqtam | cc9e865 | 2016-08-02 14:23:38 +0300 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 2.8) |
| 2 | |
| 3 | get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) |
| 4 | project(${PROJECT_NAME}) |
| 5 | |
| 6 | include(../../scripts/common.cmake) |
| 7 | |
| 8 | include_directories("../../doctest/") |
| 9 | |
| 10 | add_executable(${PROJECT_NAME} main.cpp test.cpp) |
| 11 | |
| 12 | # queries |
onqtam | 4321fd8 | 2016-08-02 14:59:17 +0300 | [diff] [blame] | 13 | add_test(NAME help COMMAND $<TARGET_FILE:${PROJECT_NAME}> -dt-h) |
onqtam | cc9e865 | 2016-08-02 14:23:38 +0300 | [diff] [blame] | 14 | add_test(NAME version COMMAND $<TARGET_FILE:${PROJECT_NAME}> -v) |
| 15 | add_test(NAME count COMMAND $<TARGET_FILE:${PROJECT_NAME}> -c) |
| 16 | add_test(NAME list_test_cases COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ltc) |
| 17 | add_test(NAME list_test_suites COMMAND $<TARGET_FILE:${PROJECT_NAME}> -lts) |
| 18 | |
onqtam | 4321fd8 | 2016-08-02 14:59:17 +0300 | [diff] [blame] | 19 | # options |
| 20 | add_test(NAME successful COMMAND $<TARGET_FILE:${PROJECT_NAME}> -success=true -exit=Off) |
onqtam | cc9e865 | 2016-08-02 14:23:38 +0300 | [diff] [blame] | 21 | add_test(NAME abort_after COMMAND $<TARGET_FILE:${PROJECT_NAME}> -aa=3) |
| 22 | add_test(NAME first_last COMMAND $<TARGET_FILE:${PROJECT_NAME}> -f=2 -l=5) |
onqtam | 4321fd8 | 2016-08-02 14:59:17 +0300 | [diff] [blame] | 23 | add_test(NAME filter_1 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tc=assert*) |
onqtam | 30c5e4b | 2016-08-02 16:10:22 +0300 | [diff] [blame^] | 24 | add_test(NAME filter_2 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tce=???ert*) |
| 25 | add_test(NAME filter_3 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -sf=*test*) |
| 26 | add_test(NAME filter_4 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -sfe=*test*) |
onqtam | 4321fd8 | 2016-08-02 14:59:17 +0300 | [diff] [blame] | 27 | add_test(NAME filter_5 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ts=ts1) |
| 28 | add_test(NAME filter_6 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tse=ts1) |
onqtam | 30c5e4b | 2016-08-02 16:10:22 +0300 | [diff] [blame^] | 29 | add_test(NAME order_1 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=suite) |
| 30 | add_test(NAME order_2 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=name) |
| 31 | add_test(NAME order_3 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=rand -rs=324) |
onqtam | cc9e865 | 2016-08-02 14:23:38 +0300 | [diff] [blame] | 32 | |
| 33 | |
| 34 | |
| 35 | |