Changeset 1743


Ignore:
Timestamp:
Jun 12, 2011 2:17:19 PM (8 years ago)
Author:
stefan
Message:

a bit cleanup and small fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/test/osiUnitTest.cpp

    r1741 r1743  
    2222
    2323//----------------------------------------------------------------
    24 // unitTest [-nobuf] [-mpsDir=V1] [-netlibDir=V2] [-testOsiSolverInterface]
    25 //
    26 // where:
    27 //   -nobuf: remove buffering on cout (stdout); useful to keep cout and cerr
    28 //   messages synchronised when redirecting output to a file or pipe.
    29 //   -mpsDir: directory containing mps test files
    30 //       Default value V1="../../Data/Sample"   
    31 //   -netlibDir: directory containing netlib files
    32 //       Default value V2="../../Data/Netlib"
    33 //   -testOsiSolverInterface
    34 //       If specified, then OsiSolveInterface::unitTest
    35 //       is skipped over and not run.
    36 //
    37 // All parameters are optional.
     24// to see parameter list, call unitTest -usage
    3825//----------------------------------------------------------------
    3926
     
    4128{
    4229  bool exception = false;
    43   outcomes.clear();
    44 
    4530/*
    4631  Start off with various bits of initialisation that don't really belong
    4732  anywhere else.
    48 
    49   First off, synchronise C++ stream i/o with C stdio. This makes debugging
     33*/
     34  outcomes.clear();
     35/*
     36  Synchronise C++ stream i/o with C stdio. This makes debugging
    5037  output a bit more comprehensible. It still suffers from interleave of cout
    5138  (stdout) and cerr (stderr), but -nobuf deals with that.
     
    8976
    9077    /*
    91       Run the OsiXXX class test. It's up to the OsiClp implementor
    92       to decide whether or not to run OsiSolverInterfaceCommonUnitTest. Arguably
    93       this should be required.
     78      Run the OsiClp class test. This will also call OsiSolverInterfaceCommonUnitTest.
    9479    */
    9580    testingMessage( "Testing OsiClpSolverInterface\n" );
     
    9782
    9883    /*
    99       We have run the specialised unit test. Check now to see if we need to
    100       run through the Netlib problems.
     84      We have run the specialised unit test.
     85      Check now to see if we need to run through the Netlib problems.
    10186    */
    10287    if (parms.find("-testOsiSolverInterface") != parms.end())
     
    133118  if (nerrors > nerrors_expected)
    134119    std::cerr << "Tests completed with " << nerrors - nerrors_expected << " unexpected errors." << std::endl ;
     120  else if( exception )
     121    std::cerr << "Tests completed with exception\n";
    135122  else
    136123    std::cerr << "All tests completed successfully\n";
Note: See TracChangeset for help on using the changeset viewer.