aboutsummaryrefslogtreecommitdiff
path: root/tests/test_common/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_common/main.cpp')
-rw-r--r--tests/test_common/main.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/test_common/main.cpp b/tests/test_common/main.cpp
new file mode 100644
index 000000000..3e4b4c0f9
--- /dev/null
+++ b/tests/test_common/main.cpp
@@ -0,0 +1,32 @@
1#include "gtest/gtest.h"
2
3extern "C" {
4#include "stdio.h"
5#include "debug.h"
6
7int8_t sendchar(uint8_t c) {
8 fprintf(stderr, "%c", c);
9 return 0;
10}
11
12__attribute__((weak)) debug_config_t debug_config = {0};
13
14void init_logging(void) {
15 print_set_sendchar(sendchar);
16
17 // Customise these values to desired behaviour
18 // debug_enable = true;
19 // debug_matrix = true;
20 // debug_keyboard = true;
21 // debug_mouse = true;
22 debug_config.raw = 0xFF;
23}
24}
25
26int main(int argc, char **argv) {
27 ::testing::InitGoogleTest(&argc, argv);
28
29 init_logging();
30
31 return RUN_ALL_TESTS();
32} \ No newline at end of file