The Battle for Wesnoth  1.15.1+dev
Classes | Macros | Typedefs | Functions
test_config_cache.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "config_cache.hpp"
#include "config.hpp"
#include "game_config.hpp"
#include "language.hpp"
#include "game_version.hpp"
#include "tests/utils/game_config_manager_tests.hpp"
#include "utils/functional.hpp"
Include dependency graph for test_config_cache.cpp:

Go to the source code of this file.

Classes

class  test_config_cache
 Used to make distinct singleton for testing it because other tests will need original one to load data. More...
 
struct  config_cache_fixture
 

Macros

#define GETTEXT_DOMAIN   "wesnoth-test"
 

Typedefs

typedef game_config::scoped_preproc_define_internal< test_config_cachetest_scoped_define
 Used to redirect defines settings to test cache. More...
 

Functions

static preproc_map setup_test_preproc_map ()
 
 BOOST_AUTO_TEST_CASE (test_preproc_defines)
 
 BOOST_AUTO_TEST_CASE (test_config_cache_defaults)
 
const std::string test_data_path ("data/test/test/_main.cfg")
 
static config setup_test_config ()
 
 BOOST_AUTO_TEST_CASE (test_load_config)
 
 BOOST_AUTO_TEST_CASE (test_non_clean_config_loading)
 
 BOOST_AUTO_TEST_CASE (test_macrosubstitution)
 
 BOOST_AUTO_TEST_CASE (test_transaction)
 
 BOOST_AUTO_TEST_CASE (test_define_loading)
 
 BOOST_AUTO_TEST_CASE (test_lead_spaces_loading)
 

Macro Definition Documentation

◆ GETTEXT_DOMAIN

#define GETTEXT_DOMAIN   "wesnoth-test"

Definition at line 17 of file test_config_cache.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and setup_test_config().

Typedef Documentation

◆ test_scoped_define

Used to redirect defines settings to test cache.

Definition at line 70 of file test_config_cache.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/8]

BOOST_AUTO_TEST_CASE ( test_preproc_defines  )

◆ BOOST_AUTO_TEST_CASE() [2/8]

BOOST_AUTO_TEST_CASE ( test_config_cache_defaults  )

◆ BOOST_AUTO_TEST_CASE() [3/8]

BOOST_AUTO_TEST_CASE ( test_load_config  )

◆ BOOST_AUTO_TEST_CASE() [4/8]

BOOST_AUTO_TEST_CASE ( test_non_clean_config_loading  )

◆ BOOST_AUTO_TEST_CASE() [5/8]

BOOST_AUTO_TEST_CASE ( test_macrosubstitution  )

◆ BOOST_AUTO_TEST_CASE() [6/8]

BOOST_AUTO_TEST_CASE ( test_transaction  )

◆ BOOST_AUTO_TEST_CASE() [7/8]

BOOST_AUTO_TEST_CASE ( test_define_loading  )

◆ BOOST_AUTO_TEST_CASE() [8/8]

BOOST_AUTO_TEST_CASE ( test_lead_spaces_loading  )

◆ setup_test_config()

static config setup_test_config ( )
static

Definition at line 138 of file test_config_cache.cpp.

References config::add_child(), and GETTEXT_DOMAIN.

Referenced by BOOST_AUTO_TEST_CASE().

◆ setup_test_preproc_map()

static preproc_map setup_test_preproc_map ( )
static

Definition at line 31 of file test_config_cache.cpp.

References game_config::wesnoth_version.

Referenced by BOOST_AUTO_TEST_CASE().

◆ test_data_path()

const std::string test_data_path ( "data/test/test/_main.cfg"  )

Referenced by BOOST_AUTO_TEST_CASE().