#include "OSConfig.h"
#include "OSCoinSolver.h"
#include "OSmps2OS.h"
#include "OSResult.h"
#include "OSOption.h"
#include "OSiLReader.h"
#include "OSiLWriter.h"
#include "OSoLReader.h"
#include "OSoLWriter.h"
#include "OSrLReader.h"
#include "OSrLWriter.h"
#include "OSInstance.h"
#include "OSFileUtil.h"
#include "OSOutput.h"
#include "CoinError.hpp"
#include "OSDefaultSolver.h"
#include "OSWSUtil.h"
#include "OSSolverAgent.h"
#include "OShL.h"
#include "OSErrorClass.h"
#include "OSBase64.h"
#include "OSMathUtil.h"
#include <CoinMpsIO.hpp>
#include <CoinPackedMatrix.hpp>
#include "CoinHelperFunctions.hpp"
#include "OsiSolverInterface.hpp"
Go to the source code of this file.
Functions | |
int | main (int argC, char *argV[]) |
double | getObjVal (std::string osrl) |
int | getItCount (std::string osrl) |
void | tempPrintArrays (OSResult *os) |
define commonly used objects and arrays Unless explicitly stated otherwise, each test is responsible for its own memory management (i.e., new and delete)
in this part of the unitTest we 1) read an OSoL string from a file 2) create an OSOption object from the string 3) add options to various array-valued elements 4) retrieve pieces of the OSOption object with get() methods 5) insert these pieces into a second OSOption object with set() methods 6) compare the two OSOption objects to make sure they are equal 7) write a new OSoL string from the in-memory OSOption object 8) read the string back again into a third OSOption object 9) compare to the original OSOption object 10) read two more OSoL strings from different files 11) test the deep copy
Now test the utility methods for the OSrL parser, in three steps.
The first test just ensures that the set() and IsEqual() methods work correctly. Two OSResult objects are built one element and attribute at a time. After every call to the appropriate set() method the two objects are compared: After the first object has been modified, the objects should compare NOT equal; after the second object has been updated in the same way, the objects should again be equal.
The second test verifies the get() methods. The OSResult object just created is duplicated using get() and set() methods. At the end, the duplicated object is compared to the original. The test requires both to be equal.
in this part of the unitTest we 1) read an OSrL string from a file 2) create an OSResult object from the string 3) write a new OSrL string from the in-memory OSResult object 4) read the string back again to make sure nothing was lost in translation This sequence of steps is repeated for files of different sparsity to make sure empty elements are handled properly.
Definition at line 269 of file unitTest.cpp.
double getObjVal | ( | std::string | osrl | ) |
Definition at line 10395 of file unitTest.cpp.
int getItCount | ( | std::string | osrl | ) |
Definition at line 10420 of file unitTest.cpp.
Definition at line 10447 of file unitTest.cpp.