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

Comparing jsr166/src/test/tck/AtomicReferenceArrayTest.java (file contents):
Revision 1.35 by jsr166, Fri Jun 17 19:00:48 2016 UTC vs.
Revision 1.36 by jsr166, Wed Jan 4 06:09:58 2017 UTC

# Line 24 | Line 24 | public class AtomicReferenceArrayTest ex
24       * constructor creates array of given size with all elements null
25       */
26      public void testConstructor() {
27 <        AtomicReferenceArray<Integer> aa = new AtomicReferenceArray<Integer>(SIZE);
27 >        AtomicReferenceArray<Integer> aa = new AtomicReferenceArray<>(SIZE);
28          for (int i = 0; i < SIZE; i++) {
29              assertNull(aa.get(i));
30          }
# Line 46 | Line 46 | public class AtomicReferenceArrayTest ex
46       */
47      public void testConstructor2() {
48          Integer[] a = { two, one, three, four, seven };
49 <        AtomicReferenceArray<Integer> aa = new AtomicReferenceArray<Integer>(a);
49 >        AtomicReferenceArray<Integer> aa = new AtomicReferenceArray<>(a);
50          assertEquals(a.length, aa.length());
51          for (int i = 0; i < a.length; i++)
52              assertEquals(a[i], aa.get(i));
# Line 71 | Line 71 | public class AtomicReferenceArrayTest ex
71       * get and set for out of bound indices throw IndexOutOfBoundsException
72       */
73      public void testIndexing() {
74 <        AtomicReferenceArray<Integer> aa = new AtomicReferenceArray<Integer>(SIZE);
74 >        AtomicReferenceArray<Integer> aa = new AtomicReferenceArray<>(SIZE);
75          for (int index : new int[] { -1, SIZE }) {
76              try {
77                  aa.get(index);
# Line 213 | Line 213 | public class AtomicReferenceArrayTest ex
213       */
214      public void testToString() {
215          Integer[] a = { two, one, three, four, seven };
216 <        AtomicReferenceArray<Integer> aa = new AtomicReferenceArray<Integer>(a);
216 >        AtomicReferenceArray<Integer> aa = new AtomicReferenceArray<>(a);
217          assertEquals(Arrays.toString(a), aa.toString());
218      }
219  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines