RMOL Logo  1.00.8
C++ library of Revenue Management and Optimisation classes and functions
Loading...
Searching...
No Matches
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
25namespace boost_utf = boost::unit_test;
26
27// (Boost) Unit Test XML Report
28std::ofstream utfReportStream ("UnconstrainerTestSuite_utfresults.xml");
29
33struct UnitTestConfig {
35 UnitTestConfig() {
36 boost_utf::unit_test_log.set_stream (utfReportStream);
37#if defined(BOOST_VERSION) && BOOST_VERSION >= 105900
38 boost_utf::unit_test_log.set_format (boost_utf::OF_XML);
39#else // BOOST_VERSION
40 boost_utf::unit_test_log.set_format (boost_utf::XML);
41#endif // BOOST_VERSION
42 boost_utf::unit_test_log.set_threshold_level (boost_utf::log_test_units);
43 //boost_utf::unit_test_log.set_threshold_level (boost_utf::log_successful_tests);
44 }
45
47 ~UnitTestConfig() {
48 }
49};
50
51
52// /////////////// Main: Unit Test Suite //////////////
53
54// Set the UTF configuration (re-direct the output to a specific file)
55BOOST_GLOBAL_FIXTURE (UnitTestConfig);
56
61BOOST_AUTO_TEST_SUITE (master_test_suite)
62
63
66BOOST_AUTO_TEST_CASE (rmol_unconstraining_em) {
67 const bool lTestFlag = true;// testUnconstrainerHelper(0);
68 BOOST_CHECK_EQUAL (lTestFlag, true);
69 BOOST_CHECK_MESSAGE (lTestFlag == true,
70 "The test has failed. Please see the log file for "
71 << "more details");
72}
73
74// End the test suite
75BOOST_AUTO_TEST_SUITE_END()
76
77