summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-02-12 18:17:46 (GMT)
committerAndreas Schneider <asn@cryptomilk.org>2015-02-12 18:21:47 (GMT)
commit3e2921fa0fd4094bd684dc60271bc51cb01d5082 (patch)
tree909e59a0c398460ef5e96ba9966d6637ba8ebfdd
parent4d858265d9177dbfbfacff79806da4ab18e30e21 (diff)
downloadcmocka-3e2921fa0fd4094bd684dc60271bc51cb01d5082.zip
cmocka-3e2921fa0fd4094bd684dc60271bc51cb01d5082.tar.gz
cmocka-3e2921fa0fd4094bd684dc60271bc51cb01d5082.tar.bz2
examples: Use WILL_FAIL instead of regular expression
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--example/CMakeLists.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
index 7dda568..def36ff 100644
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -40,6 +40,7 @@ if (NOT WIN32)
target_link_libraries(calculator_test ${CMOCKA_SHARED_LIBRARY})
add_test(calculator_test ${CMAKE_CURRENT_BINARY_DIR}/calculator_test)
+endif (NOT WIN32)
### Allocate module test
add_executable(allocate_module_test allocate_module.c allocate_module_test.c)
@@ -47,13 +48,14 @@ target_link_libraries(allocate_module_test ${CMOCKA_SHARED_LIBRARY})
# This is a test that should detect leaks and overflows and will fail for that
add_test(allocate_module_test ${CMAKE_CURRENT_BINARY_DIR}/allocate_module_test)
+if (WIN32)
+ set_tests_properties(allocate_module_test PROPERTIES ENVIRONMENT "PATH=${DLL_PATH_ENV}")
+endif (WIN32)
set_tests_properties(
allocate_module_test
PROPERTIES
- PASS_REGULAR_EXPRESSION
- "3 FAILED TEST"
+ WILL_FAIL 1
)
-endif (NOT WIN32)
### Assert macro test
add_executable(assert_macro_test assert_macro.c assert_macro_test.c)
@@ -63,8 +65,7 @@ add_test(assert_macro_test ${CMAKE_CURRENT_BINARY_DIR}/assert_macro_test)
set_tests_properties(
assert_macro_test
PROPERTIES
- PASS_REGULAR_EXPRESSION
- "2 FAILED TEST"
+ WILL_FAIL 1
)
if (WIN32)
set_tests_properties(assert_macro_test PROPERTIES ENVIRONMENT "PATH=${DLL_PATH_ENV}")
@@ -78,8 +79,7 @@ add_test(assert_module_test ${CMAKE_CURRENT_BINARY_DIR}/assert_module_test)
set_tests_properties(
assert_module_test
PROPERTIES
- PASS_REGULAR_EXPRESSION
- "2 FAILED TEST"
+ WILL_FAIL 1
)
if (WIN32)
set_tests_properties(assert_module_test PROPERTIES ENVIRONMENT "PATH=${DLL_PATH_ENV}")