15 #define BOOST_TEST_DYN_LINK
16 #define BOOST_TEST_MAIN
17 #define BOOST_TEST_MODULE PartitionTestSuite
18 #include <boost/test/unit_test.hpp>
22 namespace boost_utf = boost::unit_test;
34 boost_utf::unit_test_log.set_format (boost_utf::XML);
35 boost_utf::unit_test_log.set_threshold_level (boost_utf::log_test_units);
51 BOOST_AUTO_TEST_SUITE (master_test_suite)
59 std::string lLogFilename (
"PartitionTestSuite.log");
62 std::ofstream logOutputFile;
64 logOutputFile.open (lLogFilename.c_str());
65 logOutputFile.clear();
67 const std::string lLax1Str =
"los angeles";
68 const std::string lLax2Str =
"lso angeles";
69 const std::string lRio1Str =
"rio de janeiro";
70 const std::string lRio2Str =
"rio de janero";
71 const std::string lRek1Str =
"reikjavik";
72 const std::string lRek2Str =
"rekyavik";
73 const std::string lSfoRio1Str =
"san francisco rio de janeiro";
74 const std::string lSfoRio2Str =
"san francicso rio de janero";
75 const std::string lSfoRio3Str =
"sna francicso rio de janero";
76 const std::string lChelseaStr =
"chelsea municipal airport";
80 logOutputFile << lStringPartition << std::endl;
82 BOOST_CHECK_MESSAGE (lStringPartition.
size() == 16,
83 "The partition, for '" << lRio2Str
84 <<
"', should contain a single list."
85 <<
" However, its size is " << lStringPartition.
size()
90 logOutputFile << lAnotherStringPartition << std::endl;
93 logOutputFile.close();
97 BOOST_AUTO_TEST_SUITE_END()
BOOST_GLOBAL_FIXTURE(UnitTestConfig)
BOOST_AUTO_TEST_CASE(partition_small_string)
std::ofstream utfReportStream("PartitionTestSuite_utfresults.xml")