From bf90c63c27c718aab840407320a0a89d233693e8 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 5 Jun 2015 22:11:19 -0400 Subject: [PATCH] Added test. --- auto_tests/tox_test.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index e63bd7b8..e7cc237a 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c @@ -795,6 +795,14 @@ START_TEST(test_many_clients) uint8_t address[TOX_ADDRESS_SIZE]; + unsigned int num_f = 0; + + for (i = 0; i < NUM_TOXES; ++i) { + num_f += tox_self_get_friend_list_size(); + } + + ck_assert_msg(num_f == NUM_FRIENDS * 2, "bad num friends"); + for (i = 0; i < NUM_FRIENDS; ++i) { loop_top: pairs[i].tox1 = rand() % NUM_TOXES;