svn commit: r1920631 - in /apr/apr-util/branches/1.7.x/test: testbuckets.c testdbm.c testjson.c testmd4.c testmd5.c

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <[email protected]>
Author: ivan
Date: Sat Sep 14 15:05:49 2024
New Revision: 1920631

URL: http://svn.apache.org/viewvc?rev=1920631&view=rev
Log:
Tests: Use more appropriate types in compare/assert.

Modified:
    apr/apr-util/branches/1.7.x/test/testbuckets.c
    apr/apr-util/branches/1.7.x/test/testdbm.c
    apr/apr-util/branches/1.7.x/test/testjson.c
    apr/apr-util/branches/1.7.x/test/testmd4.c
    apr/apr-util/branches/1.7.x/test/testmd5.c

Modified: apr/apr-util/branches/1.7.x/test/testbuckets.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/test/testbuckets.c?rev=1920631&r1=1920630&r2=1920631&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/test/testbuckets.c (original)
+++ apr/apr-util/branches/1.7.x/test/testbuckets.c Sat Sep 14 15:05:49 2024
@@ -649,9 +649,9 @@ static void test_iovec(abts_case *tc, vo
 
     ABTS_INT_EQUAL(tc, 2, vecs);
     ABTS_STR_EQUAL(tc, "foo", vec[0].iov_base);
-    ABTS_INT_EQUAL(tc, 3, vec[0].iov_len);
+    ABTS_SIZE_EQUAL(tc, 3, vec[0].iov_len);
     ABTS_STR_EQUAL(tc, "bar", vec[1].iov_base);
-    ABTS_INT_EQUAL(tc, 3, vec[1].iov_len);
+    ABTS_SIZE_EQUAL(tc, 3, vec[1].iov_len);
 
     apr_brigade_destroy(bb);
     apr_bucket_alloc_destroy(ba);

Modified: apr/apr-util/branches/1.7.x/test/testdbm.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/test/testdbm.c?rev=1920631&r1=1920630&r2=1920631&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/test/testdbm.c (original)
+++ apr/apr-util/branches/1.7.x/test/testdbm.c Sat Sep 14 15:05:49 2024
@@ -89,11 +89,11 @@ static void test_dbm_fetch(abts_case *tc
         rv = apr_dbm_fetch(db, table[i].key, &val);
         if (!table[i].deleted) {
             ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-            ABTS_INT_EQUAL(tc, table[i].val.dsize, val.dsize);
+            ABTS_SIZE_EQUAL(tc, table[i].val.dsize, 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_SIZE_EQUAL(tc, 0, val.dsize);
         }
     }
 }

Modified: apr/apr-util/branches/1.7.x/test/testjson.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/test/testjson.c?rev=1920631&r1=1920630&r2=1920631&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/test/testjson.c (original)
+++ apr/apr-util/branches/1.7.x/test/testjson.c Sat Sep 14 15:05:49 2024
@@ -61,14 +61,14 @@ static void test_json_identity(abts_case
 
     ABTS_STR_NEQUAL(tc, src, buf, len);
 
-    ABTS_INT_EQUAL(tc, len, offset);
+    ABTS_ULLONG_EQUAL(tc, len, offset);
     ABTS_INT_EQUAL(tc, APR_JSON_OBJECT, json->type);
     image = apr_hash_get(json->value.object->hash, "Image", 5);
     ABTS_PTR_NOTNULL(tc, image);
     width = apr_hash_get(image->v->value.object->hash, "Width", 5);
     ABTS_PTR_NOTNULL(tc, width);
     ABTS_INT_EQUAL(tc, APR_JSON_LONG, width->v->type);
-    ABTS_INT_EQUAL(tc, 800, width->v->value.lnumber);
+    ABTS_LLONG_EQUAL(tc, 800, width->v->value.lnumber);
     ids = apr_hash_get(image->v->value.object->hash, "IDs", 3);
     ABTS_PTR_NOTNULL(tc, ids);
     ABTS_INT_EQUAL(tc, APR_JSON_ARRAY, ids->v->type);
@@ -85,7 +85,7 @@ static void test_json_identity(abts_case
     height = apr_hash_get(image->v->value.object->hash, "Height", 6);
     ABTS_PTR_NOTNULL(tc, height);
     ABTS_INT_EQUAL(tc, APR_JSON_LONG, height->v->type);
-    ABTS_INT_EQUAL(tc, 600, height->v->value.lnumber);
+    ABTS_LLONG_EQUAL(tc, 600, height->v->value.lnumber);
 
 }
 

Modified: apr/apr-util/branches/1.7.x/test/testmd4.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/test/testmd4.c?rev=1920631&r1=1920630&r2=1920631&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/test/testmd4.c (original)
+++ apr/apr-util/branches/1.7.x/test/testmd4.c Sat Sep 14 15:05:49 2024
@@ -95,7 +95,7 @@ static void test_md4sum(abts_case *tc, v
         unsigned char digest[APR_MD4_DIGESTSIZE];
         const void *string = md4sums[count].string;
         const void *sum = md4sums[count].md4sum;
-        unsigned int len = strlen(string);
+        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.7.x/test/testmd5.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/test/testmd5.c?rev=1920631&r1=1920630&r2=1920631&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/test/testmd5.c (original)
+++ apr/apr-util/branches/1.7.x/test/testmd5.c Sat Sep 14 15:05:49 2024
@@ -55,7 +55,7 @@ static void test_md5sum(abts_case *tc, v
         unsigned char digest[APR_MD5_DIGESTSIZE];
         const void *string = md5sums[count].string;
         const void *sum = md5sums[count].digest;
-        unsigned int len = strlen(string);
+        size_t len = strlen(string);
 
         ABTS_ASSERT(tc, "apr_md5_init", (apr_md5_init(&context) == 0));
         ABTS_ASSERT(tc, "apr_md5_update",
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.