mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Uncommend code fragment and make simple protect from error.
This commit is contained in:
@ -33,10 +33,15 @@ CVcmiTestConfig::CVcmiTestConfig()
|
|||||||
loadDLLClasses();
|
loadDLLClasses();
|
||||||
logGlobal->info("Initialized global test setup.");
|
logGlobal->info("Initialized global test setup.");
|
||||||
|
|
||||||
// These lines make a "Test setup error:"
|
/* TEST_DATA_DIR may be wrong, if yes below test don't run,
|
||||||
// const std::string TEST_DATA_DIR = "test/";
|
find your test data folder in your build and change TEST_DATA_DIR for it*/
|
||||||
// auto loader = new CFilesystemLoader("test/", TEST_DATA_DIR);
|
const std::string TEST_DATA_DIR = "test/";
|
||||||
// dynamic_cast<CFilesystemList*>(CResourceHandler::get())->addLoader(loader, false);
|
auto path = boost::filesystem::current_path();
|
||||||
|
path+= "/" + TEST_DATA_DIR;
|
||||||
|
if(boost::filesystem::exists(path)){
|
||||||
|
auto loader = new CFilesystemLoader("test/", TEST_DATA_DIR);
|
||||||
|
dynamic_cast<CFilesystemList*>(CResourceHandler::get())->addLoader(loader, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CVcmiTestConfig::~CVcmiTestConfig()
|
CVcmiTestConfig::~CVcmiTestConfig()
|
||||||
|
Reference in New Issue
Block a user