注册测试用例
| 19 | |
| 20 | // 注册测试用例 |
| 21 | void 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 | // 运行所有测试 |
| 33 | void run_all_tests() { |
no test coverage detected