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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user