subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1310444 - /subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c
Date Fri, 06 Apr 2012 16:19:53 GMT
Author: cmpilato
Date: Fri Apr  6 16:19:52 2012
New Revision: 1310444

URL: http://svn.apache.org/viewvc?rev=1310444&view=rev
Log:
* subversion/tests/libsvn_subr/crypto-test.c
  (test_encrypt_decrypt_password): Lose #define'd code blocks, and use
    svn_crypto__is_available() for condition test skipping.

Modified:
    subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c

Modified: subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c?rev=1310444&r1=1310443&r2=1310444&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c Fri Apr  6 16:19:52 2012
@@ -76,7 +76,6 @@ encrypt_decrypt(svn_crypto__ctx_t *ctx,
 static svn_error_t *
 test_encrypt_decrypt_password(apr_pool_t *pool)
 {
-#ifdef SVN_HAVE_CRYPTO
   svn_crypto__ctx_t *ctx;
   const svn_string_t *master = svn_string_create("Pastor Massword", pool);
   int i;
@@ -87,6 +86,9 @@ test_encrypt_decrypt_password(apr_pool_t
     "mypassphrase", /* with 4-byte padding, should align on block boundary */
   };
 
+  /* Skip this test if the crypto subsystem is unavailable. */
+  if (! svn_crypto__is_available())
+    return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL, NULL);
 
   SVN_ERR(svn_crypto__context_create(&ctx, pool));
 
@@ -99,9 +101,6 @@ test_encrypt_decrypt_password(apr_pool_t
 
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
-#else /* SVN_HAVE_CRYPTO */
-  return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL, NULL);
-#endif /* SVN_HAVE_CRYPTO */
 }
 
 



Mime
View raw message