You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/01/27 15:33:01 UTC

svn commit: r1655053 - in /subversion/trunk/subversion/tests: libsvn_diff/parse-diff-test.c libsvn_subr/auth-test.c libsvn_wc/conflict-data-test.c

Author: rhuijben
Date: Tue Jan 27 14:33:00 2015
New Revision: 1655053

URL: http://svn.apache.org/r1655053
Log:
Use SVN_TEST_STRING_ASSERT() in a few more C tests to improve error
reporting.

* subversion/tests/libsvn_diff/parse-diff-test.c
  (test_parse_property_diff): Use SVN_TEST_STRING_ASSERT.

* subversion/tests/libsvn_subr/auth-test.c
  (cleanup_callback,
   test_auth_clear): Use SVN_TEST_STRING_ASSERT.

* subversion/tests/libsvn_wc/conflict-data-test.c
  (test_parse_property_diff): Use SVN_TEST_STRING_ASSERT.

Modified:
    subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c
    subversion/trunk/subversion/tests/libsvn_subr/auth-test.c
    subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c

Modified: subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1655053&r1=1655052&r2=1655053&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_diff/parse-diff-test.c Tue Jan 27 14:33:00 2015
@@ -667,7 +667,7 @@ test_parse_property_diff(apr_pool_t *poo
   prop_patch = apr_hash_get(patch->prop_patches, "prop_add",
                             APR_HASH_KEY_STRING);
 
-  SVN_TEST_ASSERT(!strcmp("prop_add", prop_patch->name));
+  SVN_TEST_STRING_ASSERT(prop_patch->name, "prop_add");
   SVN_TEST_ASSERT(prop_patch->operation == svn_diff_op_added);
   hunks = prop_patch->hunks;
 

Modified: subversion/trunk/subversion/tests/libsvn_subr/auth-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/auth-test.c?rev=1655053&r1=1655052&r2=1655053&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/auth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/auth-test.c Tue Jan 27 14:33:00 2015
@@ -220,8 +220,8 @@ cleanup_callback(svn_boolean_t *delete_c
 {
   svn_auth_baton_t *b = walk_baton;
 
-  SVN_TEST_ASSERT(strcmp(cred_kind, SVN_AUTH_CRED_SIMPLE) == 0);
-  SVN_TEST_ASSERT(strcmp(realmstring, "<http://my.host> My realm") == 0);
+  SVN_TEST_STRING_ASSERT(cred_kind, SVN_AUTH_CRED_SIMPLE);
+  SVN_TEST_STRING_ASSERT(realmstring, "<http://my.host> My realm");
 
   SVN_ERR(svn_auth_forget_credentials(b, cred_kind, realmstring, scratch_pool));
 
@@ -272,7 +272,7 @@ test_auth_clear(apr_pool_t *pool)
                                      pool));
 
   creds = credentials;
-  SVN_TEST_ASSERT(strcmp(creds->username, "jrandom") == 0);
+  SVN_TEST_STRING_ASSERT(creds->username, "jrandom");
   SVN_TEST_ASSERT(creds->may_save);
 
   /* And tell that they are ok and can be saved */
@@ -292,7 +292,7 @@ test_auth_clear(apr_pool_t *pool)
 
   SVN_TEST_ASSERT(credentials);
   creds = credentials;
-  SVN_TEST_ASSERT(strcmp(creds->username, "jrandom") == 0);
+  SVN_TEST_STRING_ASSERT(creds->username, "jrandom");
   SVN_TEST_ASSERT(creds->may_save);
 
   /* Use our walker function to delete credentials (and forget them

Modified: subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1655053&r1=1655052&r2=1655053&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c Tue Jan 27 14:33:00 2015
@@ -621,8 +621,8 @@ test_serialize_tree_conflict(const svn_t
 
     SVN_TEST_ASSERT(reason == svn_wc_conflict_reason_moved_away);
     SVN_TEST_ASSERT(action == svn_wc_conflict_action_delete);
-    SVN_TEST_ASSERT(!strcmp(moved_away_op_root_abspath,
-                            sbox_wc_path(&sbox, "A/B")));
+    SVN_TEST_STRING_ASSERT(moved_away_op_root_abspath,
+                           sbox_wc_path(&sbox, "A/B"));
   }
 
   return SVN_NO_ERROR;