diff options
Diffstat (limited to 'auto_tests')
-rw-r--r-- | auto_tests/messenger_test.c | 58 | ||||
-rw-r--r-- | auto_tests/network_test.c | 6 |
2 files changed, 23 insertions, 41 deletions
diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c index f749f6cb..6ede62ef 100644 --- a/auto_tests/messenger_test.c +++ b/auto_tests/messenger_test.c | |||
@@ -310,48 +310,30 @@ START_TEST(test_messenger_state_saveloadsave) | |||
310 | } | 310 | } |
311 | END_TEST | 311 | END_TEST |
312 | 312 | ||
313 | #define DEFTESTCASE(NAME) \ | ||
314 | TCase *tc_##NAME = tcase_create(#NAME); \ | ||
315 | tcase_add_test(tc_##NAME, test_##NAME); \ | ||
316 | suite_add_tcase(s, tc_##NAME); | ||
317 | |||
313 | Suite *messenger_suite(void) | 318 | Suite *messenger_suite(void) |
314 | { | 319 | { |
315 | Suite *s = suite_create("Messenger"); | 320 | Suite *s = suite_create("Messenger"); |
316 | 321 | ||
317 | TCase *userstatus_size = tcase_create("userstatus_size"); | 322 | DEFTESTCASE(dht_state_saveloadsave); |
318 | TCase *set_userstatus = tcase_create("set_userstatus"); | 323 | DEFTESTCASE(messenger_state_saveloadsave); |
319 | TCase *send_message = tcase_create("send_message"); | 324 | |
320 | TCase *friend_exists = tcase_create("friend_exists"); | 325 | DEFTESTCASE(getself_name); |
321 | TCase *get_friend_connectionstatus = tcase_create("get_friend_connectionstatus"); | 326 | DEFTESTCASE(m_get_userstatus_size); |
322 | TCase *getself_name = tcase_create("getself_name"); | 327 | DEFTESTCASE(m_set_userstatus); |
323 | TCase *delfriend = tcase_create("delfriend"); | 328 | |
324 | //TCase *addfriend = tcase_create("addfriend"); | 329 | /* DEFTESTCASE(m_addfriend); */ |
325 | TCase *setname = tcase_create("setname"); | 330 | DEFTESTCASE(m_friend_exists); |
326 | TCase *getname = tcase_create("getname"); | 331 | DEFTESTCASE(m_get_friend_connectionstatus); |
327 | TCase *dht_state_saveloadsave = tcase_create("dht_state_saveloadsave"); | 332 | DEFTESTCASE(m_delfriend); |
328 | TCase *messenger_state_saveloadsave = tcase_create("messenger_state_saveloadsave"); | 333 | |
329 | 334 | DEFTESTCASE(setname); | |
330 | tcase_add_test(userstatus_size, test_m_get_userstatus_size); | 335 | DEFTESTCASE(getname); |
331 | tcase_add_test(set_userstatus, test_m_set_userstatus); | 336 | DEFTESTCASE(m_sendmesage); |
332 | tcase_add_test(get_friend_connectionstatus, test_m_get_friend_connectionstatus); | ||
333 | tcase_add_test(friend_exists, test_m_friend_exists); | ||
334 | tcase_add_test(getself_name, test_getself_name); | ||
335 | tcase_add_test(send_message, test_m_sendmesage); | ||
336 | tcase_add_test(delfriend, test_m_delfriend); | ||
337 | //tcase_add_test(addfriend, test_m_addfriend); | ||
338 | tcase_add_test(setname, test_getname); | ||
339 | tcase_add_test(setname, test_setname); | ||
340 | tcase_add_test(dht_state_saveloadsave, test_dht_state_saveloadsave); | ||
341 | tcase_add_test(messenger_state_saveloadsave, test_messenger_state_saveloadsave); | ||
342 | |||
343 | suite_add_tcase(s, userstatus_size); | ||
344 | suite_add_tcase(s, set_userstatus); | ||
345 | suite_add_tcase(s, get_friend_connectionstatus); | ||
346 | suite_add_tcase(s, friend_exists); | ||
347 | suite_add_tcase(s, send_message); | ||
348 | suite_add_tcase(s, getself_name); | ||
349 | suite_add_tcase(s, delfriend); | ||
350 | //suite_add_tcase(s, addfriend); | ||
351 | suite_add_tcase(s, getname); | ||
352 | suite_add_tcase(s, setname); | ||
353 | suite_add_tcase(s, messenger_state_saveloadsave); | ||
354 | suite_add_tcase(s, dht_state_saveloadsave); | ||
355 | 337 | ||
356 | return s; | 338 | return s; |
357 | } | 339 | } |
diff --git a/auto_tests/network_test.c b/auto_tests/network_test.c index 8d2a12d9..2383c0cb 100644 --- a/auto_tests/network_test.c +++ b/auto_tests/network_test.c | |||
@@ -123,9 +123,9 @@ START_TEST(test_ip_equal) | |||
123 | END_TEST | 123 | END_TEST |
124 | 124 | ||
125 | #define DEFTESTCASE(NAME) \ | 125 | #define DEFTESTCASE(NAME) \ |
126 | TCase *NAME = tcase_create(#NAME); \ | 126 | TCase *tc_##NAME = tcase_create(#NAME); \ |
127 | tcase_add_test(NAME, test_##NAME); \ | 127 | tcase_add_test(tc_##NAME, test_##NAME); \ |
128 | suite_add_tcase(s, NAME); | 128 | suite_add_tcase(s, tc_##NAME); |
129 | 129 | ||
130 | Suite *network_suite(void) | 130 | Suite *network_suite(void) |
131 | { | 131 | { |