// Copyright (C) 2000, International Business Machines // Corporation and others. All Rights Reserved. // Test individual classes or groups of classes #if defined(_MSC_VER) // Turn off compiler warning about long names # pragma warning(disable:4786) #endif #ifdef NDEBUG #undef NDEBUG #endif #include #include #undef MY_C_FINITE #include "CoinError.hpp" #include "CoinHelperFunctions.hpp" #include "CoinSort.hpp" #include "CoinShallowPackedVector.hpp" #include "CoinPackedVector.hpp" #include "CoinDenseVector.hpp" #include "CoinIndexedVector.hpp" #include "CoinPackedMatrix.hpp" #include "CoinMpsIO.hpp" #include "CoinMessageHandler.hpp" void CoinModelUnitTest(const std::string & mpsDir, const std::string & netlibDir, const std::string & testModel); // Function Prototypes. Function definitions is in this file. void testingMessage( const char * const msg ); //---------------------------------------------------------------- // unitTest [-mpsDir=V1] [-netlibDir=V2] [-testModel=V3] // // where: // -mpsDir: directory containing mps test files // Default value V1="../../Data/Sample" // -netlibDir: directory containing netlib files // Default value V2="../../Data/Netlib" // -testModel: name of model in netlibdir for testing CoinModel // Default value V3="25fv47.mps" // // All parameters are optional. //---------------------------------------------------------------- int main (int argc, const char *argv[]) { int i; // define valid parameter keywords std::set definedKeyWords; definedKeyWords.insert("-mpsDir"); definedKeyWords.insert("-netlibDir"); // allow for large named model for CoinModel definedKeyWords.insert("-testModel"); // Create a map of parameter keys and associated data std::map parms; for ( i=1; i(0); CoinDenseVectorUnitTest(0.0); CoinDenseVectorUnitTest(0.0f); #endif testingMessage( "Testing CoinMpsIO\n" ); CoinMpsIOUnitTest(mpsDir); testingMessage( "Testing CoinMessageHandler\n" ); CoinMessageHandlerUnitTest() ; testingMessage( "All tests completed successfully\n" ); return 0; } // Display message on stdout and stderr void testingMessage( const char * const msg ) { std::cerr <