- void test_equal() { CCUNIT_ASSERT(1==0); }
- #include <ccunit/CCUnit.h>
- void test_equal() { CCUNIT_ASSERT(1==0); } /* 必ず失敗するテスト関数 */
- int main()
- {
- CCUnitTestCase* testCase;
- testCase = ccunit_newTestCase ("int equal test");
- ccunit_addNewTestFunc (testCase,
- "test_equal",
- "int value equals test",
- test_equal);
- CCUnitTestResult* result;
- result = ccunit_runTestCase (testCase);
- printf ("Test runs %d. %d tests failed\n",
- ccunit_runCount(result), ccunit_failureCount (result));
- return ccunit_failureCount (result);
- }
- $ gcc -o testEqual testEqual.c -lccunit
Test runs 1. 1 tests failed