15 #define BOOST_TEST_DYN_LINK
16 #define BOOST_TEST_MAIN
17 #define BOOST_TEST_MODULE IndexBuildingTestSuite
18 #include <boost/test/unit_test.hpp>
24 #include <opentrep/config/opentrep-paths.hpp>
26 namespace boost_utf = boost::unit_test;
29 std::ofstream
utfReportStream (
"IndexBuildingTestSuite_utfresults.xml");
38 #if defined(BOOST_VERSION) && BOOST_VERSION >= 105900
39 boost_utf::unit_test_log.set_format (boost_utf::OF_XML);
40 #else // BOOST_VERSION
41 boost_utf::unit_test_log.set_format (boost_utf::XML);
42 #endif // BOOST_VERSION
43 boost_utf::unit_test_log.set_threshold_level (boost_utf::log_test_units);
57 const std::string K_POR_FILEPATH (OPENTREP_POR_DATA_DIR
58 "/test_optd_por_public.csv");
97 BOOST_AUTO_TEST_SUITE (master_test_suite)
105 std::string lLogFilename (
"IndexBuildingTestSuite.log");
108 std::ofstream logOutputFile;
110 logOutputFile.open (lLogFilename.c_str());
111 logOutputFile.clear();
124 lDBType, lSQLDBConnStr,
126 lShouldIndexNonIATAPOR,
127 lShouldIndexPORInXapian,
128 lShouldAddPORInSQLDB);
135 opentrepService.insertIntoDBAndXapian();
137 BOOST_CHECK_MESSAGE (nbOfEntries == 9,
138 "The Xapian index ('" << lTravelDBFilePath
139 <<
"') contains " << nbOfEntries
140 <<
" entries, where as 9 are expected.");
143 logOutputFile.close();
147 BOOST_AUTO_TEST_SUITE_END()
const std::string X_SQL_DB_STR("")
const std::string X_XAPIAN_DB_FP("/tmp/opentrep/test_traveldb")
bool shouldIndexNonIATAPOR_T
unsigned int NbOfDBEntries_T
Interface for the OPENTREP Services.
std::list< Word_T > WordList_T
BOOST_GLOBAL_FIXTURE(UnitTestConfig)
Enumeration of database types.
BOOST_AUTO_TEST_CASE(partition_small_string)
std::list< Location > LocationList_T
const OPENTREP::DeploymentNumber_T X_DEPLOYMENT_NUMBER(0)
bool shouldAddPORInSQLDB_T
bool shouldIndexPORInXapian_T
std::ofstream utfReportStream("PartitionTestSuite_utfresults.xml")
unsigned short DeploymentNumber_T