Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #define GETTEXT_DOMAIN "wesnoth-test"
00017
00018 #include <vector>
00019 #include <string>
00020 #include "serialization/string_utils.hpp"
00021 #include <boost/test/auto_unit_test.hpp>
00022
00023 BOOST_AUTO_TEST_CASE( utils_join_test )
00024 {
00025 std::vector<std::string> fruit;
00026
00027 BOOST_CHECK( utils::join(fruit) == "" );
00028
00029 fruit.push_back("apples");
00030
00031 BOOST_CHECK( utils::join(fruit) == "apples" );
00032
00033 fruit.push_back("oranges");
00034 fruit.push_back("lemons");
00035
00036 BOOST_CHECK( utils::join(fruit) == "apples,oranges,lemons" );
00037 }
00038