Testing
Create a new directory in the test directory with the name of your test
Name the directory 'test_' and add a file called 'test_/main.cpp'
Add the following code to the main.cpp file:
void test_example() {
TEST_ASSERT_EQUAL(1, 1);
}
int runUnityTests() {
UNITY_BEGIN();
RUN_TEST(test_example);
return UNITY_END();
}
int main(void) { return runUnityTests(); }
Inside of the directory 'test_', you can create files which support your tests.
You may also import files from '../../src' to use in your tests.
Last updated