有没有办法使用 ESP-IDF 单元测试方式来测试主应用程序中的功能,而不是 components 文件夹中的组件?
示例:
我想对“add_four.c”
项目结构中的函数进行单元测试:
代码:
全选
main
test
CMakeLists.txt
component.mk
test_add_four.c - has TEST_CASE{TEST_ASSERT_EQUAL(9, add_four(5))}
add_four.c
add_four.h
CMakeLists.txt
main.c - main applica
tion app_main()
test
main
CMakeLists.txt
main_test.c - test application app_main()
CMakeLists.txt