cutest/AllTests.c

27 lines
467 B
C
Raw Normal View History

2012-05-13 16:35:52 +00:00
#include <stdio.h>
#include "CuTest.h"
CuSuite* CuGetSuite(void);
CuSuite* CuStringGetSuite(void);
2012-05-13 16:35:52 +00:00
2012-06-03 06:59:41 +00:00
int RunAllTests(void)
2012-05-13 16:35:52 +00:00
{
CuString *output = CuStringNew();
CuSuite* suite = CuSuiteNew();
CuSuiteAddSuite(suite, CuGetSuite());
CuSuiteAddSuite(suite, CuStringGetSuite());
CuSuiteRun(suite);
CuSuiteSummary(suite, output);
CuSuiteDetails(suite, output);
printf("%s\n", output->buffer);
2012-06-03 06:59:41 +00:00
return suite->failCount;
2012-05-13 16:35:52 +00:00
}
int main(void)
{
2012-06-03 06:59:41 +00:00
return RunAllTests();
2012-05-13 16:35:52 +00:00
}