diff options
author | David Phillips <david@yeah.nah.nz> | 2021-02-27 20:31:17 +1300 |
---|---|---|
committer | David Phillips <david@yeah.nah.nz> | 2021-02-27 20:32:40 +1300 |
commit | e843e9da835f058e09810cfeba7c60d0b270e7b3 (patch) | |
tree | 37345174f2d1e6741da4016267ec27c5139b50c3 /test_runner.h | |
parent | d84f7a93151aad059d6780362dea1776ff8ea358 (diff) | |
download | altimeter-e843e9da835f058e09810cfeba7c60d0b270e7b3.tar.xz |
Move unity-test-runner to submodule
Diffstat (limited to 'test_runner.h')
-rw-r--r-- | test_runner.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/test_runner.h b/test_runner.h deleted file mode 100644 index 5b891b0..0000000 --- a/test_runner.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -/* Linker-generated lists derived from U-Boot source `include/linker_lists.h` - * with minor modification to store function pointers */ -#define list_head(entry_type, list_name) \ - ({ static char head[0] __attribute__((__aligned__(4), unused, section(".test_runner_list_2_"#list_name"_1")));(entry_type*)&head; }) - -#define list_tail(entry_type, list_name) \ - ({ static char tail[0] __attribute__((__aligned__(4), unused, section(".test_runner_list_2_"#list_name"_3")));(entry_type*)&tail; }) - -#define list_entry_count(entry_type, list_name) \ - ({ \ - entry_type* head = list_head(entry_type, list_name); \ - entry_type* tail = list_tail(entry_type, list_name); \ - (size_t)(tail - head); \ - }) - -#define list_entry(entry_type, list_name, entry_name) \ - entry_type _test_runner_list_2_##list_name_2_##entry_name __attribute__((__aligned__(4), unused, section(".test_runner_list_2_"#list_name"_2_"#entry_name))) - -#define RUNNER_DECLARE_TEST(test_name) \ - void test_name(void);\ - list_entry(struct test_fn, test_list, test_name) = { .name = #test_name, .file = __FILE__, .line = __LINE__, .fn = test_name}; \ - void test_name(void) - -struct test_fn { - const char *name; - const char *file; - int line; - void (*fn)(); -}; - |