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:
@@ -125,6 +125,8 @@ public:
|
||||
#endif
|
||||
|
||||
MTGCard * getCardByName(string name);
|
||||
void loadFolder(const string& folder, const string& filename="" );
|
||||
|
||||
int load(const char * config_file, const char * setName = NULL, int autoload = 1);
|
||||
int countByType(const char * _type);
|
||||
int countByColor(int color);
|
||||
@@ -181,9 +183,8 @@ public:
|
||||
return instance->subtypesList.find(value,false);
|
||||
}
|
||||
|
||||
static void loadInstance();
|
||||
static void unloadAll();
|
||||
static inline MTGAllCards* getInstance() { return instance; };
|
||||
static MTGAllCards* getInstance();
|
||||
|
||||
private:
|
||||
boost::mutex mMutex;
|
||||
|
||||
Reference in New Issue
Block a user