commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections TestCollectionUtils.java
Date Sat, 26 Jun 2004 10:00:43 GMT
scolebourne    2004/06/26 03:00:43

  Modified:    collections/src/test/org/apache/commons/collections
                        TestCollectionUtils.java
  Log:
  Enable compiliation under JDK1.5
  
  Revision  Changes    Path
  1.39      +13 -13    jakarta-commons/collections/src/test/org/apache/commons/collections/TestCollectionUtils.java
  
  Index: TestCollectionUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestCollectionUtils.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- TestCollectionUtils.java	27 Apr 2004 20:00:18 -0000	1.38
  +++ TestCollectionUtils.java	26 Jun 2004 10:00:42 -0000	1.39
  @@ -530,16 +530,16 @@
           
           // Enumeration, entry exists
           Vector vector = new Vector(list);
  -        Enumeration enum = vector.elements();
  -        test = CollectionUtils.index(enum,0);
  +        Enumeration en = vector.elements();
  +        test = CollectionUtils.index(en,0);
           assertTrue(test.equals("zero"));
  -        enum = vector.elements();
  -        test = CollectionUtils.index(enum,1);
  +        en = vector.elements();
  +        test = CollectionUtils.index(en,1);
           assertTrue(test.equals("one"));
           
           // Enumeration, non-existent entry -- "dead" enumerator returned
  -        test = CollectionUtils.index(enum,3);
  -        assertTrue(test.equals(enum) && !enum.hasMoreElements());
  +        test = CollectionUtils.index(en,3);
  +        assertTrue(test.equals(en) && !en.hasMoreElements());
           
           // Collection, entry exists
           Bag bag = new HashBag();
  @@ -652,19 +652,19 @@
               Vector vector = new Vector();
               vector.addElement("zero");
               vector.addElement("one");
  -            Enumeration enum = vector.elements();
  -            assertEquals("zero",CollectionUtils.get(enum,0));
  -            enum = vector.elements();
  -            assertEquals("one",CollectionUtils.get(enum,1));
  +            Enumeration en = vector.elements();
  +            assertEquals("zero",CollectionUtils.get(en,0));
  +            en = vector.elements();
  +            assertEquals("one",CollectionUtils.get(en,1));
           
               // Enumerator, non-existent entry 
               try {
  -                CollectionUtils.get(enum,3);
  +                CollectionUtils.get(en,3);
                   fail("Expecting IndexOutOfBoundsException.");
               } catch (IndexOutOfBoundsException e) {
                   // expected
               }
  -            assertTrue(!enum.hasMoreElements());
  +            assertTrue(!en.hasMoreElements());
           }
           
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message