()
| 281 | * remove(x) removes x and returns true if present |
| 282 | */ |
| 283 | public void testRemoveElement() { |
| 284 | NavigableSet q = populatedSet(SIZE); |
| 285 | for (int i = 1; i < SIZE; i+=2) { |
| 286 | assertTrue(q.contains(i)); |
| 287 | assertTrue(q.remove(i)); |
| 288 | assertFalse(q.contains(i)); |
| 289 | assertTrue(q.contains(i-1)); |
| 290 | } |
| 291 | for (int i = 0; i < SIZE; i+=2) { |
| 292 | assertTrue(q.contains(i)); |
| 293 | assertTrue(q.remove(i)); |
| 294 | assertFalse(q.contains(i)); |
| 295 | assertFalse(q.remove(i + 1)); |
| 296 | assertFalse(q.contains(i + 1)); |
| 297 | } |
| 298 | assertTrue(q.isEmpty()); |
| 299 | } |
| 300 | |
| 301 | /* |
| 302 | * contains(x) reports true when elements added but not yet removed |
nothing calls this directly
no test coverage detected