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 TestListUtils.java TestSetUtils.java
Date Wed, 09 Apr 2003 23:38:26 GMT
scolebourne    2003/04/09 16:38:26

  Modified:    collections/src/test/org/apache/commons/collections
                        TestListUtils.java TestSetUtils.java
  Log:
  Method names and signatures changed to make more generally useful and clear
  
  Revision  Changes    Path
  1.8       +13 -13    jakarta-commons/collections/src/test/org/apache/commons/collections/TestListUtils.java
  
  Index: TestListUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestListUtils.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestListUtils.java	4 Apr 2003 22:22:28 -0000	1.7
  +++ TestListUtils.java	9 Apr 2003 23:38:26 -0000	1.8
  @@ -167,12 +167,12 @@
   		List b = new ArrayList( data );
   		
           assertEquals(true, a.equals(b));
  -        assertEquals(true, ListUtils.equals(a, b));
  +        assertEquals(true, ListUtils.isEqualList(a, b));
           a.clear();
  -        assertEquals(false, ListUtils.equals(a, b));
  -        assertEquals(false, ListUtils.equals(a, null));
  -        assertEquals(false, ListUtils.equals(null, b));
  -        assertEquals(true, ListUtils.equals(null, null));
  +        assertEquals(false, ListUtils.isEqualList(a, b));
  +        assertEquals(false, ListUtils.isEqualList(a, null));
  +        assertEquals(false, ListUtils.isEqualList(null, b));
  +        assertEquals(true, ListUtils.isEqualList(null, null));
   	}
   	
   	public void testHashCode() {
  @@ -182,12 +182,12 @@
   		List b = new ArrayList( data );
   		
           assertEquals(true, a.hashCode() == b.hashCode());
  -        assertEquals(true, a.hashCode() == ListUtils.hashCode(a));
  -        assertEquals(true, b.hashCode() == ListUtils.hashCode(b));
  -        assertEquals(true, ListUtils.hashCode(a) == ListUtils.hashCode(b));
  +        assertEquals(true, a.hashCode() == ListUtils.hashCodeForList(a));
  +        assertEquals(true, b.hashCode() == ListUtils.hashCodeForList(b));
  +        assertEquals(true, ListUtils.hashCodeForList(a) == ListUtils.hashCodeForList(b));
           a.clear();
  -        assertEquals(false, ListUtils.hashCode(a) == ListUtils.hashCode(b));
  -        assertEquals(0, ListUtils.hashCode(null));
  +        assertEquals(false, ListUtils.hashCodeForList(a) == ListUtils.hashCodeForList(b));
  +        assertEquals(0, ListUtils.hashCodeForList(null));
   	}	
   	
   }
  
  
  
  1.6       +13 -13    jakarta-commons/collections/src/test/org/apache/commons/collections/TestSetUtils.java
  
  Index: TestSetUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestSetUtils.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestSetUtils.java	4 Apr 2003 22:22:28 -0000	1.5
  +++ TestSetUtils.java	9 Apr 2003 23:38:26 -0000	1.6
  @@ -148,12 +148,12 @@
           Set b = new HashSet( data );
           
           assertEquals(true, a.equals(b));
  -        assertEquals(true, SetUtils.equals(a, b));
  +        assertEquals(true, SetUtils.isEqualSet(a, b));
           a.clear();
  -        assertEquals(false, SetUtils.equals(a, b));
  -        assertEquals(false, SetUtils.equals(a, null));
  -        assertEquals(false, SetUtils.equals(null, b));
  -        assertEquals(true, SetUtils.equals(null, null));
  +        assertEquals(false, SetUtils.isEqualSet(a, b));
  +        assertEquals(false, SetUtils.isEqualSet(a, null));
  +        assertEquals(false, SetUtils.isEqualSet(null, b));
  +        assertEquals(true, SetUtils.isEqualSet(null, null));
       }
       
       public void testHashCode() {
  @@ -163,12 +163,12 @@
           Set b = new HashSet( data );
           
           assertEquals(true, a.hashCode() == b.hashCode());
  -        assertEquals(true, a.hashCode() == SetUtils.hashCode(a));
  -        assertEquals(true, b.hashCode() == SetUtils.hashCode(b));
  -        assertEquals(true, SetUtils.hashCode(a) == SetUtils.hashCode(b));
  +        assertEquals(true, a.hashCode() == SetUtils.hashCodeForSet(a));
  +        assertEquals(true, b.hashCode() == SetUtils.hashCodeForSet(b));
  +        assertEquals(true, SetUtils.hashCodeForSet(a) == SetUtils.hashCodeForSet(b));
           a.clear();
  -        assertEquals(false, SetUtils.hashCode(a) == SetUtils.hashCode(b));
  -        assertEquals(0, SetUtils.hashCode(null));
  +        assertEquals(false, SetUtils.hashCodeForSet(a) == SetUtils.hashCodeForSet(b));
  +        assertEquals(0, SetUtils.hashCodeForSet(null));
       }   
   
   }
  
  
  

---------------------------------------------------------------------
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