fixup test utils to accomodate recent test directory change
Previously, the C++ unit tests which used the test utils game config manager object would load things in /data/test/, and not all of /data/. Presumably this was for efficiency of the C++ unit tests. I didn't realize this when working on the wml unit tests branch. In that branch, I added all of the WML unit test macros and scenarios to data/test/, and found that I couldn't load them, since /data/_main.cfg had the {/test/_main.cfg} line commented out. I uncommented this and made some other changes in /data/test/ so that loading wml unit tests would work. However, it made the C++ unit tests not happy. This change makes them not create errors, but it also includes all of core when they run, which may not have been intended, although I don't see that it causes problems. I may fix this all up soon, by making a different environment for C++ and WML unit tests. (In fact this already existed, and I have now destroyed the distinction.) Putting WML tests in their own directory different from the C++ tests may be the simplest fix, that will preserve the environment of the old C++ tests while giving a more complete environment where the WML unit tests may run.
This commit is contained in:
parent
e127cd51d4
commit
cc138a4ed9
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ namespace test_utils {
|
|||
gui2::init();
|
||||
load_language_list();
|
||||
game_config::config_cache::instance().add_define("TEST");
|
||||
game_config::config_cache::instance().get_config(game_config::path + "/data/test/", cfg_);
|
||||
game_config::config_cache::instance().get_config(game_config::path + "/data/", cfg_);
|
||||
::init_textdomains(cfg_);
|
||||
const std::vector<language_def>& languages = get_languages();
|
||||
std::vector<language_def>::const_iterator English = std::find_if(languages.begin(),
|
||||
|
|
Loading…
Add table
Reference in a new issue