harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r414067 - /incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/
Date Wed, 14 Jun 2006 04:31:41 GMT
Author: smishura
Date: Tue Jun 13 21:31:41 2006
New Revision: 414067

URL: http://svn.apache.org/viewvc?rev=414067&view=rev
Log:
Removing assertDeserialized methods - PermissionCollection objects are compared by testing
framework's comparator

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/AllPermissionCollectionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/UnresolvedPermissionCollectionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/AllPermissionCollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/AllPermissionCollectionTest.java?rev=414067&r1=414066&r2=414067&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/AllPermissionCollectionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/AllPermissionCollectionTest.java
Tue Jun 13 21:31:41 2006
@@ -41,11 +41,4 @@
         c2.add(new AllPermission());
         return new Object[] { c1, c2 };
     }
-
-    protected void assertDeserialized(Object golden, Object test) {
-        assertSame(golden.getClass(), test.getClass());
-        Enumeration e1 = ((PermissionCollection) golden).elements();
-        Enumeration e2 = ((PermissionCollection) test).elements();
-        assertEquals(e1.hasMoreElements(), e2.hasMoreElements());
-    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java?rev=414067&r1=414066&r2=414067&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java
Tue Jun 13 21:31:41 2006
@@ -45,15 +45,4 @@
         c3.add(new RealBasicPermission("1.4.kjhgj.*"));
         return new Object[] {c1,c2,c3};
     }
-    
-    protected void assertDeserialized(Object golden, Object test) {
-        assertSame(golden.getClass(), test.getClass());
-        PermissionCollection c1 = (PermissionCollection)golden;
-        PermissionCollection c2 = (PermissionCollection)test;
-        Collection s1 = new HashSet();
-        Collection s2 = new HashSet();
-        for(Enumeration en = c1.elements(); en.hasMoreElements(); s1.add(en.nextElement()))
{}
-        for(Enumeration en = c2.elements(); en.hasMoreElements(); s2.add(en.nextElement()))
{}
-        assertEquals(s1, s2);
-    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java?rev=414067&r1=414066&r2=414067&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java
Tue Jun 13 21:31:41 2006
@@ -43,12 +43,6 @@
         return new Object[] { new RealPermissionCollection(false),
                 new RealPermissionCollection(true) };
     }
-
-    protected void assertDeserialized(Object golden, Object test) {
-        assertSame(golden.getClass(), test.getClass());
-        assertEquals(((PermissionCollection) golden).isReadOnly(),
-                ((PermissionCollection) test).isReadOnly());
-    }
 }
 
 // Bare extension to instantiate abstract PermissionCollection class

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java?rev=414067&r1=414066&r2=414067&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java
Tue Jun 13 21:31:41 2006
@@ -55,25 +55,6 @@
         return new Object[] {
             new Permissions(), ps };
     }
-
-    /**
-     * Checks that "golden" and "test" collections contain same set of elements.
-     */
-    protected void assertDeserialized(Object golden, Object test) {
-        assertSame(golden.getClass(), test.getClass());
-        PermissionCollection c1 = (PermissionCollection)golden;
-        PermissionCollection c2 = (PermissionCollection)test;
-        Collection s1 = new HashSet();
-        Collection s2 = new HashSet();
-        for (Enumeration en = c1.elements(); en.hasMoreElements(); s1.add(en
-            .nextElement())) {
-        }
-        for (Enumeration en = c2.elements(); en.hasMoreElements(); s2.add(en
-            .nextElement())) {
-        }
-        assertTrue(s1.containsAll(s2));
-        assertTrue(s2.containsAll(s1));
-    }
 }
 
 /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/UnresolvedPermissionCollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/UnresolvedPermissionCollectionTest.java?rev=414067&r1=414066&r2=414067&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/UnresolvedPermissionCollectionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/UnresolvedPermissionCollectionTest.java
Tue Jun 13 21:31:41 2006
@@ -55,21 +55,4 @@
         pc3.add(up3);
         return new Object[] { pc1, pc2, pc3 };
     }
-
-    /**
-     * Checks that "golden" and "test" collections contain same elements.
-     */
-    protected void assertDeserialized(Object golden, Object test) {
-        assertSame(golden.getClass(), test.getClass());
-        PermissionCollection c1 = (PermissionCollection) golden;
-        PermissionCollection c2 = (PermissionCollection) test;
-        Collection s1 = new HashSet();
-        Collection s2 = new HashSet();
-        for (Enumeration en = c1.elements(); en.hasMoreElements(); s1.add(en
-                .nextElement())) {}
-        for (Enumeration en = c2.elements(); en.hasMoreElements(); s2.add(en
-                .nextElement())) {}
-        assertTrue(s1.containsAll(s2));
-        assertTrue(s2.containsAll(s1));
-    }
 }



Mime
View raw message