diff options
author | Simon Levermann <simon@levermaenner.de> | 2013-08-08 18:06:10 +0200 |
---|---|---|
committer | Simon Levermann <simon@levermaenner.de> | 2013-08-08 18:06:10 +0200 |
commit | 320c5a6708fba36c48c62ec0dca8ad2d5b865b5d (patch) | |
tree | bb4d459ba2531f960f6f955a9facff500f8ffb4a /auto_tests | |
parent | b5f5b1a111d9e08b2b001b5d4d76629019462f39 (diff) | |
parent | caedd4489ef34e4afffbde9c4917439f3187f6ab (diff) |
Merge branch 'upstream'
Diffstat (limited to 'auto_tests')
-rw-r--r-- | auto_tests/CMakeLists.txt | 12 | ||||
-rw-r--r-- | auto_tests/messenger_test.c | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/auto_tests/CMakeLists.txt b/auto_tests/CMakeLists.txt index 237dae1b..fbbcb7d7 100644 --- a/auto_tests/CMakeLists.txt +++ b/auto_tests/CMakeLists.txt | |||
@@ -6,3 +6,15 @@ include_directories(${CHECK_INCLUDE_DIRS}) | |||
6 | find_package(Check REQUIRED) | 6 | find_package(Check REQUIRED) |
7 | include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/messenger_test.cmake) | 7 | include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/messenger_test.cmake) |
8 | include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/friends_test.cmake) | 8 | include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/friends_test.cmake) |
9 | |||
10 | include( CTest ) | ||
11 | enable_testing() | ||
12 | |||
13 | add_test(messenger messenger_test) | ||
14 | # TODO enable once test is fixed | ||
15 | #add_test(friends friends_test) | ||
16 | |||
17 | add_custom_target( | ||
18 | test COMMAND ${CMAKE_CTEST_COMMAND} -V | ||
19 | DEPENDS messenger_test | ||
20 | ) | ||
diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c index cc624ab6..4c5c29ad 100644 --- a/auto_tests/messenger_test.c +++ b/auto_tests/messenger_test.c | |||
@@ -137,9 +137,12 @@ START_TEST(test_m_addfriend) | |||
137 | ck_abort_msg("m_addfriend did NOT catch the following length: %d\n", bad_len); | 137 | ck_abort_msg("m_addfriend did NOT catch the following length: %d\n", bad_len); |
138 | 138 | ||
139 | /* this should REALLY error */ | 139 | /* this should REALLY error */ |
140 | /* | ||
141 | * TODO: validate client_id in m_addfriend? | ||
140 | if(m_addfriend((uint8_t *)bad_id, (uint8_t *)good_data, good_len) >= 0) | 142 | if(m_addfriend((uint8_t *)bad_id, (uint8_t *)good_data, good_len) >= 0) |
141 | ck_abort_msg("The following ID passed through " | 143 | ck_abort_msg("The following ID passed through " |
142 | "m_addfriend without an error:\n'%s'\n", bad_id_str); | 144 | "m_addfriend without an error:\n'%s'\n", bad_id_str); |
145 | */ | ||
143 | } | 146 | } |
144 | END_TEST | 147 | END_TEST |
145 | 148 | ||