test/mip_test.cc
changeset 1427 57abff252556
parent 1300 62dba6c90f35
     1.1 --- a/test/mip_test.cc	Sat Oct 27 13:00:48 2018 +0200
     1.2 +++ b/test/mip_test.cc	Wed Jan 20 16:17:21 2021 +0100
     1.3 @@ -61,7 +61,7 @@
     1.4    }
     1.5  }
     1.6  
     1.7 -void aTest(MipSolver& mip)
     1.8 +void aTest(MipSolver& mip, bool solve_empty=true)
     1.9  {
    1.10    //The following example is very simple
    1.11  
    1.12 @@ -80,7 +80,8 @@
    1.13    mip.max();
    1.14  
    1.15    //Unconstrained optimization
    1.16 -  mip.solve();
    1.17 +  if(solve_empty)
    1.18 +    mip.solve();
    1.19    //Check it out!
    1.20  
    1.21    //Constraints
    1.22 @@ -135,7 +136,11 @@
    1.23  #ifdef LEMON_HAVE_MIP
    1.24    {
    1.25      Mip mip1;
    1.26 +#if LEMON_DEFAULT_MIP==LEMON_CBC_
    1.27 +    aTest(mip1, false);
    1.28 +#else
    1.29      aTest(mip1);
    1.30 +#endif
    1.31      cloneTest<Mip>();
    1.32    }
    1.33  #endif
    1.34 @@ -161,7 +166,7 @@
    1.35  #ifdef LEMON_HAVE_CBC
    1.36    {
    1.37      CbcMip mip1;
    1.38 -    aTest(mip1);
    1.39 +    aTest(mip1, false);
    1.40      cloneTest<CbcMip>();
    1.41    }
    1.42  #endif