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

Comparing jsr166/src/test/tck/CopyOnWriteArrayListTest.java (file contents):
Revision 1.4 by dl, Sat Sep 20 18:20:07 2003 UTC vs.
Revision 1.5 by dl, Thu Sep 25 11:02:41 2003 UTC

# Line 32 | Line 32 | public class CopyOnWriteArrayListTest ex
32  
33  
34      /**
35 <     *
35 >     * a new list is empty
36       */
37      public void testConstructor() {
38          CopyOnWriteArrayList a = new CopyOnWriteArrayList();
# Line 40 | Line 40 | public class CopyOnWriteArrayListTest ex
40      }
41  
42      /**
43 <     *
43 >     * new list contains all elements of initializing array
44       */
45      public void testConstructor2() {
46          Integer[] ints = new Integer[SIZE];
# Line 52 | Line 52 | public class CopyOnWriteArrayListTest ex
52      }
53  
54      /**
55 <     *
55 >     * new list contains all elements of initializing collection
56       */
57      public void testConstructor3() {
58          Integer[] ints = new Integer[SIZE];
# Line 65 | Line 65 | public class CopyOnWriteArrayListTest ex
65          
66  
67      /**
68 <     *   addAll correctly adds each element from the given collection
68 >     *   addAll  adds each element from the given collection
69       */
70      public void testAddAll() {
71          CopyOnWriteArrayList full = populatedArray(3);
# Line 101 | Line 101 | public class CopyOnWriteArrayListTest ex
101      }
102  
103      /**
104 <     *   addIfAbsent correctly adds the element when it does not exist in the list
104 >     *   addIfAbsent adds the element when it does not exist in the list
105       */
106      public void testAddIfAbsent2() {
107          CopyOnWriteArrayList full = populatedArray(SIZE);
# Line 110 | Line 110 | public class CopyOnWriteArrayListTest ex
110      }
111  
112      /**
113 <     *   clear correctly removes all elements from the list
113 >     *   clear removes all elements from the list
114       */
115      public void testClear() {
116          CopyOnWriteArrayList full = populatedArray(SIZE);
# Line 131 | Line 131 | public class CopyOnWriteArrayListTest ex
131      }
132  
133      /**
134 <     *   contains returns the correct values
134 >     *   contains is true for added elements
135       */
136      public void testContains() {
137          CopyOnWriteArrayList full = populatedArray(3);
# Line 140 | Line 140 | public class CopyOnWriteArrayListTest ex
140      }
141  
142      /**
143 <     *
143 >     * adding at an index places it in the indindicated index
144       */
145      public void testAddIndex() {
146          CopyOnWriteArrayList full = populatedArray(3);
# Line 156 | Line 156 | public class CopyOnWriteArrayListTest ex
156      }
157  
158      /**
159 <     *
159 >     * lists with same elements are equal and have same hashCode
160       */
161      public void testEquals() {
162          CopyOnWriteArrayList a = populatedArray(3);
# Line 175 | Line 175 | public class CopyOnWriteArrayListTest ex
175  
176      
177      /**
178 <     *   containsAll returns the correct values
178 >     *   containsAll returns true for collection with subset of elements
179       */
180      public void testContainsAll() {
181          CopyOnWriteArrayList full = populatedArray(3);
# Line 188 | Line 188 | public class CopyOnWriteArrayListTest ex
188      }
189  
190      /**
191 <     *   get returns the correct value for the given index
191 >     *   get returns the  value at the given index
192       */
193      public void testGet() {
194          CopyOnWriteArrayList full = populatedArray(3);
# Line 196 | Line 196 | public class CopyOnWriteArrayListTest ex
196      }
197  
198      /**
199 <     *   indexOf gives the correct index for the given object
199 >     *   indexOf gives the index for the given object
200       */
201      public void testIndexOf() {
202          CopyOnWriteArrayList full = populatedArray(3);
# Line 205 | Line 205 | public class CopyOnWriteArrayListTest ex
205      }
206  
207      /**
208 <     *   indexOf gives the correct index based on the given index
208 >     *   indexOf gives the index based on the given index
209       *  at which to start searching
210       */
211      public void testIndexOf2() {
# Line 215 | Line 215 | public class CopyOnWriteArrayListTest ex
215      }
216  
217      /**
218 <     *   isEmpty returns the correct values
218 >     *   isEmpty returns true when empty, else false
219       */
220      public void testIsEmpty() {
221          CopyOnWriteArrayList empty = new CopyOnWriteArrayList();
# Line 237 | Line 237 | public class CopyOnWriteArrayListTest ex
237      }
238  
239      /**
240 <     *
240 >     * iterator.remove throws UnsupportedOperationException
241       */
242      public void testIteratorRemove () {
243          CopyOnWriteArrayList full = populatedArray(SIZE);
# Line 251 | Line 251 | public class CopyOnWriteArrayListTest ex
251      }
252  
253      /**
254 <     *
254 >     * toString contains toString of elements
255       */
256      public void testToString() {
257          CopyOnWriteArrayList full = populatedArray(3);
# Line 262 | Line 262 | public class CopyOnWriteArrayListTest ex
262      }        
263  
264      /**
265 <     *   lastIndexOf returns the correct index for the given object
265 >     *   lastIndexOf returns the index for the given object
266       */
267      public void testLastIndexOf1() {
268          CopyOnWriteArrayList full = populatedArray(3);
# Line 273 | Line 273 | public class CopyOnWriteArrayListTest ex
273      }
274  
275      /**
276 <     *   lastIndexOf returns the correct index from the given starting point
276 >     *   lastIndexOf returns the index from the given starting point
277       */
278      public void testlastIndexOf2() {
279          CopyOnWriteArrayList full = populatedArray(3);
# Line 284 | Line 284 | public class CopyOnWriteArrayListTest ex
284      }
285  
286      /**
287 <     *  Identical to testIterator, except ListInterator has more functionality
287 >     *  listIterator traverses all elements
288       */
289      public void testListIterator1() {
290          CopyOnWriteArrayList full = populatedArray(SIZE);
# Line 308 | Line 308 | public class CopyOnWriteArrayListTest ex
308      }
309  
310      /**
311 <     *   remove correctly removes and returns the object at the given index
311 >     *   remove  removes and returns the object at the given index
312       */
313      public void testRemove() {
314          CopyOnWriteArrayList full = populatedArray(3);
# Line 317 | Line 317 | public class CopyOnWriteArrayListTest ex
317      }
318  
319      /**
320 <     *   removeAll correctly removes all elements from the given collection
320 >     *   removeAll  removes all elements from the given collection
321       */
322      public void testRemoveAll() {
323          CopyOnWriteArrayList full = populatedArray(3);
# Line 329 | Line 329 | public class CopyOnWriteArrayListTest ex
329      }
330  
331      /**
332 <     *   set correctly changes the element at the given index
332 >     *   set  changes the element at the given index
333       */
334      public void testSet() {
335          CopyOnWriteArrayList full = populatedArray(3);
# Line 338 | Line 338 | public class CopyOnWriteArrayListTest ex
338      }
339  
340      /**
341 <     *   size returns the correct values
341 >     *   size returns the number of elements
342       */
343      public void testSize() {
344          CopyOnWriteArrayList empty = new CopyOnWriteArrayList();
# Line 375 | Line 375 | public class CopyOnWriteArrayListTest ex
375  
376  
377      /**
378 <     *
378 >     * sublists contains elements at indexes offset from their base
379       */
380      public void testSubList() {
381          CopyOnWriteArrayList a = populatedArray(10);
# Line 595 | Line 595 | public class CopyOnWriteArrayListTest ex
595      }
596  
597      /**
598 <     *
598 >     * a deserialized serialiszed list is equal
599       */
600      public void testSerialization() {
601          CopyOnWriteArrayList q = populatedArray(SIZE);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines