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);
85 SDL_Init(SDL_INIT_TIMER);
95 if(runtime_config::get<log_level>(runtime_config::btrt_log_level) == invalid_log_level)
96 unit_test_log.set_threshold_level(log_messages);
97 if(runtime_config::get<report_level>(runtime_config::btrt_report_level) == INV_REPORT_LEVEL)
game_display & get_fake_display(const int width, const int height)
Gets a fake test display.
~wesnoth_global_fixture()
Definitions for the interface to Wesnoth Markup Language (WML).
BOOST_GLOBAL_FIXTURE(wesnoth_global_fixture)
void init()
Initializes the GUI subsystems.
void set_level(const std::string &value)
static map_location::DIRECTION s
Declarations for File-IO.
Base class for all the errors encountered by the engine.
Standard logging facilities (interface).
static void exception_translator_game(const game::error &e)
static void exception_translator_config(const config::error &e)