diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-16 22:46:02 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-21 20:44:26 +0000 |
commit | 7245ac11ef9be2420c8356c12acc79f93ea211bb (patch) | |
tree | e971c5c6e10c2310afe4b2cd80212feac9839f2a /auto_tests/file_saving_test.c | |
parent | 7c2b95ef5e4ccdae01bd104aa7400294c9ea391b (diff) |
Avoid implementations in .h files or #including .c files.
Also, avoid the need for putting `_XOPEN_SOURCE` in every test file.
Diffstat (limited to 'auto_tests/file_saving_test.c')
-rw-r--r-- | auto_tests/file_saving_test.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/auto_tests/file_saving_test.c b/auto_tests/file_saving_test.c index 23a4c701..0f27f1d6 100644 --- a/auto_tests/file_saving_test.c +++ b/auto_tests/file_saving_test.c | |||
@@ -23,15 +23,21 @@ | |||
23 | * along with Tox. If not, see <http://www.gnu.org/licenses/>. | 23 | * along with Tox. If not, see <http://www.gnu.org/licenses/>. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #ifdef HAVE_CONFIG_H | ||
27 | #include "config.h" | ||
28 | #endif | ||
29 | |||
26 | #include <stdio.h> | 30 | #include <stdio.h> |
27 | #include <stdlib.h> | 31 | #include <stdlib.h> |
28 | #include <string.h> | 32 | #include <string.h> |
29 | 33 | ||
30 | #include "helpers.h" | 34 | #include "../testing/misc_tools.h" |
31 | 35 | #include "../toxcore/ccompat.h" | |
32 | #include "../toxencryptsave/toxencryptsave.h" | 36 | #include "../toxencryptsave/toxencryptsave.h" |
33 | 37 | ||
34 | static const char *pphrase = "bar", *name = "foo", *savefile = "./save"; | 38 | static const char *pphrase = "bar"; |
39 | static const char *name = "foo"; | ||
40 | static const char *savefile = "./save"; | ||
35 | 41 | ||
36 | static void save_data_encrypted(void) | 42 | static void save_data_encrypted(void) |
37 | { | 43 | { |