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.41 by jsr166, Mon Dec 12 03:50:15 2016 UTC

# Line 447 | Line 447 | public class Collection8Test extends JSR
447      /**
448       * Various ways of traversing a collection yield same elements
449       */
450 <    public void testIteratorEquivalence() {
450 >    public void testTraversalEquivalence() {
451          Collection c = impl.emptyCollection();
452          ThreadLocalRandom rnd = ThreadLocalRandom.current();
453          int n = rnd.nextInt(6);
# 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