diff options
Diffstat (limited to 'testsuite/tests/rts/InitEventLogging_c.c')
-rw-r--r-- | testsuite/tests/rts/InitEventLogging_c.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/tests/rts/InitEventLogging_c.c b/testsuite/tests/rts/InitEventLogging_c.c new file mode 100644 index 0000000000..47e4520fc4 --- /dev/null +++ b/testsuite/tests/rts/InitEventLogging_c.c @@ -0,0 +1,33 @@ +#include <stdio.h> +#include <Rts.h> + +void test_init(void) { + printf("init\n"); +} + +bool test_write(void *eventlog, size_t eventlog_size) { + printf("write\n"); + return true; +} + +void test_flush(void) { + printf("flush\n"); +} + +void test_stop(void) { + printf("stop\n"); +} + +const EventLogWriter writer = { + .initEventLogWriter = test_init, + .writeEventLog = test_write, + .flushEventLog = test_flush, + .stopEventLogWriter = test_stop +}; + +void init_eventlog(void) { + if (!startEventLogging(&writer)) { + printf("failed to start eventlog\n"); + } +} + |