/
#include <cassert>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE IndexBuildingTestSuite
#include <boost/test/unit_test.hpp>
#include <opentrep/config/opentrep-paths.hpp>
namespace boost_utf = boost::unit_test;
#if defined(BOOST_VERSION) && BOOST_VERSION >= 105900
boost_utf::unit_test_log.set_format (boost_utf::OF_XML);
#else
boost_utf::unit_test_log.set_format (boost_utf::XML);
#endif
boost_utf::unit_test_log.set_threshold_level (boost_utf::log_test_units);
}
}
};
const std::string K_POR_FILEPATH (OPENTREP_POR_DATA_DIR
"/test_optd_por_public.csv");
BOOST_AUTO_TEST_SUITE (master_test_suite)
std::string lLogFilename ("IndexBuildingTestSuite.log");
std::ofstream logOutputFile;
logOutputFile.open (lLogFilename.c_str());
logOutputFile.clear();
lTravelDBFilePath,
lDBType, lSQLDBConnStr,
lDeploymentNumber,
lShouldIndexNonIATAPOR,
lShouldIndexPORInXapian,
lShouldAddPORInSQLDB);
opentrepService.insertIntoDBAndXapian();
BOOST_CHECK_MESSAGE (nbOfEntries == 9,
"The Xapian index ('" << lTravelDBFilePath
<< "') contains " << nbOfEntries
<< " entries, where as 9 are expected.");
logOutputFile.close();
}
BOOST_AUTO_TEST_SUITE_END()
std::ofstream utfReportStream("PartitionTestSuite_utfresults.xml")
BOOST_AUTO_TEST_CASE(partition_small_string)
BOOST_GLOBAL_FIXTURE(UnitTestConfig)
const std::string X_XAPIAN_DB_FP("/tmp/opentrep/test_traveldb")
const std::string X_SQL_DB_STR("")
const OPENTREP::DeploymentNumber_T X_DEPLOYMENT_NUMBER(0)
std::ofstream utfReportStream("UnicodeTestSuite_utfresults.xml")
Interface for the OPENTREP Services.
std::list< Word_T > WordList_T
bool shouldAddPORInSQLDB_T
unsigned int NbOfDBEntries_T
std::list< Location > LocationList_T
bool shouldIndexPORInXapian_T
unsigned short DeploymentNumber_T
bool shouldIndexNonIATAPOR_T
Enumeration of database types.