diff options
Diffstat (limited to 'auto_tests/tox_test.c')
-rw-r--r-- | auto_tests/tox_test.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index f57a2611..397c8acd 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c | |||
@@ -944,7 +944,8 @@ START_TEST(test_many_clients_tcp) | |||
944 | uint8_t dpk[TOX_PUBLIC_KEY_SIZE]; | 944 | uint8_t dpk[TOX_PUBLIC_KEY_SIZE]; |
945 | tox_self_get_dht_id(toxes[0], dpk); | 945 | tox_self_get_dht_id(toxes[0], dpk); |
946 | TOX_ERR_BOOTSTRAP error = 0; | 946 | TOX_ERR_BOOTSTRAP error = 0; |
947 | ck_assert_msg(tox_add_tcp_relay(toxes[i], TOX_LOCALHOST, TCP_RELAY_PORT, dpk, &error), "add relay error, %i, %i", i, error); | 947 | ck_assert_msg(tox_add_tcp_relay(toxes[i], TOX_LOCALHOST, TCP_RELAY_PORT, dpk, &error), "add relay error, %i, %i", i, |
948 | error); | ||
948 | ck_assert_msg(tox_bootstrap(toxes[i], TOX_LOCALHOST, 33445, dpk, 0), "Bootstrap error"); | 949 | ck_assert_msg(tox_bootstrap(toxes[i], TOX_LOCALHOST, 33445, dpk, 0), "Bootstrap error"); |
949 | } | 950 | } |
950 | 951 | ||
@@ -1039,7 +1040,8 @@ START_TEST(test_many_clients_tcp_b) | |||
1039 | tox_callback_friend_request(toxes[i], accept_friend_request, &to_comp); | 1040 | tox_callback_friend_request(toxes[i], accept_friend_request, &to_comp); |
1040 | uint8_t dpk[TOX_PUBLIC_KEY_SIZE]; | 1041 | uint8_t dpk[TOX_PUBLIC_KEY_SIZE]; |
1041 | tox_self_get_dht_id(toxes[(i % NUM_TCP_RELAYS)], dpk); | 1042 | tox_self_get_dht_id(toxes[(i % NUM_TCP_RELAYS)], dpk); |
1042 | ck_assert_msg(tox_add_tcp_relay(toxes[i], TOX_LOCALHOST, TCP_RELAY_PORT + (i % NUM_TCP_RELAYS), dpk, 0), "add relay error"); | 1043 | ck_assert_msg(tox_add_tcp_relay(toxes[i], TOX_LOCALHOST, TCP_RELAY_PORT + (i % NUM_TCP_RELAYS), dpk, 0), |
1044 | "add relay error"); | ||
1043 | tox_self_get_dht_id(toxes[0], dpk); | 1045 | tox_self_get_dht_id(toxes[0], dpk); |
1044 | ck_assert_msg(tox_bootstrap(toxes[i], TOX_LOCALHOST, 33445, dpk, 0), "Bootstrap error"); | 1046 | ck_assert_msg(tox_bootstrap(toxes[i], TOX_LOCALHOST, 33445, dpk, 0), "Bootstrap error"); |
1045 | } | 1047 | } |
@@ -1169,7 +1171,7 @@ START_TEST(test_many_group) | |||
1169 | uint32_t to_comp = 234212; | 1171 | uint32_t to_comp = 234212; |
1170 | int test_run = 0; | 1172 | int test_run = 0; |
1171 | 1173 | ||
1172 | group_test_restart: | 1174 | group_test_restart: |
1173 | 1175 | ||
1174 | for (i = 0; i < NUM_GROUP_TOX; ++i) { | 1176 | for (i = 0; i < NUM_GROUP_TOX; ++i) { |
1175 | toxes[i] = tox_new(0, 0); | 1177 | toxes[i] = tox_new(0, 0); |
@@ -1264,8 +1266,8 @@ START_TEST(test_many_group) | |||
1264 | * important again. | 1266 | * important again. |
1265 | */ | 1267 | */ |
1266 | ck_assert_msg(num_peers == NUM_GROUP_TOX, "\n\tBad number of group peers (pre check)." | 1268 | ck_assert_msg(num_peers == NUM_GROUP_TOX, "\n\tBad number of group peers (pre check)." |
1267 | "\n\t\t\tExpected: %u but tox_instance(%u) only has: %i\n\n", | 1269 | "\n\t\t\tExpected: %u but tox_instance(%u) only has: %i\n\n", |
1268 | NUM_GROUP_TOX, i, num_peers); | 1270 | NUM_GROUP_TOX, i, num_peers); |
1269 | 1271 | ||
1270 | uint8_t title[2048]; | 1272 | uint8_t title[2048]; |
1271 | int ret = tox_group_get_title(toxes[i], 0, title, sizeof(title)); | 1273 | int ret = tox_group_get_title(toxes[i], 0, title, sizeof(title)); |
@@ -1308,8 +1310,8 @@ START_TEST(test_many_group) | |||
1308 | for (i = 0; i < (k - 1); ++i) { | 1310 | for (i = 0; i < (k - 1); ++i) { |
1309 | int num_peers = tox_group_number_peers(toxes[i], 0); | 1311 | int num_peers = tox_group_number_peers(toxes[i], 0); |
1310 | ck_assert_msg(num_peers == (k - 1), "\n\tBad number of group peers (post check)." | 1312 | ck_assert_msg(num_peers == (k - 1), "\n\tBad number of group peers (post check)." |
1311 | "\n\t\t\tExpected: %u but tox_instance(%u) only has: %i\n\n", | 1313 | "\n\t\t\tExpected: %u but tox_instance(%u) only has: %i\n\n", |
1312 | (k - 1), i, num_peers); | 1314 | (k - 1), i, num_peers); |
1313 | } | 1315 | } |
1314 | } | 1316 | } |
1315 | 1317 | ||