Esempio n. 1
0
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; }
    }
}
Esempio n. 2
0
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);
}
Esempio n. 3
0
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; }
	}
}
Esempio n. 4
0
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);
}
Esempio n. 5
0
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; }
	}
}
Esempio n. 6
0
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;
        }
    }
}