test: 登记 unit.pointer 套件(414 行)并给测试框架补函数指针非空断言
- 新宏 TF_CHECK_FN_NOT_NULL:ISO C 禁止函数指针与对象指针互转,原 TF_CHECK_NOT_NULL 在 -Wpedantic 下无法用于 HAL 后端函数指针断言;测试里 8 处改为新宏 - tests/test_runner.c 补 unit.pointer 表项(此前只加了声明,导致 ctest 报"未找到套件") - ctest 9/9 通过
This commit is contained in:
1 parent
4b4b24ca4a
commit
582b7d19bf
4 files changed
+422
-3
No files matched your search
+4
-2
@@ -121,7 +121,8 @@ if(SHS_BUILD_TESTS)
|
||||
tests/unit/test_loop.c
|
||||
tests/unit/test_bitops.c
|
||||
tests/unit/test_errors.c
|
||||
tests/unit/test_file.c)
|
||||
tests/unit/test_file.c
|
||||
tests/unit/test_pointer.c)
|
||||
|
||||
add_executable(shs_tests ${SHS_TEST_SOURCES})
|
||||
target_link_libraries(shs_tests PRIVATE shs_core shs_warnings)
|
||||
@@ -135,7 +136,8 @@ if(SHS_BUILD_TESTS)
|
||||
unit.loop
|
||||
unit.bitops
|
||||
unit.errors
|
||||
unit.file)
|
||||
unit.file
|
||||
unit.pointer)
|
||||
foreach(suite IN LISTS SHS_TEST_SUITES)
|
||||
add_test(NAME ${suite} COMMAND shs_tests --suite ${suite})
|
||||
endforeach()
|
||||
|
||||
Reference in new issue
Block a user