diff options
Diffstat (limited to 'auto_tests/tox_test.c')
-rw-r--r-- | auto_tests/tox_test.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index 397c8acd..f578a5c9 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c | |||
@@ -443,7 +443,7 @@ START_TEST(test_few_clients) | |||
443 | 443 | ||
444 | uint32_t to_compare = 974536; | 444 | uint32_t to_compare = 974536; |
445 | connected_t1 = 0; | 445 | connected_t1 = 0; |
446 | tox_callback_self_connection_status(tox1, tox_connection_status, &to_compare); | 446 | tox_callback_self_connection_status(tox1, tox_connection_status); |
447 | tox_callback_friend_request(tox2, accept_friend_request, &to_compare); | 447 | tox_callback_friend_request(tox2, accept_friend_request, &to_compare); |
448 | uint8_t address[TOX_ADDRESS_SIZE]; | 448 | uint8_t address[TOX_ADDRESS_SIZE]; |
449 | tox_self_get_address(tox2, address); | 449 | tox_self_get_address(tox2, address); |
@@ -453,9 +453,9 @@ START_TEST(test_few_clients) | |||
453 | uint8_t off = 1; | 453 | uint8_t off = 1; |
454 | 454 | ||
455 | while (1) { | 455 | while (1) { |
456 | tox_iterate(tox1); | 456 | tox_iterate(tox1, &to_compare); |
457 | tox_iterate(tox2); | 457 | tox_iterate(tox2, &to_compare); |
458 | tox_iterate(tox3); | 458 | tox_iterate(tox3, &to_compare); |
459 | 459 | ||
460 | if (tox_self_get_connection_status(tox1) && tox_self_get_connection_status(tox2) | 460 | if (tox_self_get_connection_status(tox1) && tox_self_get_connection_status(tox2) |
461 | && tox_self_get_connection_status(tox3)) { | 461 | && tox_self_get_connection_status(tox3)) { |
@@ -487,9 +487,9 @@ START_TEST(test_few_clients) | |||
487 | 487 | ||
488 | while (1) { | 488 | while (1) { |
489 | messages_received = 0; | 489 | messages_received = 0; |
490 | tox_iterate(tox1); | 490 | tox_iterate(tox1, &to_compare); |
491 | tox_iterate(tox2); | 491 | tox_iterate(tox2, &to_compare); |
492 | tox_iterate(tox3); | 492 | tox_iterate(tox3, &to_compare); |
493 | 493 | ||
494 | if (messages_received) | 494 | if (messages_received) |
495 | break; | 495 | break; |
@@ -516,9 +516,9 @@ START_TEST(test_few_clients) | |||
516 | off = 1; | 516 | off = 1; |
517 | 517 | ||
518 | while (1) { | 518 | while (1) { |
519 | tox_iterate(tox1); | 519 | tox_iterate(tox1, &to_compare); |
520 | tox_iterate(tox2); | 520 | tox_iterate(tox2, &to_compare); |
521 | tox_iterate(tox3); | 521 | tox_iterate(tox3, &to_compare); |
522 | 522 | ||
523 | if (tox_self_get_connection_status(tox1) && tox_self_get_connection_status(tox2) | 523 | if (tox_self_get_connection_status(tox1) && tox_self_get_connection_status(tox2) |
524 | && tox_self_get_connection_status(tox3)) { | 524 | && tox_self_get_connection_status(tox3)) { |
@@ -544,9 +544,9 @@ START_TEST(test_few_clients) | |||
544 | 544 | ||
545 | while (1) { | 545 | while (1) { |
546 | name_changes = 0; | 546 | name_changes = 0; |
547 | tox_iterate(tox1); | 547 | tox_iterate(tox1, &to_compare); |
548 | tox_iterate(tox2); | 548 | tox_iterate(tox2, &to_compare); |
549 | tox_iterate(tox3); | 549 | tox_iterate(tox3, &to_compare); |
550 | 550 | ||
551 | if (name_changes) | 551 | if (name_changes) |
552 | break; | 552 | break; |
@@ -565,9 +565,9 @@ START_TEST(test_few_clients) | |||
565 | 565 | ||
566 | while (1) { | 566 | while (1) { |
567 | status_m_changes = 0; | 567 | status_m_changes = 0; |
568 | tox_iterate(tox1); | 568 | tox_iterate(tox1, &to_compare); |
569 | tox_iterate(tox2); | 569 | tox_iterate(tox2, &to_compare); |
570 | tox_iterate(tox3); | 570 | tox_iterate(tox3, &to_compare); |
571 | 571 | ||
572 | if (status_m_changes) | 572 | if (status_m_changes) |
573 | break; | 573 | break; |
@@ -587,9 +587,9 @@ START_TEST(test_few_clients) | |||
587 | 587 | ||
588 | while (1) { | 588 | while (1) { |
589 | typing_changes = 0; | 589 | typing_changes = 0; |
590 | tox_iterate(tox1); | 590 | tox_iterate(tox1, &to_compare); |
591 | tox_iterate(tox2); | 591 | tox_iterate(tox2, &to_compare); |
592 | tox_iterate(tox3); | 592 | tox_iterate(tox3, &to_compare); |
593 | 593 | ||
594 | 594 | ||
595 | if (typing_changes == 2) | 595 | if (typing_changes == 2) |
@@ -605,9 +605,9 @@ START_TEST(test_few_clients) | |||
605 | 605 | ||
606 | while (1) { | 606 | while (1) { |
607 | typing_changes = 0; | 607 | typing_changes = 0; |
608 | tox_iterate(tox1); | 608 | tox_iterate(tox1, &to_compare); |
609 | tox_iterate(tox2); | 609 | tox_iterate(tox2, &to_compare); |
610 | tox_iterate(tox3); | 610 | tox_iterate(tox3, &to_compare); |
611 | 611 | ||
612 | if (typing_changes == 1) | 612 | if (typing_changes == 1) |
613 | break; | 613 | break; |
@@ -632,9 +632,9 @@ START_TEST(test_few_clients) | |||
632 | 632 | ||
633 | while (1) { | 633 | while (1) { |
634 | custom_packet = 0; | 634 | custom_packet = 0; |
635 | tox_iterate(tox1); | 635 | tox_iterate(tox1, &to_compare); |
636 | tox_iterate(tox2); | 636 | tox_iterate(tox2, &to_compare); |
637 | tox_iterate(tox3); | 637 | tox_iterate(tox3, &to_compare); |
638 | 638 | ||
639 | if (custom_packet == 1) | 639 | if (custom_packet == 1) |
640 | break; | 640 | break; |
@@ -654,9 +654,9 @@ START_TEST(test_few_clients) | |||
654 | 654 | ||
655 | while (1) { | 655 | while (1) { |
656 | custom_packet = 0; | 656 | custom_packet = 0; |
657 | tox_iterate(tox1); | 657 | tox_iterate(tox1, &to_compare); |
658 | tox_iterate(tox2); | 658 | tox_iterate(tox2, &to_compare); |
659 | tox_iterate(tox3); | 659 | tox_iterate(tox3, &to_compare); |
660 | 660 | ||
661 | if (custom_packet == 1) | 661 | if (custom_packet == 1) |
662 | break; | 662 | break; |
@@ -690,9 +690,9 @@ START_TEST(test_few_clients) | |||
690 | ck_assert_msg(gfierr == TOX_ERR_FILE_GET_OK, "wrong error"); | 690 | ck_assert_msg(gfierr == TOX_ERR_FILE_GET_OK, "wrong error"); |
691 | 691 | ||
692 | while (1) { | 692 | while (1) { |
693 | tox_iterate(tox1); | 693 | tox_iterate(tox1, &to_compare); |
694 | tox_iterate(tox2); | 694 | tox_iterate(tox2, &to_compare); |
695 | tox_iterate(tox3); | 695 | tox_iterate(tox3, &to_compare); |
696 | 696 | ||
697 | if (file_sending_done) { | 697 | if (file_sending_done) { |
698 | if (sendf_ok && file_recv && totalf_size == file_size && size_recv == file_size && sending_pos == size_recv | 698 | if (sendf_ok && file_recv && totalf_size == file_size && size_recv == file_size && sending_pos == size_recv |
@@ -742,9 +742,9 @@ START_TEST(test_few_clients) | |||
742 | m_send_reached = 0; | 742 | m_send_reached = 0; |
743 | 743 | ||
744 | while (1) { | 744 | while (1) { |
745 | tox_iterate(tox1); | 745 | tox_iterate(tox1, &to_compare); |
746 | tox_iterate(tox2); | 746 | tox_iterate(tox2, &to_compare); |
747 | tox_iterate(tox3); | 747 | tox_iterate(tox3, &to_compare); |
748 | 748 | ||
749 | if (file_sending_done) { | 749 | if (file_sending_done) { |
750 | if (sendf_ok && file_recv && m_send_reached && totalf_size == file_size && size_recv == max_sending | 750 | if (sendf_ok && file_recv && m_send_reached && totalf_size == file_size && size_recv == max_sending |
@@ -791,9 +791,9 @@ START_TEST(test_few_clients) | |||
791 | 791 | ||
792 | 792 | ||
793 | while (1) { | 793 | while (1) { |
794 | tox_iterate(tox1); | 794 | tox_iterate(tox1, &to_compare); |
795 | tox_iterate(tox2); | 795 | tox_iterate(tox2, &to_compare); |
796 | tox_iterate(tox3); | 796 | tox_iterate(tox3, &to_compare); |
797 | 797 | ||
798 | if (file_sending_done) { | 798 | if (file_sending_done) { |
799 | if (sendf_ok && file_recv && totalf_size == file_size && size_recv == file_size && sending_pos == size_recv | 799 | if (sendf_ok && file_recv && totalf_size == file_size && size_recv == file_size && sending_pos == size_recv |
@@ -904,7 +904,7 @@ loop_top: | |||
904 | } | 904 | } |
905 | 905 | ||
906 | for (i = 0; i < NUM_TOXES; ++i) { | 906 | for (i = 0; i < NUM_TOXES; ++i) { |
907 | tox_iterate(toxes[i]); | 907 | tox_iterate(toxes[i], NULL); |
908 | } | 908 | } |
909 | 909 | ||
910 | c_sleep(50); | 910 | c_sleep(50); |
@@ -1002,7 +1002,7 @@ loop_top: | |||
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | for (i = 0; i < NUM_TOXES_TCP; ++i) { | 1004 | for (i = 0; i < NUM_TOXES_TCP; ++i) { |
1005 | tox_iterate(toxes[i]); | 1005 | tox_iterate(toxes[i], NULL); |
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | c_sleep(50); | 1008 | c_sleep(50); |
@@ -1098,7 +1098,7 @@ loop_top: | |||
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | for (i = 0; i < NUM_TOXES_TCP; ++i) { | 1100 | for (i = 0; i < NUM_TOXES_TCP; ++i) { |
1101 | tox_iterate(toxes[i]); | 1101 | tox_iterate(toxes[i], NULL); |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | c_sleep(30); | 1104 | c_sleep(30); |
@@ -1206,7 +1206,7 @@ group_test_restart: | |||
1206 | break; | 1206 | break; |
1207 | 1207 | ||
1208 | for (i = 0; i < NUM_GROUP_TOX; ++i) { | 1208 | for (i = 0; i < NUM_GROUP_TOX; ++i) { |
1209 | tox_iterate(toxes[i]); | 1209 | tox_iterate(toxes[i], NULL); |
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | c_sleep(25); | 1212 | c_sleep(25); |
@@ -1224,7 +1224,7 @@ group_test_restart: | |||
1224 | 1224 | ||
1225 | while (1) { | 1225 | while (1) { |
1226 | for (i = 0; i < NUM_GROUP_TOX; ++i) { | 1226 | for (i = 0; i < NUM_GROUP_TOX; ++i) { |
1227 | tox_iterate(toxes[i]); | 1227 | tox_iterate(toxes[i], NULL); |
1228 | } | 1228 | } |
1229 | 1229 | ||
1230 | if (!invite_counter) { | 1230 | if (!invite_counter) { |
@@ -1287,7 +1287,7 @@ group_test_restart: | |||
1287 | 1287 | ||
1288 | for (j = 0; j < 20; ++j) { | 1288 | for (j = 0; j < 20; ++j) { |
1289 | for (i = 0; i < NUM_GROUP_TOX; ++i) { | 1289 | for (i = 0; i < NUM_GROUP_TOX; ++i) { |
1290 | tox_iterate(toxes[i]); | 1290 | tox_iterate(toxes[i], NULL); |
1291 | } | 1291 | } |
1292 | 1292 | ||
1293 | c_sleep(25); | 1293 | c_sleep(25); |
@@ -1301,7 +1301,7 @@ group_test_restart: | |||
1301 | 1301 | ||
1302 | for (j = 0; j < 10; ++j) { | 1302 | for (j = 0; j < 10; ++j) { |
1303 | for (i = 0; i < NUM_GROUP_TOX; ++i) { | 1303 | for (i = 0; i < NUM_GROUP_TOX; ++i) { |
1304 | tox_iterate(toxes[i]); | 1304 | tox_iterate(toxes[i], NULL); |
1305 | } | 1305 | } |
1306 | 1306 | ||
1307 | c_sleep(50); | 1307 | c_sleep(50); |