15 #define GETTEXT_DOMAIN "wesnoth-test"
17 #include <boost/test/unit_test.hpp>
27 BOOST_CHECK( empty.
str() ==
"0.0.0" );
32 BOOST_CHECK( dots1 == empty);
33 BOOST_CHECK( dots2.
str() ==
"0.0.0hullo" );
37 BOOST_CHECK( canonical.is_canonical() );
41 BOOST_CHECK( canonical_suffixed > canonical );
42 BOOST_CHECK( canonical < canonical_suffixed );
48 version_info non_canonical_suffixed(
"1.2.3.4.5.7.8.9+dev");
50 BOOST_CHECK( non_canonical_suffixed > non_canonical );
51 BOOST_CHECK( non_canonical < non_canonical_suffixed );
56 BOOST_CHECK( right_zero == no_right_zero );
61 BOOST_CHECK( left_zero != no_left_zero );
63 const std::string bad_version_info_string_1 =
"Viva la revoluciĆ³n!";
64 const std::string bad_version_info_string_2 =
"To infinity and beyond!";
66 const version_info bad_version_info1( bad_version_info_string_1 );
67 const version_info bad_version_info2( bad_version_info_string_2 );
69 BOOST_CHECK( bad_version_info1.
str() == (
"0.0.0"+bad_version_info_string_1) );
70 BOOST_CHECK( bad_version_info2.
str() == (
"0.0.0"+bad_version_info_string_2) );
76 BOOST_AUTO_TEST_SUITE_END()
bool is_canonical() const
Whether the version number is considered canonical for mainline Wesnoth.
BOOST_AUTO_TEST_CASE(test_version_info)
BOOST_AUTO_TEST_SUITE(test_map_location)
std::string str() const
Serializes the version number into string form.
char special_version_separator() const
Retrieves the special version separator (e.g.
unsigned int revision_level() const
Retrieves the revision level (x3 in "x1.x2.x3").
unsigned int minor_version() const
Retrieves the minor version number (x2 in "x1.x2.x3").
unsigned int major_version() const
Retrieves the major version number (x1 in "x1.x2.x3").
Represents version numbers.
const std::string & special_version() const
Retrieves the special version suffix (e.g.
Interfaces for manipulating version numbers of engine, add-ons, etc.
const std::string version
GLsizei const GLcharARB ** string