RMOL Logo  1.00.1
C++ library of Revenue Management and Optimisation classes and functions
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 #include <boost/version.hpp>
18 // StdAir
19 #include <stdair/basic/BasLogParams.hpp>
20 #include <stdair/basic/BasDBParams.hpp>
21 #include <stdair/basic/BasFileMgr.hpp>
22 #include <stdair/service/Logger.hpp>
23 // RMOL
24 #include <rmol/RMOL_Service.hpp>
25 
26 namespace boost_utf = boost::unit_test;
27 
28 // (Boost) Unit Test XML Report
29 std::ofstream utfReportStream ("UnconstrainerTestSuite_utfresults.xml");
30 
34 struct UnitTestConfig {
36  UnitTestConfig() {
37  boost_utf::unit_test_log.set_stream (utfReportStream);
38 #if BOOST_VERSION >= 105900
39  boost_utf::unit_test_log.set_format (boost_utf::OF_XML);
40 #else
41  boost_utf::unit_test_log.set_format (boost_utf::XML);
42 #endif
43  boost_utf::unit_test_log.set_threshold_level (boost_utf::log_test_units);
44  //boost_utf::unit_test_log.set_threshold_level (boost_utf::log_successful_tests);
45  }
46 
48  ~UnitTestConfig() {
49  }
50 };
51 
52 
53 // /////////////// Main: Unit Test Suite //////////////
54 
55 // Set the UTF configuration (re-direct the output to a specific file)
56 BOOST_GLOBAL_FIXTURE (UnitTestConfig);
57 
62 BOOST_AUTO_TEST_SUITE (master_test_suite)
63 
64 
67 BOOST_AUTO_TEST_CASE (rmol_unconstraining_em) {
68  const bool lTestFlag = true;// testUnconstrainerHelper(0);
69  BOOST_CHECK_EQUAL (lTestFlag, true);
70  BOOST_CHECK_MESSAGE (lTestFlag == true,
71  "The test has failed. Please see the log file for "
72  << "more details");
73 }
74 
75 // End the test suite
76 BOOST_AUTO_TEST_SUITE_END()
77 
78