diff options
author | irungentoo <irungentoo@gmail.com> | 2015-02-25 21:09:14 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-02-25 21:09:14 -0500 |
commit | 76dfccf2d6386c1dd1a7e62586ceb1e18618b328 (patch) | |
tree | 8bdd109789fbafe50695c5d5f004e2b0310eb78f /auto_tests/messenger_test.c | |
parent | ca997bda701f27454b4f5cd54a94f4166ab8e235 (diff) |
Ported some tests to the new api.
Diffstat (limited to 'auto_tests/messenger_test.c')
-rw-r--r-- | auto_tests/messenger_test.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c index f1a1ab9b..8c71d6e7 100644 --- a/auto_tests/messenger_test.c +++ b/auto_tests/messenger_test.c | |||
@@ -50,10 +50,10 @@ START_TEST(test_m_sendmesage) | |||
50 | int bad_len = MAX_CRYPTO_PACKET_SIZE; | 50 | int bad_len = MAX_CRYPTO_PACKET_SIZE; |
51 | 51 | ||
52 | 52 | ||
53 | ck_assert(m_sendmessage(m, -1, (uint8_t *)message, good_len) == 0); | 53 | ck_assert(m_sendmessage(m, -1, (uint8_t *)message, good_len, 0) == -1); |
54 | ck_assert(m_sendmessage(m, REALLY_BIG_NUMBER, (uint8_t *)message, good_len) == 0); | 54 | ck_assert(m_sendmessage(m, REALLY_BIG_NUMBER, (uint8_t *)message, good_len, 0) == -1); |
55 | ck_assert(m_sendmessage(m, 17, (uint8_t *)message, good_len) == 0); | 55 | ck_assert(m_sendmessage(m, 17, (uint8_t *)message, good_len, 0) == -1); |
56 | ck_assert(m_sendmessage(m, friend_id_num, (uint8_t *)message, bad_len) == 0); | 56 | ck_assert(m_sendmessage(m, friend_id_num, (uint8_t *)message, bad_len, 0) == -2); |
57 | } | 57 | } |
58 | END_TEST | 58 | END_TEST |
59 | 59 | ||
@@ -68,10 +68,10 @@ START_TEST(test_m_get_userstatus_size) | |||
68 | rc = m_get_statusmessage_size(m, friend_id_num); | 68 | rc = m_get_statusmessage_size(m, friend_id_num); |
69 | 69 | ||
70 | /* this WILL error if the original m_addfriend_norequest() failed */ | 70 | /* this WILL error if the original m_addfriend_norequest() failed */ |
71 | ck_assert_msg((rc > 0 && rc <= MAX_STATUSMESSAGE_LENGTH), | 71 | ck_assert_msg((rc >= 0 && rc <= MAX_STATUSMESSAGE_LENGTH), |
72 | "m_get_statusmessage_size is returning out of range values!\n" | 72 | "m_get_statusmessage_size is returning out of range values! (%i)\n" |
73 | "(this can be caused by the error of m_addfriend_norequest" | 73 | "(this can be caused by the error of m_addfriend_norequest" |
74 | " in the beginning of the suite)\n"); | 74 | " in the beginning of the suite)\n", rc); |
75 | } | 75 | } |
76 | END_TEST | 76 | END_TEST |
77 | 77 | ||