()
| 412 | * toArray(a) contains all elements in sorted order |
| 413 | */ |
| 414 | public void testToArray2() { |
| 415 | NavigableSet<Integer> q = populatedSet(SIZE); |
| 416 | Integer[] ints = new Integer[SIZE]; |
| 417 | Integer[] array = q.toArray(ints); |
| 418 | assertSame(ints, array); |
| 419 | for (int i = 0; i < ints.length; i++) |
| 420 | assertEquals(ints[i], q.pollFirst()); |
| 421 | } |
| 422 | |
| 423 | /* |
| 424 | * iterator iterates through all elements |
nothing calls this directly
no test coverage detected