Changes in test/lp_test.cc [589:fc6c7aab4b8d:585:ba124394367a] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/lp_test.cc
r589 r585 198 198 check(const_cast<const LpSolver::Expr&>(e)[p2]==0, buf.str()); 199 199 200 //Test for clone/new201 LP* lpnew = lp.newSolver();202 LP* lpclone = lp.cloneSolver();203 delete lpnew;204 delete lpclone;205 200 206 201 } … … 253 248 if (stat == LpSolver::OPTIMAL) { 254 249 std::ostringstream sbuf; 255 sbuf << "Wrong optimal value (" << lp.primal() <<") with " 256 << lp.solverName() <<"\n the right optimum is " << exp_opt; 250 sbuf << "Wrong optimal value: the right optimum is " << exp_opt; 257 251 check(std::abs(lp.primal()-exp_opt) < 1e-3, sbuf.str()); 258 252 } … … 362 356 } 363 357 364 template<class LP>365 void cloneTest()366 {367 //Test for clone/new368 369 LP* lp = new LP();370 LP* lpnew = lp->newSolver();371 LP* lpclone = lp->cloneSolver();372 delete lp;373 delete lpnew;374 delete lpclone;375 }376 377 358 int main() 378 359 { … … 385 366 lpTest(lp_glpk1); 386 367 aTest(lp_glpk2); 387 cloneTest<GlpkLp>();388 368 } 389 369 #endif … … 402 382 #endif 403 383 } 404 cloneTest<CplexLp>();405 384 #endif 406 385 … … 410 389 lpTest(lp_soplex1); 411 390 aTest(lp_soplex2); 412 cloneTest<SoplexLp>();413 391 } 414 392 #endif … … 419 397 lpTest(lp_clp1); 420 398 aTest(lp_clp2); 421 cloneTest<ClpLp>();422 399 } 423 400 #endif
Note: See TracChangeset
for help on using the changeset viewer.