COIN-OR::LEMON - Graph Library

Changeset 1337:4add05447ca0 in lemon for test/lp_test.cc


Ignore:
Timestamp:
04/14/15 08:39:40 (9 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Tests and bugfixes for the STL style iterators (#325)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/lp_test.cc

    r1300 r1337  
    2121#include "test_tools.h"
    2222#include <lemon/tolerance.h>
    23 
     23#include <lemon/concept_check.h>
    2424#include <lemon/config.h>
    2525
     
    4848  int count=0;
    4949  for (LpBase::ColIt c(lp); c!=INVALID; ++c) ++count;
     50#ifdef LEMON_CXX11
     51  int cnt = 0;
     52  for(auto c: lp.cols()) { cnt++; ::lemon::ignore_unused_variable_warning(c); }
     53  check(count == cnt, "Wrong STL iterator");
     54#endif
    5055  return count;
    5156}
     
    5459  int count=0;
    5560  for (LpBase::RowIt r(lp); r!=INVALID; ++r) ++count;
     61#ifdef LEMON_CXX11
     62  int cnt = 0;
     63  for(auto r: lp.rows()) { cnt++; ::lemon::ignore_unused_variable_warning(r); }
     64  check(count == cnt, "Wrong STL iterator");
     65#endif
    5666  return count;
    5767}
Note: See TracChangeset for help on using the changeset viewer.