harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r502481 - in /harmony/enhanced/classlib/trunk/modules/security/src/test: api/java/org/apache/harmony/security/tests/java/security/ impl/java/org/apache/harmony/security/tests/java/security/
Date Fri, 02 Feb 2007 04:36:03 GMT
Author: smishura
Date: Thu Feb  1 20:36:03 2007
New Revision: 502481

URL: http://svn.apache.org/viewvc?view=rev&rev=502481
Log:
MessageDigest: move tests for digest(byte[], int, int) and toString()

Removed:
    harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/MessageDigest_Impl1Test.java
Modified:
    harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/MessageDigest1Test.java
    harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/MessageDigest_Impl2Test.java

Modified: harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/MessageDigest1Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/MessageDigest1Test.java?view=diff&rev=502481&r1=502480&r2=502481
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/MessageDigest1Test.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/MessageDigest1Test.java
Thu Feb  1 20:36:03 2007
@@ -134,9 +134,13 @@
      * @tests java.security.MessageDigest#digest(byte[], int, int)
      */
     public void test_digestLB$LILI() throws Exception {
+        MyMessageDigest1 md = new MyMessageDigest1("ABC");
+        byte[] b = {1, 2, 3, 4, 5};
+        assertEquals("incorrect result", 0, md.digest(b, 2, 3));
+        assertTrue("digest failed", md.runEngineDigest);
 
         // Regression for Harmony-1148
-        MessageDigest md = new MyMessageDigest1();
+        md = new MyMessageDigest1();
         final byte[] bytes = new byte[] { 2, 4, 1 };
         try {
             // buf == null

Modified: harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/MessageDigest_Impl2Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/MessageDigest_Impl2Test.java?view=diff&rev=502481&r1=502480&r2=502481
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/MessageDigest_Impl2Test.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/MessageDigest_Impl2Test.java
Thu Feb  1 20:36:03 2007
@@ -108,6 +108,14 @@
         MessageDigest md2 = MessageDigest.getInstance("CBA", p);
         checkMD2(md2, p);
     }
+
+    /*
+     * Class under test for String toString()
+     */
+    public void testToString() {
+        MyMessageDigest1 md = new MyMessageDigest1("ABC");
+        assertEquals("incorrect result", "MESSAGE DIGEST ABC", md.toString());
+    }
 	
 	private void checkMD1(MessageDigest md1, Provider p) throws Exception {
         byte[] b = { 1, 2, 3, 4, 5 };



Mime
View raw message