16 #define GETTEXT_DOMAIN "wesnoth-test"
19 #define BOOST_TEST_MODULE wesnoth unit tests master suite
21 #ifndef BOOST_TEST_DYN_LINK
22 #error Compiler misconfiguration - must define BOOST_TEST_DYN_LINK
25 #include <boost/test/unit_test.hpp>
26 #include <boost/test/unit_test_monitor.hpp>
27 #include <boost/test/unit_test_parameters.hpp>
28 #include <boost/test/results_reporter.hpp>
29 #include <boost/filesystem/path.hpp>
51 throw "config:error: " +
e.message;
56 throw "game::error: " +
e.message;
64 using namespace boost::unit_test;
65 using namespace std::literals;
67 for(
int i = 1;
i < framework::master_test_suite().argc;
i++) {
68 if(framework::master_test_suite().argv[
i - 1] ==
"--output_file"s) {
69 file = framework::master_test_suite().argv[
i];
77 results_reporter::set_stream(
reporter);
86 SDL_Init(SDL_INIT_TIMER);
97 if(runtime_config::get<log_level>(runtime_config::btrt_log_level) == invalid_log_level)
98 unit_test_log.set_threshold_level(log_messages);
99 if(runtime_config::get<report_level>(runtime_config::btrt_report_level) == INV_REPORT_LEVEL)
100 results_reporter::set_level(SHORT_REPORT);
Definitions for the interface to Wesnoth Markup Language (WML).
Declarations for File-IO.
Standard logging facilities (interface).
static void exception_translator_game(const game::error &e)
static void exception_translator_config(const config::error &e)
BOOST_GLOBAL_FIXTURE(wesnoth_global_fixture)
void set_user_data_dir(std::string newprefdir)
void init()
Initializes the GUI subsystems.
void switch_theme(const std::string ¤t_theme)
Set and activate the given gui2 theme.
game_display & get_fake_display(const int width, const int height)
Gets a fake test display.
Base class for all the errors encountered by the engine.
~wesnoth_global_fixture()
static map_location::direction s