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

Comparing jsr166/src/test/tck/EntryTest.java (file contents):
Revision 1.5 by jsr166, Wed Aug 25 00:07:03 2010 UTC vs.
Revision 1.8 by jsr166, Fri May 27 19:41:25 2011 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   import junit.framework.*;
# Line 22 | Line 22 | public class EntryTest extends JSR166Tes
22      static final String k2 = "2";
23      static final String v2 = "b";
24  
25
25      /**
26       * A new SimpleEntry(k, v) holds k, v.
27       */
# Line 41 | Line 40 | public class EntryTest extends JSR166Tes
40          assertEquals(v1, s.getValue());
41      }
42  
44
43      /**
44       * A new SimpleEntry(entry(k, v)) holds k, v.
45       */
# Line 87 | Line 85 | public class EntryTest extends JSR166Tes
85      public void testNotEquals() {
86          Map.Entry e2 = new AbstractMap.SimpleEntry(k1, v1);
87          Map.Entry e = new AbstractMap.SimpleEntry(k2, v1);
88 <        assertFalse(e2.equals( e));
88 >        assertFalse(e2.equals(e));
89          e = new AbstractMap.SimpleEntry(k1, v2);
90 <        assertFalse(e2.equals( e));
90 >        assertFalse(e2.equals(e));
91          e = new AbstractMap.SimpleEntry(k2, v2);
92 <        assertFalse(e2.equals( e));
92 >        assertFalse(e2.equals(e));
93  
94          Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1);
95          Map.Entry s = new AbstractMap.SimpleImmutableEntry(k2, v1);
96 <        assertFalse(s2.equals( s));
96 >        assertFalse(s2.equals(s));
97          s = new AbstractMap.SimpleImmutableEntry(k1, v2);
98 <        assertFalse(s2.equals( s));
98 >        assertFalse(s2.equals(s));
99          s = new AbstractMap.SimpleImmutableEntry(k2, v2);
100 <        assertFalse(s2.equals( s));
100 >        assertFalse(s2.equals(s));
101      }
102  
105
103      /**
104       * getValue returns last setValue for SimpleEntry
105       */
# Line 113 | Line 110 | public class EntryTest extends JSR166Tes
110          assertEquals(v1, e.getValue());
111          e.setValue(k2);
112          assertEquals(k2, e.getValue());
113 <        assertFalse(e2.equals( e));
113 >        assertFalse(e2.equals(e));
114      }
115  
116      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines