- Include
test_runner.hin your code; - Write tests, using macro ASSERT_EQUAL like:
void TestSum() {
int i = 4;
ASSERT_EQUAL (i,sum(2,3));
}
- When u wrote tests, write function
TestAll, create objectTestRunnerand add your test function (usingRUN_TESTmacro)
void TestAll {
TestRunner tr;
RUN_TEST(tr,<TestFunc1>);
RUN_TEST(tr,<TestFunc2>);
..
}
- input
TestAllfunc in main file code;