ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/Collection8Test.java
(Generate patch)

Comparing jsr166/src/test/tck/Collection8Test.java (file contents):
Revision 1.39 by jsr166, Sun Dec 11 19:59:51 2016 UTC vs.
Revision 1.40 by jsr166, Sun Dec 11 22:29:45 2016 UTC

# Line 798 | Line 798 | public class Collection8Test extends JSR
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   //     }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines