Changeset 1667 for trunk/Cbc/test/OsiCbcSolverInterfaceTest.cpp
- Timestamp:
- Jun 13, 2011 11:09:24 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cbc/test/OsiCbcSolverInterfaceTest.cpp
r1666 r1667 56 56 //-------------------------------------------------------------------------- 57 57 // test solution methods. 58 int 59 OsiCbcSolverInterfaceUnitTest(const std::string & mpsDir, const std::string & netlibDir) 58 void OsiCbcSolverInterfaceUnitTest(const std::string & mpsDir, const std::string & netlibDir) 60 59 { 61 60 { … … 156 155 const double * rl = cbcSi.getRowLower(); 157 156 const double * ru = cbcSi.getRowUpper(); 158 OSIUNITTEST_ASSERT_ERROR(nc == 8, return 1, "cbc", "read and copy exmip1");159 OSIUNITTEST_ASSERT_ERROR(nr == 5, return 1, "cbc", "read and copy exmip1");157 OSIUNITTEST_ASSERT_ERROR(nc == 8, return, "cbc", "read and copy exmip1"); 158 OSIUNITTEST_ASSERT_ERROR(nr == 5, return, "cbc", "read and copy exmip1"); 160 159 OSIUNITTEST_ASSERT_ERROR(eq(cl[0],2.5), {}, "cbc", "read and copy exmip1"); 161 160 OSIUNITTEST_ASSERT_ERROR(eq(cl[1],0.0), {}, "cbc", "read and copy exmip1"); … … 198 197 const CoinPackedMatrix * smP = si.getMatrixByRow(); 199 198 200 OSIUNITTEST_ASSERT_ERROR(smP->getMajorDim() == 5, return 1, "cbc", "getMatrixByRow: major dim");201 OSIUNITTEST_ASSERT_ERROR(smP->getMinorDim() == 8, return 1, "cbc", "getMatrixByRow: major dim");202 OSIUNITTEST_ASSERT_ERROR(smP->getNumElements() == 14, return 1, "cbc", "getMatrixByRow: num elements");203 OSIUNITTEST_ASSERT_ERROR(smP->getSizeVectorStarts() == 6, return 1, "cbc", "getMatrixByRow: num elements");199 OSIUNITTEST_ASSERT_ERROR(smP->getMajorDim() == 5, return, "cbc", "getMatrixByRow: major dim"); 200 OSIUNITTEST_ASSERT_ERROR(smP->getMinorDim() == 8, return, "cbc", "getMatrixByRow: major dim"); 201 OSIUNITTEST_ASSERT_ERROR(smP->getNumElements() == 14, return, "cbc", "getMatrixByRow: num elements"); 202 OSIUNITTEST_ASSERT_ERROR(smP->getSizeVectorStarts() == 6, return, "cbc", "getMatrixByRow: num elements"); 204 203 205 204 #ifdef OSICBC_TEST_MTX_STRUCTURE … … 316 315 const CoinPackedMatrix * smP = si.getMatrixByCol(); 317 316 318 OSIUNITTEST_ASSERT_ERROR(smP->getMajorDim() == 8, return 1, "cbc", "getMatrixByCol: major dim");319 OSIUNITTEST_ASSERT_ERROR(smP->getMinorDim() == 5, return 1, "cbc", "getMatrixByCol: minor dim");320 OSIUNITTEST_ASSERT_ERROR(smP->getNumElements() == 14, return 1, "cbc", "getMatrixByCol: number of elements");321 OSIUNITTEST_ASSERT_ERROR(smP->getSizeVectorStarts() == 9, return 1, "cbc", "getMatrixByCol: vector starts size");317 OSIUNITTEST_ASSERT_ERROR(smP->getMajorDim() == 8, return, "cbc", "getMatrixByCol: major dim"); 318 OSIUNITTEST_ASSERT_ERROR(smP->getMinorDim() == 5, return, "cbc", "getMatrixByCol: minor dim"); 319 OSIUNITTEST_ASSERT_ERROR(smP->getNumElements() == 14, return, "cbc", "getMatrixByCol: number of elements"); 320 OSIUNITTEST_ASSERT_ERROR(smP->getSizeVectorStarts() == 9, return, "cbc", "getMatrixByCol: vector starts size"); 322 321 323 322 #ifdef OSICBC_TEST_MTX_STRUCTURE … … 402 401 const CoinPackedMatrix * siC1mbr = siC1.getMatrixByRow(); 403 402 OSIUNITTEST_ASSERT_ERROR(siC1mbr != NULL, {}, "cbc", "matrix by row"); 404 OSIUNITTEST_ASSERT_ERROR(siC1mbr->getMajorDim() == 5, return 1, "cbc", "matrix by row: major dim");405 OSIUNITTEST_ASSERT_ERROR(siC1mbr->getMinorDim() == 8, return 1, "cbc", "matrix by row: major dim");406 OSIUNITTEST_ASSERT_ERROR(siC1mbr->getNumElements() == 14, return 1, "cbc", "matrix by row: num elements");407 OSIUNITTEST_ASSERT_ERROR(siC1mbr->getSizeVectorStarts() == 6, return 1, "cbc", "matrix by row: num elements");403 OSIUNITTEST_ASSERT_ERROR(siC1mbr->getMajorDim() == 5, return, "cbc", "matrix by row: major dim"); 404 OSIUNITTEST_ASSERT_ERROR(siC1mbr->getMinorDim() == 8, return, "cbc", "matrix by row: major dim"); 405 OSIUNITTEST_ASSERT_ERROR(siC1mbr->getNumElements() == 14, return, "cbc", "matrix by row: num elements"); 406 OSIUNITTEST_ASSERT_ERROR(siC1mbr->getSizeVectorStarts() == 6, return, "cbc", "matrix by row: num elements"); 408 407 409 408 #ifdef OSICBC_TEST_MTX_STRUCTURE … … 520 519 const CoinPackedMatrix * lhsmbr = lhs.getMatrixByRow(); 521 520 OSIUNITTEST_ASSERT_ERROR(lhsmbr != NULL, {}, "cbc", "matrix by row after assignment"); 522 OSIUNITTEST_ASSERT_ERROR(lhsmbr->getMajorDim() == 6, return 1, "cbc", "matrix by row after assignment: major dim");523 OSIUNITTEST_ASSERT_ERROR(lhsmbr->getNumElements() == 14, return 1, "cbc", "matrix by row after assignment: num elements");521 OSIUNITTEST_ASSERT_ERROR(lhsmbr->getMajorDim() == 6, return, "cbc", "matrix by row after assignment: major dim"); 522 OSIUNITTEST_ASSERT_ERROR(lhsmbr->getNumElements() == 14, return, "cbc", "matrix by row after assignment: num elements"); 524 523 525 524 … … 784 783 OsiSolverInterfaceCommonUnitTest(&m, mpsDir,netlibDir); 785 784 } 786 787 return 0;788 785 }
Note: See TracChangeset
for help on using the changeset viewer.