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

Comparing jsr166/src/test/tck/AtomicIntegerArrayTest.java (file contents):
Revision 1.3 by dl, Sun Sep 14 20:42:40 2003 UTC vs.
Revision 1.4 by dl, Sat Sep 20 18:20:07 2003 UTC

# Line 19 | Line 19 | public class AtomicIntegerArrayTest exte
19      }
20  
21  
22 <    public void testConstructor(){
22 >    /**
23 >     *
24 >     */
25 >    public void testConstructor() {
26          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
27          for (int i = 0; i < SIZE; ++i)
28              assertEquals(0,ai.get(i));
29      }
30  
31 <    public void testGetSet(){
31 >    /**
32 >     *
33 >     */
34 >    public void testGetSet() {
35          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
36          for (int i = 0; i < SIZE; ++i) {
37              ai.set(i, 1);
# Line 37 | Line 43 | public class AtomicIntegerArrayTest exte
43          }
44      }
45  
46 <    public void testCompareAndSet(){
46 >    /**
47 >     *
48 >     */
49 >    public void testCompareAndSet() {
50          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
51          for (int i = 0; i < SIZE; ++i) {
52              ai.set(i, 1);
# Line 51 | Line 60 | public class AtomicIntegerArrayTest exte
60          }
61      }
62  
63 <    public void testWeakCompareAndSet(){
63 >    /**
64 >     *
65 >     */
66 >    public void testWeakCompareAndSet() {
67          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
68          for (int i = 0; i < SIZE; ++i) {
69              ai.set(i, 1);
# Line 63 | Line 75 | public class AtomicIntegerArrayTest exte
75          }
76      }
77  
78 <    public void testGetAndSet(){
78 >    /**
79 >     *
80 >     */
81 >    public void testGetAndSet() {
82          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
83          for (int i = 0; i < SIZE; ++i) {
84              ai.set(i, 1);
# Line 73 | Line 88 | public class AtomicIntegerArrayTest exte
88          }
89      }
90  
91 <    public void testGetAndAdd(){
91 >    /**
92 >     *
93 >     */
94 >    public void testGetAndAdd() {
95          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
96          for (int i = 0; i < SIZE; ++i) {
97              ai.set(i, 1);
# Line 84 | Line 102 | public class AtomicIntegerArrayTest exte
102          }
103      }
104  
105 <    public void testGetAndDecrement(){
105 >    /**
106 >     *
107 >     */
108 >    public void testGetAndDecrement() {
109          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
110          for (int i = 0; i < SIZE; ++i) {
111              ai.set(i, 1);
# Line 94 | Line 115 | public class AtomicIntegerArrayTest exte
115          }
116      }
117  
118 <    public void testGetAndIncrement(){
118 >    /**
119 >     *
120 >     */
121 >    public void testGetAndIncrement() {
122          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
123          for (int i = 0; i < SIZE; ++i) {
124              ai.set(i, 1);
# Line 108 | Line 132 | public class AtomicIntegerArrayTest exte
132          }
133      }
134  
135 +    /**
136 +     *
137 +     */
138      public void testAddAndGet() {
139          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
140          for (int i = 0; i < SIZE; ++i) {
# Line 119 | Line 146 | public class AtomicIntegerArrayTest exte
146          }
147      }
148  
149 <    public void testDecrementAndGet(){
149 >    /**
150 >     *
151 >     */
152 >    public void testDecrementAndGet() {
153          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
154          for (int i = 0; i < SIZE; ++i) {
155              ai.set(i, 1);
# Line 130 | Line 160 | public class AtomicIntegerArrayTest exte
160          }
161      }
162  
163 +    /**
164 +     *
165 +     */
166      public void testIncrementAndGet() {
167          AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
168          for (int i = 0; i < SIZE; ++i) {
# Line 168 | Line 201 | public class AtomicIntegerArrayTest exte
201          }
202      }
203  
204 +    /**
205 +     *
206 +     */
207      public void testCountingInMultipleThreads() {
208          try {
209              final AtomicIntegerArray ai = new AtomicIntegerArray(SIZE);
# Line 184 | Line 220 | public class AtomicIntegerArrayTest exte
220              assertEquals(c1.counts+c2.counts, SIZE * COUNTDOWN);
221          }
222          catch(InterruptedException ie) {
223 <            fail("unexpected exception");
223 >            unexpectedException();
224          }
225      }
226  
227  
228 +    /**
229 +     *
230 +     */
231      public void testSerialization() {
232          AtomicIntegerArray l = new AtomicIntegerArray(SIZE);
233          for (int i = 0; i < SIZE; ++i)
# Line 208 | Line 247 | public class AtomicIntegerArrayTest exte
247              }
248          } catch(Exception e){
249              e.printStackTrace();
250 <            fail("unexpected exception");
250 >            unexpectedException();
251          }
252      }
253  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines