summaryrefslogtreecommitdiff
path: root/auto_tests
diff options
context:
space:
mode:
Diffstat (limited to 'auto_tests')
-rw-r--r--auto_tests/messenger_test.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c
index 5c8e242e..0393e6d9 100644
--- a/auto_tests/messenger_test.c
+++ b/auto_tests/messenger_test.c
@@ -14,6 +14,7 @@
14#include "config.h" 14#include "config.h"
15#endif 15#endif
16 16
17#include "../testing/misc_tools.c" // hex_string_to_bin
17#include "../toxcore/Messenger.h" 18#include "../toxcore/Messenger.h"
18#include "../toxcore/Lossless_UDP.h" 19#include "../toxcore/Lossless_UDP.h"
19#include <sys/types.h> 20#include <sys/types.h>
@@ -41,18 +42,6 @@ int friend_id_num = 0;
41 42
42Messenger *m; 43Messenger *m;
43 44
44unsigned char *hex_string_to_bin(char hex_string[])
45{
46 size_t i, len = strlen(hex_string);
47 unsigned char *val = calloc(1, len);
48 char *pos = hex_string;
49
50 for (i = 0; i < len; ++i, pos += 2)
51 sscanf(pos, "%2hhx", &val[i]);
52
53 return val;
54}
55
56START_TEST(test_m_sendmesage) 45START_TEST(test_m_sendmesage)
57{ 46{
58 char *message = "h-hi :3"; 47 char *message = "h-hi :3";