Is there a way to use the ESP-IDF way of unit testing, to test functions within the main application and not within a component in components folder?
Example:
I would like to unit test a function inside 'add_four.c'
Project structure:
Code: Select all
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 application app_main()
test
main
CMakeLists.txt
main_test.c - test application app_main()
CMakeLists.txt