Author: cmpilato
Date: Fri Apr 13 17:40:26 2012
New Revision: 1325862
URL: http://svn.apache.org/viewvc?rev=1325862&view=rev
Log:
Non-logic changes only.
* subversion/tests/libsvn_subr/crypto-test.c
(): Clearly separate helper and test funcs.
(test_passphrase_check): Move (and expand) a comment to the
appropriate location.
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=1325862&r1=1325861&r2=1325862&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c Fri Apr 13
17:40:26 2012
@@ -29,7 +29,10 @@
#include "../svn_test.h"
#include "../../libsvn_subr/crypto.h"
-/* Helper function: encrypt PASSWORD within CTX using MASTER, then
+
+/*** Helper functions ***/
+
+/* Encrypt PASSWORD within CTX using MASTER, then
decrypt those results and ensure the original PASSWORD comes out
the other end. */
static svn_error_t *
@@ -73,6 +76,9 @@ encrypt_decrypt(svn_crypto__ctx_t *ctx,
}
+
+/*** Test functions ***/
+
static svn_error_t *
test_encrypt_decrypt_password(apr_pool_t *pool)
{
@@ -141,6 +147,9 @@ test_passphrase_check(apr_pool_t *pool)
"Error validating secret against checktext");
}
+ /* Now check that a bogus secret causes the validation to fail. We
+ try to verify each secret against the checktext generated by the
+ previous one. */
for (i = 0; i < num_passwords; i++)
{
int test_secret_index = (i + 1) % num_passwords;
@@ -159,8 +168,6 @@ test_passphrase_check(apr_pool_t *pool)
"got success");
}
- /* Now check that a bogus secret causes the validation to fail. */
-
svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}