summaryrefslogtreecommitdiff
path: root/auto_tests/file_saving_test.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-18 17:50:50 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-18 21:32:28 +0000
commit3dc8cf6df8b80f213526884cafbbd493486366e5 (patch)
tree553b36ecd451c72ad85c7782ebbfd6a3ae41aaa7 /auto_tests/file_saving_test.c
parentd016eb3f0e808ce4b4736b5056bcd3daf9514f99 (diff)
Disable lan discovery in most tests.
Diffstat (limited to 'auto_tests/file_saving_test.c')
-rw-r--r--auto_tests/file_saving_test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/auto_tests/file_saving_test.c b/auto_tests/file_saving_test.c
index 5ed74c9f..11c81ad2 100644
--- a/auto_tests/file_saving_test.c
+++ b/auto_tests/file_saving_test.c
@@ -27,17 +27,16 @@
27#include <stdlib.h> 27#include <stdlib.h>
28#include <string.h> 28#include <string.h>
29 29
30#include "../toxcore/tox.h" 30#include "helpers.h"
31#include "../toxencryptsave/toxencryptsave.h"
32 31
33#include "../toxcore/ccompat.h" 32#include "../toxencryptsave/toxencryptsave.h"
34 33
35static const char *pphrase = "bar", *name = "foo", *savefile = "./save"; 34static const char *pphrase = "bar", *name = "foo", *savefile = "./save";
36 35
37static void save_data_encrypted(void) 36static void save_data_encrypted(void)
38{ 37{
39 struct Tox_Options *options = tox_options_new(nullptr); 38 struct Tox_Options *options = tox_options_new(nullptr);
40 Tox *t = tox_new(options, nullptr); 39 Tox *t = tox_new_log(options, nullptr, nullptr);
41 tox_options_free(options); 40 tox_options_free(options);
42 41
43 tox_self_set_name(t, (const uint8_t *)name, strlen(name), nullptr); 42 tox_self_set_name(t, (const uint8_t *)name, strlen(name), nullptr);
@@ -97,7 +96,7 @@ static void load_data_decrypted(void)
97 96
98 TOX_ERR_NEW err; 97 TOX_ERR_NEW err;
99 98
100 Tox *t = tox_new(options, &err); 99 Tox *t = tox_new_log(options, &err, nullptr);
101 100
102 tox_options_free(options); 101 tox_options_free(options);
103 102
@@ -123,6 +122,7 @@ static void load_data_decrypted(void)
123 122
124int main(void) 123int main(void)
125{ 124{
125 setvbuf(stdout, nullptr, _IONBF, 0);
126 save_data_encrypted(); 126 save_data_encrypted();
127 load_data_decrypted(); 127 load_data_decrypted();
128 128