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

Comparing jsr166/src/test/tck/TreeSubMapTest.java (file contents):
Revision 1.25 by dl, Tue Jan 26 13:33:06 2021 UTC vs.
Revision 1.26 by jsr166, Wed Jan 27 01:57:25 2021 UTC

# Line 29 | Line 29 | public class TreeSubMapTest extends JSR1
29       * Returns a new map from Items 1-5 to Strings "A"-"E".
30       */
31      private static NavigableMap<Item,String> map5() {
32 <        TreeMap<Item,String> map = new TreeMap<Item,String>();
32 >        TreeMap<Item,String> map = new TreeMap<>();
33          assertTrue(map.isEmpty());
34          map.put(zero, "Z");
35          map.put(one, "A");
# Line 44 | Line 44 | public class TreeSubMapTest extends JSR1
44      }
45  
46      private static NavigableMap<Item,String> map0() {
47 <        TreeMap<Item,String> map = new TreeMap<Item,String>();
47 >        TreeMap<Item,String> map = new TreeMap<>();
48          assertTrue(map.isEmpty());
49          return map.tailMap(one, true);
50      }
# Line 53 | Line 53 | public class TreeSubMapTest extends JSR1
53       * Returns a new map from Items -5 to -1 to Strings "A"-"E".
54       */
55      private static NavigableMap<Item,String> dmap5() {
56 <        TreeMap<Item,String> map = new TreeMap<Item,String>();
56 >        TreeMap<Item,String> map = new TreeMap<>();
57          assertTrue(map.isEmpty());
58          map.put(minusOne, "A");
59          map.put(minusFive, "E");
# Line 66 | Line 66 | public class TreeSubMapTest extends JSR1
66      }
67  
68      private static NavigableMap<Item,String> dmap0() {
69 <        TreeMap<Item,String> map = new TreeMap<Item,String>();
69 >        TreeMap<Item,String> map = new TreeMap<>();
70          assertTrue(map.isEmpty());
71          return map;
72      }
# Line 735 | Line 735 | public class TreeSubMapTest extends JSR1
735          NavigableMap<Item,String> map = dmap5();
736          Collection<String> v = map.values();
737          String[] ar = v.toArray(new String[0]);
738 <        ArrayList<String> s = new ArrayList<String>(Arrays.asList(ar));
738 >        ArrayList<String> s = new ArrayList<>(Arrays.asList(ar));
739          mustEqual(5, ar.length);
740          assertTrue(s.contains("A"));
741          assertTrue(s.contains("B"));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines