Changeset 16543 in josm
- Timestamp:
- 2020-06-07T09:46:54+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java
r16006 r16543 53 53 for (OsmPrimitive o: allNodes) { 54 54 ds.removePrimitive(o); 55 checkIterator(nodes, --expectedCount);55 Assert.assertEquals(--expectedCount, nodes.size()); 56 56 } 57 57 expectedCount = allWays.size(); 58 58 for (OsmPrimitive o: allWays) { 59 59 ds.removePrimitive(o); 60 checkIterator(ways, --expectedCount);60 Assert.assertEquals(--expectedCount, ways.size()); 61 61 } 62 62 for (OsmPrimitive o: allRelations) { … … 66 66 Assert.assertTrue(ways.isEmpty()); 67 67 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);78 68 } 79 69
Note:
See TracChangeset
for help on using the changeset viewer.