Refactoring the TestCaseInit and TestCaseQuit functions

to be caller from the Runner.
This commit is contained in:
Markus Kauppila 2011-06-04 17:50:23 +03:00
parent 450610b7c7
commit 1b21c6547d
7 changed files with 110 additions and 51 deletions

View file

@ -1,6 +1,6 @@
lib_LTLIBRARIES = libtest.la
libtest_la_SOURCES = test.c ../SDL_test.c
libtest_la_CLAGS = -fPIC -g
libtest_la_CLAGS = -fPIC -g
libtest_la_LDFLAGS = `sdl-config --libs`
distclean-local:

View file

@ -48,36 +48,25 @@ TestCaseReference **QueryTestSuite() {
}
/* Test case functions */
int hello(void *arg)
void hello(void *arg)
{
TestCaseInit();
const char *revision = SDL_GetRevision();
printf("Revision is %s\n", revision);
AssertEquals(3, 5, "fails");
return TestCaseQuit();
AssertEquals(3, 5, "fails");
}
int hello2(void *arg)
void hello2(void *arg)
{
TestCaseInit();
char *msg = "eello";
//msg[0] = 'H';
return TestCaseQuit();
AssertTrue(0, "fails");
}
int hello3(void *arg)
void hello3(void *arg)
{
TestCaseInit();
printf("hello3\n");
AssertEquals(3, 3, "passes");
return TestCaseQuit();
AssertTrue(1, "passes");
}
#endif