15 #define GETTEXT_DOMAIN "wesnoth-test"
17 #include <boost/test/unit_test.hpp>
20 #include <boost/test/data/test_case.hpp>
34 config any_negative {
"x",
"-infinity--1"};
35 config any_positive {
"x",
"1-infinity"};
36 config any_number {
"x",
"-infinity-infinity"};
55 config add_minus_3 {
"add", -3};
63 config add_2_to_4 {
"add",
"2-4"};
64 config sub_2_to_4 {
"sub",
"2-4"};
75 config value_3 {
"value", 3};
82 BOOST_AUTO_TEST_SUITE_END()
A config object defines a single node in a WML file, with access to child nodes.
Utility functions for implementing [filter], [filter_ability], [filter_weapon], etc.
bool int_matches_if_present(const config &filter, const config &cfg, const std::string &attribute, utils::optional< int > def=utils::nullopt)
bool int_matches_if_present_or_negative(const config &filter, const config &cfg, const std::string &attribute, const std::string &opposite, utils::optional< int > def=utils::nullopt)
Supports filters using "add" and "sub" attributes, for example a filter add=1 matching a cfg containi...
BOOST_AUTO_TEST_CASE(test_int_signed_filter)
BOOST_AUTO_TEST_SUITE(filesystem)