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.21 by jsr166, Tue May 31 16:16:23 2011 UTC vs.
Revision 1.22 by jsr166, Fri Jun 10 19:26:10 2011 UTC

# Line 51 | Line 51 | public class AtomicReferenceArrayTest ex
51      }
52  
53      /**
54 +     * Initialize AtomicReference<Class> with SubClass[]
55 +     */
56 +    public void testConstructorSubClassArray() {
57 +        Integer[] a = { two, one, three, four, seven };
58 +        AtomicReferenceArray<Number> aa = new AtomicReferenceArray<Number>(a);
59 +        assertEquals(a.length, aa.length());
60 +        for (int i = 0; i < a.length; ++i) {
61 +            assertSame(a[i], aa.get(i));
62 +            Long x = Long.valueOf(i);
63 +            aa.set(i, x);
64 +            assertSame(x, aa.get(i));
65 +        }
66 +    }
67 +
68 +    /**
69       * get and set for out of bound indices throw IndexOutOfBoundsException
70       */
71      public void testIndexing() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines