Support for running the testsuite in command line programs for continuous integration.

Here is a small example inspired from SDLmain.c:

g_launcher = new JGameLauncher();
InitGame();
MTGCollection()->loadFolder("sets/primitives/");
MTGCollection()->loadFolder("sets/", "_cards.dat");
options.reloadProfile();
TestSuite testSuite("test/_tests.txt");
int result = testSuite.run();
DestroyGame();
delete g_launcher;
return result;
This commit is contained in:
Xawotihs@gmail.com
2013-10-23 22:08:30 +00:00
parent 98861dd916
commit 1f0485ff8e
6 changed files with 99 additions and 52 deletions

View File

@@ -1097,7 +1097,7 @@ void GameStateDuel::Render()
char buf[4096];
mFont->SetColor(ARGB(255,255,255,255));
int elapsedTime = (testSuite->endTime - testSuite->startTime);
int elapsedTime = testSuite->getElapsedTime();
sprintf(buf, "Time to run the tests: %is", elapsedTime/1000);
mFont->DrawString(buf,0,SCREEN_HEIGHT/2 - 20);