apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r587653 - in /apr/apr-util/branches/1.2.x/test: testdbm.c testmd4.c testmd5.c testpass.c
Date Tue, 23 Oct 2007 21:11:42 GMT
Author: wrowe
Date: Tue Oct 23 14:11:42 2007
New Revision: 587653

URL: http://svn.apache.org/viewvc?rev=587653&view=rev
Log:
Fix size misassumptions and flaws in the tests

Modified:
    apr/apr-util/branches/1.2.x/test/testdbm.c
    apr/apr-util/branches/1.2.x/test/testmd4.c
    apr/apr-util/branches/1.2.x/test/testmd5.c
    apr/apr-util/branches/1.2.x/test/testpass.c

Modified: apr/apr-util/branches/1.2.x/test/testdbm.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/test/testdbm.c?rev=587653&r1=587652&r2=587653&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/test/testdbm.c (original)
+++ apr/apr-util/branches/1.2.x/test/testdbm.c Tue Oct 23 14:11:42 2007
@@ -89,11 +89,11 @@
         rv = apr_dbm_fetch(db, table[i].key, &val);
         if (!table[i].deleted) {
             ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
-            ABTS_INT_EQUAL(tc, table[i].val.dsize, val.dsize);
+            ABTS_INT_EQUAL(tc, (int)table[i].val.dsize, (int)val.dsize);
             ABTS_INT_EQUAL(tc, 0, memcmp(table[i].val.dptr, val.dptr, val.dsize));
             apr_dbm_freedatum(db, val);
         } else {
-            ABTS_INT_EQUAL(tc, 0, val.dsize);
+            ABTS_INT_EQUAL(tc, 0, (int)val.dsize);
         }
     }
 }

Modified: apr/apr-util/branches/1.2.x/test/testmd4.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/test/testmd4.c?rev=587653&r1=587652&r2=587653&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/test/testmd4.c (original)
+++ apr/apr-util/branches/1.2.x/test/testmd4.c Tue Oct 23 14:11:42 2007
@@ -95,7 +95,7 @@
         unsigned char digest[APR_MD4_DIGESTSIZE];
         const void *string = md4sums[count].string;
         const void *sum = md4sums[count].md4sum;
-        unsigned int len = strlen(string);
+        apr_size_t len = strlen(string);
 
         ABTS_ASSERT(tc, "apr_md4_init", (apr_md4_init(&context) == 0));
         ABTS_ASSERT(tc, "apr_md4_update", 

Modified: apr/apr-util/branches/1.2.x/test/testmd5.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/test/testmd5.c?rev=587653&r1=587652&r2=587653&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/test/testmd5.c (original)
+++ apr/apr-util/branches/1.2.x/test/testmd5.c Tue Oct 23 14:11:42 2007
@@ -55,7 +55,7 @@
         unsigned char digest[APR_MD5_DIGESTSIZE];
         const void *string = md5sums[count].string;
         const void *sum = md5sums[count].digest;
-        unsigned int len = strlen(string);
+        apr_size_t len = strlen(string);
 
         ABTS_ASSERT(tc, "apr_md5_init", (apr_md5_init(&context) == 0));
         ABTS_ASSERT(tc, "apr_md5_update", 

Modified: apr/apr-util/branches/1.2.x/test/testpass.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/test/testpass.c?rev=587653&r1=587652&r2=587653&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/test/testpass.c (original)
+++ apr/apr-util/branches/1.2.x/test/testpass.c Tue Oct 23 14:11:42 2007
@@ -108,7 +108,7 @@
     const char *pass = "hellojed";
     char hash[100];
 
-    apr_sha1_base64(pass, strlen(pass), hash);
+    apr_sha1_base64(pass, (int)strlen(pass), hash);
 
     apr_assert_success(tc, "SHA1 password validated",
                        apr_password_validate(pass, hash));



Mime
View raw message