apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r596032 - in /apr/apr-util/trunk/test: testdbd.c testdbm.c testmemcache.c testpass.c testqueue.c testreslist.c testrmm.c teststrmatch.c testuri.c testxml.c
Date Sun, 18 Nov 2007 01:32:16 GMT
Author: trawick
Date: Sat Nov 17 17:32:15 2007
New Revision: 596032

URL: http://svn.apache.org/viewvc?rev=596032&view=rev
Log:
fix some obvious reversals of expected and actual values in invocations
of ABTS_INT_EQUAL et al

Modified:
    apr/apr-util/trunk/test/testdbd.c
    apr/apr-util/trunk/test/testdbm.c
    apr/apr-util/trunk/test/testmemcache.c
    apr/apr-util/trunk/test/testpass.c
    apr/apr-util/trunk/test/testqueue.c
    apr/apr-util/trunk/test/testreslist.c
    apr/apr-util/trunk/test/testrmm.c
    apr/apr-util/trunk/test/teststrmatch.c
    apr/apr-util/trunk/test/testuri.c
    apr/apr-util/trunk/test/testxml.c

Modified: apr/apr-util/trunk/test/testdbd.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testdbd.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testdbd.c (original)
+++ apr/apr-util/trunk/test/testdbd.c Sat Nov 17 17:32:15 2007
@@ -183,7 +183,7 @@
     ABTS_ASSERT(tc, "failed to fetch driver", rv == APR_SUCCESS);
     ABTS_PTR_NOTNULL(tc, driver);
 
-    ABTS_STR_EQUAL(tc, apr_dbd_name(driver), "sqlite2");
+    ABTS_STR_EQUAL(tc, "sqlite2", apr_dbd_name(driver));
 
     rv = apr_dbd_open(driver, pool, "data/sqlite2.db:600", &handle);
     ABTS_ASSERT(tc, "failed to open database", rv == APR_SUCCESS);
@@ -205,7 +205,7 @@
     ABTS_ASSERT(tc, "failed to fetch driver", rv == APR_SUCCESS);
     ABTS_PTR_NOTNULL(tc, driver);
 
-    ABTS_STR_EQUAL(tc, apr_dbd_name(driver), "sqlite3");
+    ABTS_STR_EQUAL(tc, "sqlite3", apr_dbd_name(driver));
 
     rv = apr_dbd_open(driver, pool, "data/sqlite3.db", &handle);
     ABTS_ASSERT(tc, "failed to open database", rv == APR_SUCCESS);

Modified: apr/apr-util/trunk/test/testdbm.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testdbm.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testdbm.c (original)
+++ apr/apr-util/trunk/test/testdbm.c Sat Nov 17 17:32:15 2007
@@ -67,13 +67,13 @@
 
     for (; i >= NUM_TABLE_ROWS/2; i--) {
         rv = apr_dbm_store(db, table[i].key, table[i].val);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
         table[i].deleted = FALSE;
     }
 
     for (i = 0; i < NUM_TABLE_ROWS/2; i++) {
         rv = apr_dbm_store(db, table[i].key, table[i].val);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
         table[i].deleted = FALSE;
     }
 }
@@ -88,7 +88,7 @@
         memset(&val, 0, sizeof(val));
         rv = apr_dbm_fetch(db, table[i].key, &val);
         if (!table[i].deleted) {
-            ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+            ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
             ABTS_INT_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);
@@ -108,7 +108,7 @@
         if (i & 1)
             continue;
         rv = apr_dbm_delete(db, table[i].key);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
         table[i].deleted = TRUE;
     }
 }
@@ -135,7 +135,7 @@
     apr_datum_t key;
 
     rv = apr_dbm_firstkey(db, &key);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     do {
         if (key.dptr == NULL || key.dsize == 0)
@@ -146,19 +146,19 @@
                 continue;
             if (memcmp(table[i].key.dptr, key.dptr, key.dsize))
                 continue;
-            ABTS_INT_EQUAL(tc, table[i].deleted, 0);
-            ABTS_INT_EQUAL(tc, table[i].visited, 0);
+            ABTS_INT_EQUAL(tc, 0, table[i].deleted);
+            ABTS_INT_EQUAL(tc, 0, table[i].visited);
             table[i].visited++;
         }
 
         rv = apr_dbm_nextkey(db, &key);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     } while (1);
 
     for (i = 0; i < NUM_TABLE_ROWS; i++) {
         if (table[i].deleted)
             continue;
-        ABTS_INT_EQUAL(tc, table[i].visited, 1);
+        ABTS_INT_EQUAL(tc, 1, table[i].visited);
         table[i].visited = 0;
     }
 }
@@ -172,7 +172,7 @@
     const char *file = apr_pstrcat(p, "data/test-", type, NULL);
 
     rv = apr_dbm_open_ex(&db, type, file, APR_DBM_RWCREATE, APR_OS_DEFAULT, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)
         return;
@@ -188,7 +188,7 @@
     apr_dbm_close(db);
 
     rv = apr_dbm_open_ex(&db, type, file, APR_DBM_READONLY, APR_OS_DEFAULT, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)
         return;

Modified: apr/apr-util/trunk/test/testmemcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testmemcache.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testmemcache.c (original)
+++ apr/apr-util/trunk/test/testmemcache.c Sat Nov 17 17:32:15 2007
@@ -152,7 +152,7 @@
     ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS);
     
     s = apr_memcache_find_server(memcache, HOST, port);
-    ABTS_PTR_EQUAL(tc, s, server);
+    ABTS_PTR_EQUAL(tc, server, s);
     
     rv = apr_memcache_disable_server(memcache, s);
     ABTS_ASSERT(tc, "server disable failed", rv == APR_SUCCESS);
@@ -215,7 +215,7 @@
   memcache->hash_func = my_hash_func;
 
   hres = apr_memcache_hash(memcache, "whatever", sizeof("whatever") - 1);
-  ABTS_INT_EQUAL(tc, hres, HASH_FUNC_RESULT);
+  ABTS_INT_EQUAL(tc, HASH_FUNC_RESULT, hres);
   
   /* add some servers */
   for(i = 1; i <= 10; i++) {
@@ -406,7 +406,7 @@
   rv = apr_memcache_getp(memcache, pool, prefix, &result, &len, NULL);
   ABTS_ASSERT(tc, "get failed", rv == APR_SUCCESS);
 
-  ABTS_INT_EQUAL(tc, atoi(result), 271);
+  ABTS_INT_EQUAL(tc, 271, atoi(result));
 
   rv = apr_memcache_delete(memcache, prefix, 0);
   ABTS_ASSERT(tc, "delete failed", rv == APR_SUCCESS);

Modified: apr/apr-util/trunk/test/testpass.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testpass.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testpass.c (original)
+++ apr/apr-util/trunk/test/testpass.c Sat Nov 17 17:32:15 2007
@@ -93,11 +93,11 @@
     apr_thread_pool_t *thrp;
 
     rv = apr_thread_pool_create(&thrp, NUM_THR/2, NUM_THR, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     for (i = 0; i < NUM_THR; i++) {
         rv = apr_thread_pool_push(thrp, testing_thread, tc, 0, NULL);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     apr_thread_pool_destroy(thrp);

Modified: apr/apr-util/trunk/test/testqueue.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testqueue.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testqueue.c (original)
+++ apr/apr-util/trunk/test/testqueue.c Sat Nov 17 17:32:15 2007
@@ -97,28 +97,28 @@
     srand((unsigned int)apr_time_now());
 
     rv = apr_queue_create(&queue, QUEUE_SIZE, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_thread_pool_create(&thrp, 0, NUMBER_CONSUMERS + NUMBER_PRODUCERS, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     for (i = 0; i < NUMBER_CONSUMERS; i++) {
         rv = apr_thread_pool_push(thrp, consumer, tc, 0, NULL);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     for (i = 0; i < NUMBER_PRODUCERS; i++) {
         rv = apr_thread_pool_push(thrp, producer, tc, 0, NULL);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     apr_sleep(5000000); /* sleep 5 seconds */
 
     rv = apr_queue_term(queue);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_thread_pool_destroy(thrp);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 }
 
 #endif /* APR_HAS_THREADS */

Modified: apr/apr-util/trunk/test/testreslist.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testreslist.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testreslist.c (original)
+++ apr/apr-util/trunk/test/testreslist.c Sat Nov 17 17:32:15 2007
@@ -119,7 +119,7 @@
 
     for (i = 0; i < CONSUMER_ITERATIONS; i++) {
         rv = apr_reslist_acquire(rl, &vp);
-        ABTS_INT_EQUAL(thread_info->tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(thread_info->tc, APR_SUCCESS, rv);
         res = vp;
         apr_sleep(thread_info->work_delay_sleep);
 
@@ -127,10 +127,10 @@
         chance = lgc(chance);
         if ( chance < PERCENT95th ) {
             rv = apr_reslist_release(rl, res);
-            ABTS_INT_EQUAL(thread_info->tc, rv, APR_SUCCESS);
+            ABTS_INT_EQUAL(thread_info->tc, APR_SUCCESS, rv);
         } else {
             rv = apr_reslist_invalidate(rl, res);
-            ABTS_INT_EQUAL(thread_info->tc, rv, APR_SUCCESS);
+            ABTS_INT_EQUAL(thread_info->tc, APR_SUCCESS, rv);
         }
     }
 
@@ -155,7 +155,7 @@
 
     for (i = 0; i < RESLIST_HMAX; i++) {
         rv = apr_reslist_acquire(rl, (void**)&resources[i]);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     /* next call will block until timeout is reached */
@@ -169,7 +169,7 @@
      */
     for (i = 0; i < RESLIST_HMAX; i++) {
         rv = apr_reslist_release(rl, resources[i]);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 }
 
@@ -185,22 +185,22 @@
     /* deplete all possible resources from the resource list */
     for (i = 0; i < RESLIST_HMAX; i++) {
         rv = apr_reslist_acquire(rl, (void**)&resources[i]);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     /* Free all resources above RESLIST_SMAX - 1 */
     for (i = RESLIST_SMAX - 1; i < RESLIST_HMAX; i++) {
         rv = apr_reslist_release(rl, resources[i]);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     for (i = 0; i < RESLIST_HMAX; i++) {
         rv = apr_reslist_acquire(rl, &vp);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
         res = vp;
         apr_sleep(sleep_time);
         rv = apr_reslist_release(rl, res);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
     apr_sleep(sleep_time);
 
@@ -210,7 +210,7 @@
      */
     for (i = 0; i < RESLIST_SMAX - 1; i++) {
         rv = apr_reslist_release(rl, resources[i]);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 }
 
@@ -224,7 +224,7 @@
     my_thread_info_t thread_info[CONSUMER_THREADS];
 
     rv = apr_thread_pool_create(&thrp, CONSUMER_THREADS/2, CONSUMER_THREADS, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     /* Create some parameters that will be passed into each
      * constructor and destructor call. */
@@ -236,7 +236,7 @@
     rv = apr_reslist_create(&rl, RESLIST_MIN, RESLIST_SMAX, RESLIST_HMAX,
                             RESLIST_TTL, my_constructor, my_destructor,
                             params, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     for (i = 0; i < CONSUMER_THREADS; i++) {
         thread_info[i].tid = i;
@@ -245,11 +245,11 @@
         thread_info[i].work_delay_sleep = WORK_DELAY_SLEEP_TIME;
         rv = apr_thread_pool_push(thrp, resource_consuming_thread,
                                   &thread_info[i], 0, NULL);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     rv = apr_thread_pool_destroy(thrp);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     test_timeout(tc, rl);
 
@@ -257,7 +257,7 @@
     ABTS_INT_EQUAL(tc, RESLIST_SMAX, params->c_count - params->d_count);
 
     rv = apr_reslist_destroy(rl);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 }
 
 #endif /* APR_HAS_THREADS */

Modified: apr/apr-util/trunk/test/testrmm.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testrmm.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testrmm.c (original)
+++ apr/apr-util/trunk/test/testrmm.c Sat Nov 17 17:32:15 2007
@@ -42,18 +42,18 @@
     void *entity;
 
     rv = apr_pool_create(&pool, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     /* We're going to want 10 blocks of data from our target rmm. */
     size = SHARED_SIZE + apr_rmm_overhead_get(FRAG_COUNT + 1);
     rv = apr_shm_create(&shm, size, NULL, pool);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)
         return;
 
     rv = apr_rmm_init(&rmm, NULL, apr_shm_baseaddr_get(shm), size, pool);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)
         return;
@@ -93,14 +93,14 @@
         char **c = apr_rmm_addr_get(rmm, off[i]);
         for (j = 0; j < FRAG_SIZE; j++, c++) {
             char *d = apr_itoa(pool, i + j);
-            ABTS_STR_EQUAL(tc, *c, d);
+            ABTS_STR_EQUAL(tc, d, *c);
         }
     }
 
     /* Freeing each fragment */
     for (i = 0; i < FRAG_COUNT; i++) {
         rv = apr_rmm_free(rmm, off[i]);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     /* Creating one large segment */
@@ -114,7 +114,7 @@
 
     /* Freeing large segment */
     rv = apr_rmm_free(rmm, off[0]);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     /* Creating each fragment of size fragsize */
     for (i = 0; i < FRAG_COUNT; i++) {
@@ -124,7 +124,7 @@
     /* Freeing each fragment backwards */
     for (i = FRAG_COUNT - 1; i >= 0; i--) {
         rv = apr_rmm_free(rmm, off[i]);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     /* Creating one large segment (again) */
@@ -132,7 +132,7 @@
 
     /* Freeing large segment */
     rv = apr_rmm_free(rmm, off[0]);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     /* Checking realloc */
     off[0] = apr_rmm_calloc(rmm, SHARED_SIZE - 100);
@@ -142,7 +142,7 @@
 
     entity = apr_rmm_addr_get(rmm, off[1]);
     rv = apr_rmm_free(rmm, off[0]);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     {
         unsigned char *c = entity;
@@ -169,10 +169,10 @@
     }
 
     rv = apr_rmm_destroy(rmm);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_shm_destroy(shm);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     apr_pool_destroy(pool);
 }

Modified: apr/apr-util/trunk/test/teststrmatch.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/teststrmatch.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/teststrmatch.c (original)
+++ apr/apr-util/trunk/test/teststrmatch.c Sat Nov 17 17:32:15 2007
@@ -54,31 +54,31 @@
     ABTS_PTR_NOTNULL(tc, pattern_zero);
 
     match = apr_strmatch(pattern, input1, strlen(input1));
-    ABTS_PTR_EQUAL(tc, match, NULL);
+    ABTS_PTR_EQUAL(tc, NULL, match);
 
     match = apr_strmatch(pattern, input2, strlen(input2));
-    ABTS_PTR_EQUAL(tc, match, input2 + 23);
+    ABTS_PTR_EQUAL(tc, input2 + 23, match);
 
     match = apr_strmatch(pattern_onechar, input1, strlen(input1));
-    ABTS_PTR_EQUAL(tc, match, input1 + 5);
+    ABTS_PTR_EQUAL(tc, input1 + 5, match);
 
     match = apr_strmatch(pattern_zero, input1, strlen(input1));
-    ABTS_PTR_EQUAL(tc, match, input1);
+    ABTS_PTR_EQUAL(tc, input1, match);
 
     match = apr_strmatch(pattern_nocase, input1, strlen(input1));
-    ABTS_PTR_EQUAL(tc, match, input1 + 23);
+    ABTS_PTR_EQUAL(tc, input1 + 23, match);
 
     match = apr_strmatch(pattern, input3, strlen(input3));
-    ABTS_PTR_EQUAL(tc, match, input3);
+    ABTS_PTR_EQUAL(tc, input3, match);
 
     match = apr_strmatch(pattern, input4, strlen(input4));
-    ABTS_PTR_EQUAL(tc, match, input4 + 24);
+    ABTS_PTR_EQUAL(tc, input4 + 24, match);
 
     match = apr_strmatch(pattern, input5, strlen(input5));
-    ABTS_PTR_EQUAL(tc, match, NULL);
+    ABTS_PTR_EQUAL(tc, NULL, match);
 
     match = apr_strmatch(pattern, input6, strlen(input6));
-    ABTS_PTR_EQUAL(tc, match, input6 + 35);
+    ABTS_PTR_EQUAL(tc, input6 + 35, match);
 }
 
 abts_suite *teststrmatch(abts_suite *suite)

Modified: apr/apr-util/trunk/test/testuri.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testuri.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testuri.c (original)
+++ apr/apr-util/trunk/test/testuri.c Sat Nov 17 17:32:15 2007
@@ -205,19 +205,19 @@
                      rv, t->rv);
         ABTS_ASSERT(tc, msg, rv == t->rv);
         if (t->rv == APR_SUCCESS) {
-            ABTS_STR_EQUAL(tc, info.scheme, t->scheme);
-            ABTS_STR_EQUAL(tc, info.hostinfo, t->hostinfo);
-            ABTS_STR_EQUAL(tc, info.user, t->user);
-            ABTS_STR_EQUAL(tc, info.password, t->password);
-            ABTS_STR_EQUAL(tc, info.hostname, t->hostname);
-            ABTS_STR_EQUAL(tc, info.port_str, t->port_str);
-            ABTS_STR_EQUAL(tc, info.path, t->path);
-            ABTS_STR_EQUAL(tc, info.query, t->query);
-            ABTS_STR_EQUAL(tc, info.user, t->user);
-            ABTS_INT_EQUAL(tc, info.port, t->port);
+            ABTS_STR_EQUAL(tc, t->scheme, info.scheme);
+            ABTS_STR_EQUAL(tc, t->hostinfo, info.hostinfo);
+            ABTS_STR_EQUAL(tc, t->user, info.user);
+            ABTS_STR_EQUAL(tc, t->password, info.password);
+            ABTS_STR_EQUAL(tc, t->hostname, info.hostname);
+            ABTS_STR_EQUAL(tc, t->port_str, info.port_str);
+            ABTS_STR_EQUAL(tc, t->path, info.path);
+            ABTS_STR_EQUAL(tc, t->query, info.query);
+            ABTS_STR_EQUAL(tc, t->user, info.user);
+            ABTS_INT_EQUAL(tc, t->port, info.port);
 
             s = apr_uri_unparse(p, &info, APR_URI_UNP_REVEALPASSWORD);
-            ABTS_STR_EQUAL(tc, s, t->uri);
+            ABTS_STR_EQUAL(tc, t->uri, s);
         }
     }
 }
@@ -233,11 +233,11 @@
         memset(&info, 0, sizeof(info));
         t = &uph_tests[i];
         rv = apr_uri_parse_hostinfo(p, t->hostinfo, &info);
-        ABTS_INT_EQUAL(tc, rv, t->rv);
+        ABTS_INT_EQUAL(tc, t->rv, rv);
         if (t->rv == APR_SUCCESS) {
-            ABTS_STR_EQUAL(tc, info.hostname, t->hostname);
-            ABTS_STR_EQUAL(tc, info.port_str, t->port_str);
-            ABTS_INT_EQUAL(tc, info.port, t->port);
+            ABTS_STR_EQUAL(tc, t->hostname, info.hostname);
+            ABTS_STR_EQUAL(tc, t->port_str, info.port_str);
+            ABTS_INT_EQUAL(tc, t->port, info.port);
         }
     }
 }

Modified: apr/apr-util/trunk/test/testxml.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testxml.c?rev=596032&r1=596031&r2=596032&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testxml.c (original)
+++ apr/apr-util/trunk/test/testxml.c Sat Nov 17 17:32:15 2007
@@ -30,7 +30,7 @@
 
     rv = apr_file_mktemp(fd, template, APR_CREATE | APR_TRUNCATE | APR_DELONCLOSE |
                          APR_READ | APR_WRITE | APR_EXCL, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)
         return rv;
@@ -38,19 +38,19 @@
     rv = apr_file_puts("<?xml version=\"1.0\" ?>\n<maryx>"
                        "<had a=\"little\"/><lamb its='fleece "
                        "was white as snow' />\n", *fd);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     for (i = 0; i < 5000; i++) {
         rv = apr_file_puts("<hmm roast=\"lamb\" "
                            "for=\"dinner\">yummy</hmm>\n", *fd);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     rv = apr_file_puts("</mary>\n", *fd);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_seek(*fd, APR_SET, &off);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     return rv;
 }
@@ -65,25 +65,25 @@
 
     rv = apr_file_mktemp(fd, template, APR_CREATE | APR_TRUNCATE | APR_DELONCLOSE |
                          APR_READ | APR_WRITE | APR_EXCL, p);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)
         return rv;
 
     rv = apr_file_puts("<?xml version=\"1.0\" ?>\n<mary>\n", *fd);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     for (i = 0; i < 5000; i++) {
         rv = apr_file_puts("<hmm roast=\"lamb\" "
                            "for=\"dinner\">yummy</hmm>\n", *fd);
-        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     rv = apr_file_puts("</mary>\n", *fd);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_seek(*fd, APR_SET, &off);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     return rv;
 }
@@ -94,20 +94,20 @@
     apr_xml_elem *ec;
 
     if (level == 0) {
-        ABTS_STR_EQUAL(tc, e->name, "mary");
+        ABTS_STR_EQUAL(tc, "mary", e->name);
     } else {
-        ABTS_STR_EQUAL(tc, e->name, "hmm");
+        ABTS_STR_EQUAL(tc, "hmm", e->name);
     }
 
     if (e->attr) {
         a = e->attr;
         ABTS_PTR_NOTNULL(tc, a);
-        ABTS_STR_EQUAL(tc, a->name, "for");
-        ABTS_STR_EQUAL(tc, a->value, "dinner");
+        ABTS_STR_EQUAL(tc, "for", a->name);
+        ABTS_STR_EQUAL(tc, "dinner", a->value);
         a = a->next;
         ABTS_PTR_NOTNULL(tc, a);
-        ABTS_STR_EQUAL(tc, a->name, "roast");
-        ABTS_STR_EQUAL(tc, a->value, "lamb");
+        ABTS_STR_EQUAL(tc, "roast", a->name);
+        ABTS_STR_EQUAL(tc, "lamb", a->value);
     }
     if (e->first_child) {
         ec = e->first_child;
@@ -126,21 +126,21 @@
     apr_status_t rv;
 
     rv = create_dummy_file(tc, p, &fd);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)
         return;
 
     rv = apr_xml_parse_file(p, &parser, &doc, fd, 2000);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     dump_xml(tc, doc->root, 0);
 
     rv = apr_file_close(fd);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = create_dummy_file_error(tc, p, &fd);
-    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)
         return;



Mime
View raw message