Changeset 16543 in josm


Ignore:
Timestamp:
2020-06-07T09:46:54+02:00 (4 years ago)
Author:
simon04
Message:

Simplify QuadBucketsTest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java

    r16006 r16543  
    5353        for (OsmPrimitive o: allNodes) {
    5454            ds.removePrimitive(o);
    55             checkIterator(nodes, --expectedCount);
     55            Assert.assertEquals(--expectedCount, nodes.size());
    5656        }
    5757        expectedCount = allWays.size();
    5858        for (OsmPrimitive o: allWays) {
    5959            ds.removePrimitive(o);
    60             checkIterator(ways, --expectedCount);
     60            Assert.assertEquals(--expectedCount, ways.size());
    6161        }
    6262        for (OsmPrimitive o: allRelations) {
     
    6666        Assert.assertTrue(ways.isEmpty());
    6767        Assert.assertTrue(relations.isEmpty());
    68     }
    69 
    70     private void checkIterator(Collection<? extends OsmPrimitive> col, int expectedCount) {
    71         int count = 0;
    72         Iterator<? extends OsmPrimitive> it = col.iterator();
    73         while (it.hasNext()) {
    74             count++;
    75             it.next();
    76         }
    77         Assert.assertEquals(expectedCount, count);
    7868    }
    7969
Note: See TracChangeset for help on using the changeset viewer.