Fix tests interdependency.

test_fs_binary_path was previously implicitly relying on test_gui2 to run first and populate additional binary paths.
This commit is contained in:
Pentarctagon 2022-08-03 16:45:38 -05:00 committed by Pentarctagon
parent 8e160c5e07
commit 8fd558f0f1

View file

@ -14,8 +14,11 @@
*/
#include <boost/test/unit_test.hpp>
#include "config_cache.hpp"
#include "filesystem.hpp"
#include "game_config.hpp"
#include "log.hpp"
#if 0
namespace {
@ -141,6 +144,20 @@ BOOST_AUTO_TEST_CASE( test_fs_enum )
BOOST_AUTO_TEST_CASE( test_fs_binary_path )
{
config main_config;
game_config_view game_config_view_ = game_config_view::wrap(main_config);
game_config::config_cache& cache = game_config::config_cache::instance();
cache.clear_defines();
cache.add_define("EDITOR");
cache.add_define("MULTIPLAYER");
cache.get_config(game_config::path +"/data", main_config);
const filesystem::binary_paths_manager bin_paths_manager(game_config_view_);
//load_language_list();
game_config::load_config(main_config.child("game_config"));
BOOST_CHECK_EQUAL( get_binary_dir_location("images", "."), gamedata + "/images/." );
BOOST_CHECK_EQUAL( get_binary_file_location("images", "wesnoth-icon.png"),