test/jdk/java/util/Collections/EmptyNavigableSet.java
changeset 48843 21efc1774302
parent 48541 946e34c2dec9
child 51951 1239bfca87f8
equal deleted inserted replaced
48842:a5a2e4770524 48843:21efc1774302
   161     /**
   161     /**
   162      * Tests that the iterator is empty.
   162      * Tests that the iterator is empty.
   163      */
   163      */
   164     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
   164     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
   165     public void testEmptyIterator(String description, NavigableSet<?> navigableSet) {
   165     public void testEmptyIterator(String description, NavigableSet<?> navigableSet) {
   166         Iterator emptyIterator = navigableSet.iterator();
   166         assertFalse(navigableSet.iterator().hasNext(), "The iterator is not empty.");
   167 
       
   168         assertFalse((emptyIterator != null) && (emptyIterator.hasNext()),
       
   169             "The iterator is not empty.");
       
   170     }
   167     }
   171 
   168 
   172     /**
   169     /**
   173      * Tests that the set is empty.
   170      * Tests that the set is empty.
   174      */
   171      */