15 #define GETTEXT_DOMAIN "wesnoth-test"
18 #define BOOST_TEST_MODULE wesnoth unit tests master suite
20 #ifndef BOOST_TEST_DYN_LINK
21 #error Compiler misconfiguration - must define BOOST_TEST_DYN_LINK
24 #include <boost/version.hpp>
26 #include <boost/test/unit_test.hpp>
27 #include <boost/test/unit_test_monitor.hpp>
28 #if BOOST_VERSION >= 106000
29 #include <boost/test/unit_test_parameters.hpp>
31 #include <boost/test/detail/unit_test_parameters.hpp>
33 #include <boost/test/results_reporter.hpp>
57 throw "config:error: " + e.
message;
62 throw "network::error: " + e.
message;
69 throw "game::error: " + e.
message;
77 reporter.open(
"boost_test_result.xml");
80 boost::unit_test::results_reporter::set_stream(
reporter);
86 SDL_Init(SDL_INIT_TIMER);
95 #if BOOST_VERSION >= 106000
96 if (boost::unit_test::runtime_config::get<boost::unit_test::log_level>(boost::unit_test::runtime_config::LOG_LEVEL) == boost::unit_test::invalid_log_level)
97 boost::unit_test::unit_test_log.set_threshold_level( boost::unit_test::log_messages );
98 if (boost::unit_test::runtime_config::get<boost::unit_test::report_level>(boost::unit_test::runtime_config::REPORT_LEVEL) == boost::unit_test::INV_REPORT_LEVEL)
104 if (boost::unit_test::runtime_config::log_level() == boost::unit_test::invalid_log_level)
105 boost::unit_test::unit_test_log.set_threshold_level( boost::unit_test::log_messages );
106 if (boost::unit_test::runtime_config::report_level() == boost::unit_test::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)
static void exception_translator_network(const network::error &e)
bool init()
Initializes the gui subsystems.
void set_level(const std::string &value)
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)