COIN-OR::LEMON - Graph Library

Changeset 741:71939d63ae77 in lemon for test/maps_test.cc


Ignore:
Timestamp:
07/21/09 22:43:31 (10 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Children:
742:8dae88c5943e, 768:99124ea4f048
Phase:
public
Message:

Improvements for iterable maps (#73)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/maps_test.cc

    r740 r741  
    2323#include <lemon/concepts/maps.h>
    2424#include <lemon/maps.h>
     25#include <lemon/smart_graph.h>
    2526
    2627#include "test_tools.h"
     
    356357
    357358    typedef IterableBoolMap<SmartGraph, SmartGraph::Node> Ibm;
    358     checkConcept<ReadWriteMap<Item, int>, Ibm>();
     359    checkConcept<ReferenceMap<Item, bool, bool&, const bool&>, Ibm>();
    359360
    360361    const int num = 10;
     
    437438    typedef IterableIntMap<SmartGraph, SmartGraph::Node> Iim;
    438439
    439     checkConcept<ReadWriteMap<Item, int>, Iim>();
     440    checkConcept<ReferenceMap<Item, int, int&, const int&>, Iim>();
    440441
    441442    const int num = 10;
     
    468469    int n = 0;
    469470    for (Iim::ItemIt it(map1, 0); it != INVALID; ++it) {
    470       check(map1[static_cast<Item>(it)] == 0, "Wrong Value");
     471      check(map1[static_cast<Item>(it)] == 0, "Wrong value");
    471472      ++n;
    472473    }
     
    474475
    475476    for (Iim::ItemIt it(map1, 1); it != INVALID; ++it) {
    476       check(map1[static_cast<Item>(it)] == 1, "Wrong Value");
     477      check(map1[static_cast<Item>(it)] == 1, "Wrong value");
    477478      ++n;
    478479    }
     
    525526    int n = 0;
    526527    for (Ivm::ItemIt it(map1, 0.0); it != INVALID; ++it) {
    527       check(map1[static_cast<Item>(it)] == 0.0, "Wrong Value");
     528      check(map1[static_cast<Item>(it)] == 0.0, "Wrong value");
    528529      ++n;
    529530    }
     
    531532
    532533    for (Ivm::ItemIt it(map1, 1.0); it != INVALID; ++it) {
    533       check(map1[static_cast<Item>(it)] == 1.0, "Wrong Value");
     534      check(map1[static_cast<Item>(it)] == 1.0, "Wrong value");
    534535      ++n;
    535536    }
Note: See TracChangeset for help on using the changeset viewer.