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