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

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

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

revision 1.20, Sat Oct 9 19:30:35 2010 UTC revision 1.22, Wed Nov 3 16:46:34 2010 UTC
# Line 341  Line 341 
341      }      }
342    
343      /**      /**
344       * toArray(null) throws NPE       * toArray(null) throws NullPointerException
345       */       */
346      public void testToArray_BadArg() {      public void testToArray_NullArg() {
347          LinkedList l = new LinkedList();          LinkedList l = new LinkedList();
348          l.add(new Object());          l.add(new Object());
349          try {          try {
350              Object o[] = l.toArray(null);              l.toArray(null);
351              shouldThrow();              shouldThrow();
352          } catch (NullPointerException success) {}          } catch (NullPointerException success) {}
353      }      }
354    
355      /**      /**
356       * toArray with incompatible array type throws CCE       * toArray(incompatible array type) throws ArrayStoreException
357       */       */
358      public void testToArray1_BadArg() {      public void testToArray1_BadArg() {
359          LinkedList l = new LinkedList();          LinkedList l = new LinkedList();
360          l.add(new Integer(5));          l.add(new Integer(5));
361          try {          try {
362              Object o[] = l.toArray(new String[10]);              l.toArray(new String[10]);
363              shouldThrow();              shouldThrow();
364          } catch (ArrayStoreException success) {}          } catch (ArrayStoreException success) {}
365      }      }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.22

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8