summaryrefslogtreecommitdiff
path: root/auto_tests
diff options
context:
space:
mode:
Diffstat (limited to 'auto_tests')
-rw-r--r--auto_tests/BUILD25
-rw-r--r--auto_tests/helpers.h2
2 files changed, 27 insertions, 0 deletions
diff --git a/auto_tests/BUILD b/auto_tests/BUILD
new file mode 100644
index 00000000..d94442a1
--- /dev/null
+++ b/auto_tests/BUILD
@@ -0,0 +1,25 @@
1cc_library(
2 name = "helpers",
3 testonly = True,
4 hdrs = [
5 "check_compat.h",
6 "helpers.h",
7 ],
8)
9
10[cc_test(
11 name = src[:-2],
12 size = "small",
13 srcs = [src],
14 copts = [
15 "-Wno-parentheses",
16 ],
17 deps = [
18 ":helpers",
19 "//c-toxcore/other:monolith",
20 "//c-toxcore/testing:misc_tools",
21 "//c-toxcore/toxav",
22 "//c-toxcore/toxcore",
23 "@check",
24 ],
25) for src in glob(["*_test.c"])]
diff --git a/auto_tests/helpers.h b/auto_tests/helpers.h
index 745c5d22..373b4a37 100644
--- a/auto_tests/helpers.h
+++ b/auto_tests/helpers.h
@@ -42,6 +42,8 @@ static const char *tox_log_level_name(TOX_LOG_LEVEL level)
42 case TOX_LOG_LEVEL_ERROR: 42 case TOX_LOG_LEVEL_ERROR:
43 return "ERROR"; 43 return "ERROR";
44 } 44 }
45
46 return "<unknown>";
45} 47}
46 48
47static void print_debug_log(Tox *m, TOX_LOG_LEVEL level, const char *path, uint32_t line, const char *func, 49static void print_debug_log(Tox *m, TOX_LOG_LEVEL level, const char *path, uint32_t line, const char *func,