RMOL Logo  1.00.0
C++ library of Revenue Management and Optimisation classes and functions
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
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 // StdAir
20 #include <stdair/basic/BasLogParams.hpp>
21 #include <stdair/basic/BasDBParams.hpp>
22 #include <stdair/basic/BasFileMgr.hpp>
23 #include <stdair/service/Logger.hpp>
24 // RMOL
25 #include <rmol/RMOL_Service.hpp>
26 
27 namespace boost_utf = boost::unit_test;
28 
29 // (Boost) Unit Test XML Report
30 std::ofstream utfReportStream ("ForecasterTestSuite_utfresults.xml");
31 
35 struct UnitTestConfig {
37  UnitTestConfig() {
38  boost_utf::unit_test_log.set_stream (utfReportStream);
39  boost_utf::unit_test_log.set_format (boost_utf::XML);
40  boost_utf::unit_test_log.set_threshold_level (boost_utf::log_test_units);
41  //boost_utf::unit_test_log.set_threshold_level (boost_utf::log_successful_tests);
42  }
43 
45  ~UnitTestConfig() {
46  }
47 };
48 
49 
50 // /////////////// Main: Unit Test Suite //////////////
51 
52 // Set the UTF configuration (re-direct the output to a specific file)
53 BOOST_GLOBAL_FIXTURE (UnitTestConfig);
54 
59 BOOST_AUTO_TEST_SUITE (master_test_suite)
60 
61 
64 BOOST_AUTO_TEST_CASE (rmol_forecaster_q_forecasting) {
65  const bool lTestFlag = true; //testForecasterHelper(0);
66  BOOST_CHECK_EQUAL (lTestFlag, true);
67  BOOST_CHECK_MESSAGE (lTestFlag == true,
68  "The test has failed. Please see the log file for "
69  << "more details");
70 }
71 
72 // End the test suite
73 BOOST_AUTO_TEST_SUITE_END()
74 
75