COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/lp_test.cc

    r589 r585  
    198198    check(const_cast<const LpSolver::Expr&>(e)[p2]==0, buf.str());
    199199
    200     //Test for clone/new
    201     LP* lpnew = lp.newSolver();
    202     LP* lpclone = lp.cloneSolver();
    203     delete lpnew;
    204     delete lpclone;
    205200
    206201  }
     
    253248  if (stat ==  LpSolver::OPTIMAL) {
    254249    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;
    257251    check(std::abs(lp.primal()-exp_opt) < 1e-3, sbuf.str());
    258252  }
     
    362356}
    363357
    364 template<class LP>
    365 void cloneTest()
    366 {
    367   //Test for clone/new
    368  
    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 
    377358int main()
    378359{
     
    385366    lpTest(lp_glpk1);
    386367    aTest(lp_glpk2);
    387     cloneTest<GlpkLp>();
    388368  }
    389369#endif
     
    402382#endif
    403383  }
    404     cloneTest<CplexLp>();
    405384#endif
    406385
     
    410389    lpTest(lp_soplex1);
    411390    aTest(lp_soplex2);
    412     cloneTest<SoplexLp>();
    413391  }
    414392#endif
     
    419397    lpTest(lp_clp1);
    420398    aTest(lp_clp2);
    421     cloneTest<ClpLp>();
    422399  }
    423400#endif
Note: See TracChangeset for help on using the changeset viewer.