Show warning when a testfile could not be located

TODO: Would throwing an exception instead break
something?
This commit is contained in:
Martchus 2017-03-12 20:25:06 +01:00
parent 78869da195
commit 52a76a7bd2
1 changed files with 7 additions and 1 deletions

View File

@ -157,7 +157,13 @@ string TestApplication::testFilePath(const string &name) const
}
// file still not found -> return default path
return "./testfiles/" + name;
path = "./testfiles/" + name;
file.clear();
file.open(path = m_testFilesPathEnvValue + name, ios_base::in);
if(!file.good()) {
cerr << "Warning: The testfile \"" << path << "\" can not be located." << endl;
}
return path;
}
#ifdef PLATFORM_UNIX