summaryrefslogtreecommitdiff
path: root/auto_tests/encryptsave_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'auto_tests/encryptsave_test.c')
-rw-r--r--auto_tests/encryptsave_test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/auto_tests/encryptsave_test.c b/auto_tests/encryptsave_test.c
index 2a2827da..fcdef3e6 100644
--- a/auto_tests/encryptsave_test.c
+++ b/auto_tests/encryptsave_test.c
@@ -56,8 +56,8 @@ END_TEST
56 56
57START_TEST(test_save_friend) 57START_TEST(test_save_friend)
58{ 58{
59 Tox *tox1 = tox_new(0, 0); 59 Tox *tox1 = tox_new_log(0, 0, 0);
60 Tox *tox2 = tox_new(0, 0); 60 Tox *tox2 = tox_new_log(0, 0, 0);
61 ck_assert_msg(tox1 || tox2, "Failed to create 2 tox instances"); 61 ck_assert_msg(tox1 || tox2, "Failed to create 2 tox instances");
62 tox_callback_friend_request(tox2, accept_friend_request); 62 tox_callback_friend_request(tox2, accept_friend_request);
63 uint8_t address[TOX_ADDRESS_SIZE]; 63 uint8_t address[TOX_ADDRESS_SIZE];
@@ -82,7 +82,7 @@ START_TEST(test_save_friend)
82 options.savedata_length = size2; 82 options.savedata_length = size2;
83 83
84 TOX_ERR_NEW err2; 84 TOX_ERR_NEW err2;
85 Tox *tox3 = tox_new(&options, &err2); 85 Tox *tox3 = tox_new_log(&options, &err2, 0);
86 ck_assert_msg(err2 == TOX_ERR_NEW_LOAD_ENCRYPTED, "wrong error! %u. should fail with %u", err2, 86 ck_assert_msg(err2 == TOX_ERR_NEW_LOAD_ENCRYPTED, "wrong error! %u. should fail with %u", err2,
87 TOX_ERR_NEW_LOAD_ENCRYPTED); 87 TOX_ERR_NEW_LOAD_ENCRYPTED);
88 ck_assert_msg(tox3 == NULL, "tox_new with error should return NULL"); 88 ck_assert_msg(tox3 == NULL, "tox_new with error should return NULL");
@@ -92,7 +92,7 @@ START_TEST(test_save_friend)
92 ck_assert_msg(ret, "failed to decrypt save: %u", err3); 92 ck_assert_msg(ret, "failed to decrypt save: %u", err3);
93 options.savedata_data = dec_data; 93 options.savedata_data = dec_data;
94 options.savedata_length = size; 94 options.savedata_length = size;
95 tox3 = tox_new(&options, &err2); 95 tox3 = tox_new_log(&options, &err2, 0);
96 ck_assert_msg(err2 == TOX_ERR_NEW_OK, "failed to load from decrypted data: %u", err2); 96 ck_assert_msg(err2 == TOX_ERR_NEW_OK, "failed to load from decrypted data: %u", err2);
97 uint8_t address2[TOX_PUBLIC_KEY_SIZE]; 97 uint8_t address2[TOX_PUBLIC_KEY_SIZE];
98 ret = tox_friend_get_public_key(tox3, 0, address2, 0); 98 ret = tox_friend_get_public_key(tox3, 0, address2, 0);
@@ -122,7 +122,7 @@ START_TEST(test_save_friend)
122 // to remove the manual check now that it's there) 122 // to remove the manual check now that it's there)
123 options.savedata_data = out1; 123 options.savedata_data = out1;
124 options.savedata_length = size; 124 options.savedata_length = size;
125 Tox *tox4 = tox_new(&options, &err2); 125 Tox *tox4 = tox_new_log(&options, &err2, 0);
126 ck_assert_msg(err2 == TOX_ERR_NEW_OK, "failed to new the third"); 126 ck_assert_msg(err2 == TOX_ERR_NEW_OK, "failed to new the third");
127 uint8_t address5[TOX_PUBLIC_KEY_SIZE]; 127 uint8_t address5[TOX_PUBLIC_KEY_SIZE];
128 ret = tox_friend_get_public_key(tox4, 0, address5, 0); 128 ret = tox_friend_get_public_key(tox4, 0, address5, 0);