diff options
author | irungentoo <irungentoo@gmail.com> | 2015-03-26 12:39:09 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-03-26 12:39:09 -0400 |
commit | 06b389ea5e4e0ffb1f8e6627d4909c53c23099e1 (patch) | |
tree | 6689e3ec5c518f2fbb07ca139cf5a944fe86b020 /auto_tests/encryptsave_test.c | |
parent | e888b89ac94066ab80bd72dbaa347bdab3856020 (diff) |
Making tox_encrypted_new() use the same error codes as tox_new was a bad idea.
They now have their own error codes.
Diffstat (limited to 'auto_tests/encryptsave_test.c')
-rw-r--r-- | auto_tests/encryptsave_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/auto_tests/encryptsave_test.c b/auto_tests/encryptsave_test.c index de78a0c2..e2f41f43 100644 --- a/auto_tests/encryptsave_test.c +++ b/auto_tests/encryptsave_test.c | |||
@@ -55,7 +55,7 @@ END_TEST | |||
55 | 55 | ||
56 | START_TEST(test_save_friend) | 56 | START_TEST(test_save_friend) |
57 | { | 57 | { |
58 | TOX_ERR_NEW err = TOX_ERR_NEW_OK; | 58 | TOX_ERR_ENCRYPTED_NEW err = TOX_ERR_ENCRYPTED_NEW_OK; |
59 | Tox *tox1 = tox_new(0, 0, 0, 0); | 59 | Tox *tox1 = tox_new(0, 0, 0, 0); |
60 | Tox *tox2 = tox_new(0, 0, 0, 0); | 60 | Tox *tox2 = tox_new(0, 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"); |
@@ -73,7 +73,7 @@ START_TEST(test_save_friend) | |||
73 | //ck_assert_msg(tox_is_save_encrypted(data) == 1, "magic number missing"); | 73 | //ck_assert_msg(tox_is_save_encrypted(data) == 1, "magic number missing"); |
74 | 74 | ||
75 | Tox *tox3 = tox_encrypted_new(0, data, size, "correcthorsebatterystaple", 25, &err); | 75 | Tox *tox3 = tox_encrypted_new(0, data, size, "correcthorsebatterystaple", 25, &err); |
76 | ck_assert_msg(err == TOX_ERR_NEW_OK, "failed to encrypted new"); | 76 | ck_assert_msg(err == TOX_ERR_ENCRYPTED_NEW_OK, "failed to encrypted new"); |
77 | uint8_t address2[TOX_PUBLIC_KEY_SIZE]; | 77 | uint8_t address2[TOX_PUBLIC_KEY_SIZE]; |
78 | test = tox_friend_get_public_key(tox3, 0, address2, 0); | 78 | test = tox_friend_get_public_key(tox3, 0, address2, 0); |
79 | ck_assert_msg(test == 1, "no friends!"); | 79 | ck_assert_msg(test == 1, "no friends!"); |
@@ -90,7 +90,7 @@ START_TEST(test_save_friend) | |||
90 | 90 | ||
91 | // first test tox_encrypted_key_new | 91 | // first test tox_encrypted_key_new |
92 | Tox *tox4 = tox_encrypted_key_new(0, data2, size, key, &err); | 92 | Tox *tox4 = tox_encrypted_key_new(0, data2, size, key, &err); |
93 | ck_assert_msg(err == TOX_ERR_NEW_OK, "failed to encrypted new the second"); | 93 | ck_assert_msg(err == TOX_ERR_ENCRYPTED_NEW_OK, "failed to encrypted new the second"); |
94 | uint8_t address4[TOX_PUBLIC_KEY_SIZE]; | 94 | uint8_t address4[TOX_PUBLIC_KEY_SIZE]; |
95 | test = tox_friend_get_public_key(tox4, 0, address4, 0); | 95 | test = tox_friend_get_public_key(tox4, 0, address4, 0); |
96 | ck_assert_msg(test == 1, "no friends! the second"); | 96 | ck_assert_msg(test == 1, "no friends! the second"); |
@@ -107,7 +107,7 @@ START_TEST(test_save_friend) | |||
107 | // and now with the code in use (I only bothered with manually to debug this, and it seems a waste | 107 | // and now with the code in use (I only bothered with manually to debug this, and it seems a waste |
108 | // to remove the manual check now that it's there) | 108 | // to remove the manual check now that it's there) |
109 | Tox *tox5 = tox_encrypted_new(0, data2, size, pw, pwlen, &err); | 109 | Tox *tox5 = tox_encrypted_new(0, data2, size, pw, pwlen, &err); |
110 | ck_assert_msg(err == TOX_ERR_NEW_OK, "failed to encrypted new the third"); | 110 | ck_assert_msg(err == TOX_ERR_ENCRYPTED_NEW_OK, "failed to encrypted new the third"); |
111 | uint8_t address5[TOX_PUBLIC_KEY_SIZE]; | 111 | uint8_t address5[TOX_PUBLIC_KEY_SIZE]; |
112 | test = tox_friend_get_public_key(tox4, 0, address5, 0); | 112 | test = tox_friend_get_public_key(tox4, 0, address5, 0); |
113 | ck_assert_msg(test == 1, "no friends! the third"); | 113 | ck_assert_msg(test == 1, "no friends! the third"); |