Exemplo n.º 1
0
CuTest* CuTestNew(const char* name, TestFunction function, TestSetupFunction setup, TestTeardownFunction teardown)
{
	CuTest* tc = CU_ALLOC(CuTest);
	if (tc != NULL)
		CuTestInit(tc, name, function, setup, teardown);
	else
		fprintf(stderr, "%s: %s%s\n", CU_FAIL_HEADER,
		    "Error initializing test case: ", name);
	return tc;
}
Exemplo n.º 2
0
CuSuite* CuSuiteNew(const char *name,
    SuiteSetupFunction setup, SuiteTeardownFunction teardown)
{
	CuSuite* testSuite = CU_ALLOC(CuSuite);
	if (testSuite != NULL)
		CuSuiteInit(testSuite, name, setup, teardown);
	else
		fprintf(stderr, "%s: %s%s\n", CU_FAIL_HEADER,
		    "Error initializing test suite: ", name);
	return testSuite;
}
Exemplo n.º 3
0
void CuSuiteAddSuite(CuSuite* testSuite, CuSuite* testSuite2)
{
	int i;
	for (i = 0 ; i < testSuite2->count ; ++i)
	{
		CuTest* testCase = testSuite2->list[i];
		CuTest* newTest = CU_ALLOC(CuTest);
		CuTestInit(newTest, testCase->name, testCase->function);
		CuSuiteAdd(testSuite, newTest);
	}
}
Exemplo n.º 4
0
CuSuite* CuSuiteNew(void)
{
    CuSuite* testSuite = CU_ALLOC(CuSuite);
    CuSuiteInit(testSuite);
    return testSuite;
}
Exemplo n.º 5
0
CuTest* CuTestNew(const char* name, TestFunction function)
{
    CuTest* tc = CU_ALLOC(CuTest);
    CuTestInit(tc, name, function);
    return tc;
}
Exemplo n.º 6
0
Arquivo: CuTest.c Projeto: jacwah/ftag
CuTest* CuTestCopy(CuTest* t)
{
	CuTest* copy = CU_ALLOC(CuTest);
	memcpy(copy, t, sizeof(CuTest));
	return copy;
}
Exemplo n.º 7
0
CuSuite* CuSuiteNew(char* name)
{
	CuSuite* testSuite = CU_ALLOC(CuSuite);
	CuSuiteInit(testSuite, name);
	return testSuite;
}