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