Lines Matching refs:testSuite

261 void CuSuiteInit(CuSuite* testSuite)  in CuSuiteInit()  argument
263 testSuite->count = 0; in CuSuiteInit()
264 testSuite->failCount = 0; in CuSuiteInit()
265 memset(testSuite->list, 0, sizeof(testSuite->list)); in CuSuiteInit()
270 CuSuite* testSuite = CU_ALLOC(CuSuite); in CuSuiteNew() local
271 CuSuiteInit(testSuite); in CuSuiteNew()
272 return testSuite; in CuSuiteNew()
275 void CuSuiteDelete(CuSuite *testSuite) in CuSuiteDelete() argument
280 if (testSuite->list[n]) in CuSuiteDelete()
282 CuTestDelete(testSuite->list[n]); in CuSuiteDelete()
285 free(testSuite); in CuSuiteDelete()
289 void CuSuiteAdd(CuSuite* testSuite, CuTest *testCase) in CuSuiteAdd() argument
291 assert(testSuite->count < MAX_TEST_CASES); in CuSuiteAdd()
292 testSuite->list[testSuite->count] = testCase; in CuSuiteAdd()
293 testSuite->count++; in CuSuiteAdd()
296 void CuSuiteAddSuite(CuSuite* testSuite, CuSuite* testSuite2) in CuSuiteAddSuite() argument
302 CuSuiteAdd(testSuite, testCase); in CuSuiteAddSuite()
306 void CuSuiteRun(CuSuite* testSuite) in CuSuiteRun() argument
309 for (i = 0 ; i < testSuite->count ; ++i) in CuSuiteRun()
311 CuTest* testCase = testSuite->list[i]; in CuSuiteRun()
313 if (testCase->failed) { testSuite->failCount += 1; } in CuSuiteRun()
317 void CuSuiteSummary(CuSuite* testSuite, CuString* summary) in CuSuiteSummary() argument
320 for (i = 0 ; i < testSuite->count ; ++i) in CuSuiteSummary()
322 CuTest* testCase = testSuite->list[i]; in CuSuiteSummary()
328 void CuSuiteDetails(CuSuite* testSuite, CuString* details) in CuSuiteDetails() argument
333 if (testSuite->failCount == 0) in CuSuiteDetails()
335 int passCount = testSuite->count - testSuite->failCount; in CuSuiteDetails()
341 if (testSuite->failCount == 1) in CuSuiteDetails()
344 CuStringAppendFormat(details, "There were %d failures:\n", testSuite->failCount); in CuSuiteDetails()
346 for (i = 0 ; i < testSuite->count ; ++i) in CuSuiteDetails()
348 CuTest* testCase = testSuite->list[i]; in CuSuiteDetails()
358 CuStringAppendFormat(details, "Runs: %d ", testSuite->count); in CuSuiteDetails()
359 CuStringAppendFormat(details, "Passes: %d ", testSuite->count - testSuite->failCount); in CuSuiteDetails()
360 CuStringAppendFormat(details, "Fails: %d\n", testSuite->failCount); in CuSuiteDetails()