RMOL Logo  1.00.1
C++ library of Revenue Management and Optimisation classes and functions
ForecasterTestSuite.cpp
Go to the documentation of this file.
1 
5 // //////////////////////////////////////////////////////////////////////
6 // Import section
7 // //////////////////////////////////////////////////////////////////////
8 // STL
9 #include <sstream>
10 #include <fstream>
11 #include <string>
12 #include <vector>
13 #include <cmath>
14 // Boost Unit Test Framework (UTF)
15 #define BOOST_TEST_DYN_LINK
16 #define BOOST_TEST_MAIN
17 #define BOOST_TEST_MODULE ForecasterTestSuite
18 #include <boost/test/unit_test.hpp>
19 #include <boost/version.hpp>
20 // StdAir
21 #include <stdair/basic/BasLogParams.hpp>
22 #include <stdair/basic/BasDBParams.hpp>
23 #include <stdair/basic/BasFileMgr.hpp>
24 #include <stdair/service/Logger.hpp>
25 // RMOL
26 #include <rmol/RMOL_Service.hpp>
27 
28 namespace boost_utf = boost::unit_test;
29 
30 // (Boost) Unit Test XML Report
31 std::ofstream utfReportStream ("ForecasterTestSuite_utfresults.xml");
32 
36 struct UnitTestConfig {
38  UnitTestConfig() {
39  boost_utf::unit_test_log.set_stream (utfReportStream);
40 #if BOOST_VERSION >= 105900
41  boost_utf::unit_test_log.set_format (boost_utf::OF_XML);
42 #else
43  boost_utf::unit_test_log.set_format (boost_utf::XML);
44 #endif
45  boost_utf::unit_test_log.set_threshold_level (boost_utf::log_test_units);
46  //boost_utf::unit_test_log.set_threshold_level (boost_utf::log_successful_tests);
47  }
48 
50  ~UnitTestConfig() {
51  }
52 };
53 
54 
55 // /////////////// Main: Unit Test Suite //////////////
56 
57 // Set the UTF configuration (re-direct the output to a specific file)
58 BOOST_GLOBAL_FIXTURE (UnitTestConfig);
59 
64 BOOST_AUTO_TEST_SUITE (master_test_suite)
65 
66 
69 BOOST_AUTO_TEST_CASE (rmol_forecaster_q_forecasting) {
70  const bool lTestFlag = true; //testForecasterHelper(0);
71  BOOST_CHECK_EQUAL (lTestFlag, true);
72  BOOST_CHECK_MESSAGE (lTestFlag == true,
73  "The test has failed. Please see the log file for "
74  << "more details");
75 }
76 
77 // End the test suite
78 BOOST_AUTO_TEST_SUITE_END()
79 
80