2 #include <UnitTestRunner.h> 3 #include <CompositeTestRunner.h> 34 TEST_ASSERT(
eq(1, 2));
46 TEST_ASSERT(
eq(2, 6/3));
52 TEST_ADD(
TestA, test1)
53 TEST_ADD(TestA, test2)
54 TEST_ADD(TestA, test3)
68 TEST_ASSERT(
eq(2, 9/3));
74 TEST_ASSERT(
eq(2, 4/2));
80 TEST_ADD(
TestB, test1)
81 TEST_ADD(
TestB, test2)
87 TEST_COMPOSITE_BEGIN(CompositeExample)
88 TEST_COMPOSITE_ADD_UNIT(
TestA)
89 TEST_COMPOSITE_ADD_UNIT(
TestB)
92 CompositeExample runner;
UnitTest is a base class for classes that define unit tests.
void printMethod(const char *methodName)
Write name of a class method, iff ioProcessor.
static bool eq(int s1, int s2)
Return true if two integers are equal.
This example shows how to construct and run a single UnitTest class.