MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / register_test

Function register_test

bsp/phytium/libraries/drivers_example/auto_test.c:21–30  ·  view source on GitHub ↗

注册测试用例

Source from the content-addressed store, hash-verified

19
20// 注册测试用例
21void register_test(const char* name, TestFunc func) {
22 if (test_count < MAX_TESTS) {
23 test_cases[test_count].name = name;
24 test_cases[test_count].func = func;
25 test_cases[test_count].passed = 0;
26 test_count++;
27 } else {
28 rt_kprintf("Exceeded the maximum number of test cases(%d)\n", MAX_TESTS);
29 }
30}
31
32// 运行所有测试
33void run_all_tests() {

Callers 1

auto_testFunction · 0.85

Calls 1

rt_kprintfFunction · 0.85

Tested by

no test coverage detected