[cvs] / jsr166 / src / test / tck / AtomicIntegerArrayTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AtomicIntegerArrayTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6, Sat Dec 27 19:26:43 2003 UTC revision 1.7, Thu Jan 8 01:29:46 2004 UTC
# Line 30  Line 30 
30      }      }
31    
32      /**      /**
33         * constructor with null array throws NPE
34         */
35        public void testConstructor2NPE() {
36            try {
37                int[] a = null;
38                AtomicIntegerArray ai = new AtomicIntegerArray(a);
39            } catch (NullPointerException success) {
40            } catch (Exception ex) {
41                unexpectedException();
42            }
43        }
44    
45        /**
46         * constructor with array is of same size and has all elements
47         */
48        public void testConstructor2() {
49            int[] a = { 17, 3, -42, 99, -7};
50            AtomicIntegerArray ai = new AtomicIntegerArray(a);
51            assertEquals(a.length, ai.length());
52            for (int i = 0; i < a.length; ++i)
53                assertEquals(a[i], ai.get(i));
54        }
55    
56        /**
57       * get and set for out of bound indices throw IndexOutOfBoundsException       * get and set for out of bound indices throw IndexOutOfBoundsException
58       */       */
59      public void testIndexing(){      public void testIndexing(){

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8