mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Uncommend code fragment and make simple protect from error.
This commit is contained in:
parent
54e75eb0e3
commit
49e32325c4
@ -33,10 +33,15 @@ CVcmiTestConfig::CVcmiTestConfig()
|
||||
loadDLLClasses();
|
||||
logGlobal->info("Initialized global test setup.");
|
||||
|
||||
// These lines make a "Test setup error:"
|
||||
// const std::string TEST_DATA_DIR = "test/";
|
||||
// auto loader = new CFilesystemLoader("test/", TEST_DATA_DIR);
|
||||
// dynamic_cast<CFilesystemList*>(CResourceHandler::get())->addLoader(loader, false);
|
||||
/* TEST_DATA_DIR may be wrong, if yes below test don't run,
|
||||
find your test data folder in your build and change TEST_DATA_DIR for it*/
|
||||
const std::string TEST_DATA_DIR = "test/";
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user