ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/Collections/EmptyNavigableSet.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/Collections/EmptyNavigableSet.java (file contents):
Revision 1.6 by jsr166, Mon May 15 21:39:24 2017 UTC vs.
Revision 1.8 by jsr166, Sun Jan 7 23:26:04 2018 UTC

# Line 50 | Line 50 | import static org.testng.Assert.assertTr
50   public class EmptyNavigableSet {
51  
52      public static <T> void assertInstance(T actual, Class<? extends T> expected) {
53 <        assertInstance(expected.isInstance(actual), null);
53 >        assertInstance(actual, expected, null);
54      }
55  
56      public static <T> void assertInstance(T actual, Class<? extends T> expected, String message) {
# Line 182 | Line 182 | public class EmptyNavigableSet {
182       */
183      @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
184      public void testFirst(String description, NavigableSet<?> navigableSet) {
185 <        assertThrowsNSEE(() -> {
186 <            navigableSet.first();
187 <        }, description);
185 >        assertThrowsNSEE(navigableSet::first, description);
186      }
187  
188      /**
# Line 210 | Line 208 | public class EmptyNavigableSet {
208       */
209      @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
210      public void testLast(String description, NavigableSet<?> navigableSet) {
211 <        assertThrowsNSEE(() -> {
214 <            navigableSet.last();
215 <        }, description);
211 >        assertThrowsNSEE(navigableSet::last, description);
212      }
213  
214      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines