798 |
|
} |
799 |
|
} |
800 |
|
|
801 |
+ |
/** |
802 |
+ |
* Spliterator.getComparator throws IllegalStateException iff the |
803 |
+ |
* spliterator does not report SORTED. |
804 |
+ |
*/ |
805 |
+ |
public void testGetComparator_IllegalStateException() { |
806 |
+ |
Collection c = impl.emptyCollection(); |
807 |
+ |
Spliterator s = c.spliterator(); |
808 |
+ |
boolean reportsSorted = s.hasCharacteristics(Spliterator.SORTED); |
809 |
+ |
try { |
810 |
+ |
s.getComparator(); |
811 |
+ |
assertTrue(reportsSorted); |
812 |
+ |
} catch (IllegalStateException ex) { |
813 |
+ |
assertFalse(reportsSorted); |
814 |
+ |
} |
815 |
+ |
} |
816 |
+ |
|
817 |
|
// public void testCollection8DebugFail() { |
818 |
|
// fail(impl.klazz().getSimpleName()); |
819 |
|
// } |