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 /testing/misc_tools.h | |
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 'testing/misc_tools.h')
-rw-r--r-- | testing/misc_tools.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/misc_tools.h b/testing/misc_tools.h new file mode 100644 index 00000000..deaa177d --- /dev/null +++ b/testing/misc_tools.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef C_TOXCORE_TESTING_MISC_TOOLS_H | ||
2 | #define C_TOXCORE_TESTING_MISC_TOOLS_H | ||
3 | |||
4 | #include "../toxcore/tox.h" | ||
5 | |||
6 | #ifdef __cplusplus | ||
7 | extern "C" { | ||
8 | #endif | ||
9 | |||
10 | // Amount of time in milliseconds to wait between tox_iterate calls. | ||
11 | #define ITERATION_INTERVAL 200 | ||
12 | |||
13 | void c_sleep(uint32_t x); | ||
14 | |||
15 | uint8_t *hex_string_to_bin(const char *hex_string); | ||
16 | int tox_strncasecmp(const char *s1, const char *s2, size_t n); | ||
17 | int cmdline_parsefor_ipv46(int argc, char **argv, uint8_t *ipv6enabled); | ||
18 | |||
19 | void print_debug_log(Tox *m, TOX_LOG_LEVEL level, const char *file, uint32_t line, const char *func, | ||
20 | const char *message, void *user_data); | ||
21 | |||
22 | Tox *tox_new_log(struct Tox_Options *options, TOX_ERR_NEW *err, void *log_user_data); | ||
23 | Tox *tox_new_log_lan(struct Tox_Options *options, TOX_ERR_NEW *err, void *log_user_data, bool lan_discovery); | ||
24 | |||
25 | #ifdef __cplusplus | ||
26 | } | ||
27 | #endif | ||
28 | |||
29 | #endif | ||