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

Comparing jsr166/src/test/tck/LinkedListTest.java (file contents):
Revision 1.10 by jsr166, Mon Nov 2 20:28:31 2009 UTC vs.
Revision 1.11 by jsr166, Mon Nov 16 04:57:10 2009 UTC

# Line 26 | Line 26 | public class LinkedListTest extends JSR1
26      private LinkedList populatedQueue(int n) {
27          LinkedList q = new LinkedList();
28          assertTrue(q.isEmpty());
29 <        for(int i = 0; i < n; ++i)
29 >        for (int i = 0; i < n; ++i)
30              assertTrue(q.offer(new Integer(i)));
31          assertFalse(q.isEmpty());
32          assertEquals(n, q.size());
# Line 169 | Line 169 | public class LinkedListTest extends JSR1
169              m.add(new Object());
170              l.addAll(4,m);
171              shouldThrow();
172 <        } catch(IndexOutOfBoundsException  success) {}
172 >        } catch (IndexOutOfBoundsException  success) {}
173      }
174  
175      /**
# Line 183 | Line 183 | public class LinkedListTest extends JSR1
183              m.add(new Object());
184              l.addAll(-1,m);
185              shouldThrow();
186 <        } catch(IndexOutOfBoundsException  success){}
186 >        } catch (IndexOutOfBoundsException  success){}
187      }
188  
189      /**
# Line 339 | Line 339 | public class LinkedListTest extends JSR1
339          LinkedList q = populatedQueue(SIZE);
340          Object[] o = q.toArray();
341          Arrays.sort(o);
342 <        for(int i = 0; i < o.length; i++)
342 >        for (int i = 0; i < o.length; i++)
343              assertEquals(o[i], q.poll());
344      }
345  
# Line 351 | Line 351 | public class LinkedListTest extends JSR1
351          Integer[] ints = new Integer[SIZE];
352          ints = (Integer[])q.toArray(ints);
353          Arrays.sort(ints);
354 <        for(int i = 0; i < ints.length; i++)
354 >        for (int i = 0; i < ints.length; i++)
355              assertEquals(ints[i], q.poll());
356      }
357  
# Line 364 | Line 364 | public class LinkedListTest extends JSR1
364              l.add(new Object());
365              Object o[] = l.toArray(null);
366              shouldThrow();
367 <        } catch(NullPointerException success){}
367 >        } catch (NullPointerException success){}
368      }
369  
370      /**
# Line 376 | Line 376 | public class LinkedListTest extends JSR1
376              l.add(new Integer(5));
377              Object o[] = l.toArray(new String[10] );
378              shouldThrow();
379 <        } catch(ArrayStoreException  success){}
379 >        } catch (ArrayStoreException  success){}
380      }
381  
382      /**
# Line 386 | Line 386 | public class LinkedListTest extends JSR1
386          LinkedList q = populatedQueue(SIZE);
387          int i = 0;
388          Iterator it = q.iterator();
389 <        while(it.hasNext()) {
389 >        while (it.hasNext()) {
390              assertTrue(q.contains(it.next()));
391              ++i;
392          }
# Line 434 | Line 434 | public class LinkedListTest extends JSR1
434          LinkedList q = populatedQueue(SIZE);
435          int i = 0;
436          Iterator it = q.descendingIterator();
437 <        while(it.hasNext()) {
437 >        while (it.hasNext()) {
438              assertTrue(q.contains(it.next()));
439              ++i;
440          }
# Line 442 | Line 442 | public class LinkedListTest extends JSR1
442          assertFalse(it.hasNext());
443          try {
444              it.next();
445 <        } catch(NoSuchElementException success) {
445 >        } catch (NoSuchElementException success) {
446          }
447      }
448  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines