Unity / Unit Test app
Posted: Wed Aug 09, 2023 10:01 am
Hi there,
i am trying to implement unit tests for my project. Therefore i found the following documentations:
https://docs.espressif.com/projects/esp ... tests.html
https://github.com/espressif/esp-idf/tr ... t-test-app
https://github.com/espressif/esp-idf/tr ... /unit_test
I tried every way (directly via unity and via the unit test app) but couln't get it to work unfortunately.
It gets so far that the project builds, flashes and the test menu of the unit test app shows up, but it doesn't show the test cases i included into the test subdirectory of the component i want to test. There it shows the following error for when i try to implement a test case in the following way:
Error:
"expected a type specifier" for both of the arguments ("test name" and "[fails]")
Does someone know what could be wrong so it doesn't take those two arguments?
Thanks!
i am trying to implement unit tests for my project. Therefore i found the following documentations:
https://docs.espressif.com/projects/esp ... tests.html
https://github.com/espressif/esp-idf/tr ... t-test-app
https://github.com/espressif/esp-idf/tr ... /unit_test
I tried every way (directly via unity and via the unit test app) but couln't get it to work unfortunately.
It gets so far that the project builds, flashes and the test menu of the unit test app shows up, but it doesn't show the test cases i included into the test subdirectory of the component i want to test. There it shows the following error for when i try to implement a test case in the following way:
Code: Select all
#include <limits.h>
#include "unity.h"
TEST_CASE("test name", "[fails]")
{
TEST_ASSERT_EQUAL(1, 1);
}
"expected a type specifier" for both of the arguments ("test name" and "[fails]")
Does someone know what could be wrong so it doesn't take those two arguments?
Thanks!