void CuSuiteRun(CuSuite *testSuite) { int i; for (i = 0; i < testSuite->count; ++i) { CuTest *testCase = testSuite->list[i]; CuTestRun(testCase); if (testCase->failed) { testSuite->failCount += 1; } } }
void TestCuTestRun(CuTest* tc) { CuTest tc2; CuTestInit(&tc2, "MyTest", zTestFails); CuTestRun(&tc2); CuAssertStrEquals(tc, "MyTest", tc2.name); CuAssertTrue(tc, tc2.failed); CuAssertTrue(tc, tc2.ran); CompareAsserts(tc, "TestRun failed", "test should fail", tc2.message); }
void CuSuiteRun(CuSuite* testSuite) { int i; for (i = 0 ; i < testSuite->count ; ++i) { CuTest* testCase = testSuite->list[i]; printf("Running test case %s\n", testCase->name); CuTestRun(testCase); if (testCase->failed) { testSuite->failCount += 1; } } }
void CuSuiteRun(CuSuite* testSuite) { printf("============Enter TestSuit [%s]============\n", testSuite->name); int i; for (i = 0 ; i < testSuite->count ; ++i) { CuTest* testCase = testSuite->list[i]; CuTestRun(testCase); if (testCase->failed) { testSuite->failCount += 1; } } printf("============Leave TestSuit [%s]============\n\n", testSuite->name); }
void CuSuiteRun(CuSuite* testSuite) { int i; for (i = 0 ; i < testSuite->count ; ++i) { CuTest* testCase = testSuite->list[i]; if (testSuite->SuiteSetup != NULL) (testSuite->SuiteSetup)(testSuite); CuTestRun(testCase); if (testSuite->SuiteTeardown != NULL) (testSuite->SuiteTeardown)(testSuite); if (testCase->failed) { testSuite->failCount += 1; } } }
void CuSuiteRun(CuSuite* testSuite) { int i; int abortTests = 0; for (i = 0 ; i < testSuite->count && !abortTests ; ++i) { CuTest* testCase = testSuite->list[i]; CuTestRun(testCase); if (cuPreferences.progressCallback) abortTests = !cuPreferences.progressCallback(testCase, testSuite->count, i); if (testCase->failed) { testSuite->failCount += 1; } } }