test/lp_test.cc
changeset 1177 3c00344f49c9
parent 1092 dceba191c00d
     1.1 --- a/test/lp_test.cc	Mon Jul 16 16:21:40 2018 +0200
     1.2 +++ b/test/lp_test.cc	Wed Oct 17 19:14:07 2018 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2009
     1.8 + * Copyright (C) 2003-2013
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -39,6 +39,9 @@
    1.13  #include <lemon/clp.h>
    1.14  #endif
    1.15  
    1.16 +#ifdef LEMON_HAVE_LP
    1.17 +#include <lemon/lp.h>
    1.18 +#endif
    1.19  using namespace lemon;
    1.20  
    1.21  int countCols(LpBase & lp) {
    1.22 @@ -198,7 +201,12 @@
    1.23        LP::Constr c = v >= -3;
    1.24        c = c <= 4;
    1.25        LP::Constr c2;
    1.26 +#if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 3 )
    1.27 +      c2 = ( -3 <= v ) <= 4;
    1.28 +#else
    1.29        c2 = -3 <= v <= 4;
    1.30 +#endif
    1.31 +
    1.32      }
    1.33  
    1.34      e[x[3]]=2;
    1.35 @@ -240,8 +248,7 @@
    1.36  
    1.37    {
    1.38      LP::DualExpr e,f,g;
    1.39 -    LP::Row p1 = INVALID, p2 = INVALID, p3 = INVALID,
    1.40 -      p4 = INVALID, p5 = INVALID;
    1.41 +    LP::Row p1 = INVALID, p2 = INVALID;
    1.42  
    1.43      e[p1]=2;
    1.44      e[p1]+=2;
    1.45 @@ -412,6 +419,15 @@
    1.46    LpSkeleton lp_skel;
    1.47    lpTest(lp_skel);
    1.48  
    1.49 +#ifdef LEMON_HAVE_LP
    1.50 +  {
    1.51 +    Lp lp,lp2;
    1.52 +    lpTest(lp);
    1.53 +    aTest(lp2);
    1.54 +    cloneTest<Lp>();
    1.55 +  }
    1.56 +#endif
    1.57 +
    1.58  #ifdef LEMON_HAVE_GLPK
    1.59    {
    1.60      GlpkLp lp_glpk1,lp_glpk2;