[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1163175 - /subversion/trunk/subversion/tests/svn_test.h

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 30 Aug 2011 08:02:01 -0400

On Aug 30, 2011 7:34 AM, <danielsh_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/tests/svn_test.h Tue Aug 30 11:33:32 2011
> @@ -57,13 +57,14 @@ extern "C" {
> * EXPECTED must be a real error (neither SVN_NO_ERROR nor APR_SUCCESS).
*/
> #define SVN_TEST_ASSERT_ERROR(expr, expected)
\
> do {
 \
> + svn_error_t *err__ = (expr);
 \
> SVN_ERR_ASSERT((expected));
\
> - if ((expr) == SVN_NO_ERROR || (expr)->apr_err != (expected))
 \
> - return (expr) ? svn_error_createf(SVN_ERR_TEST_FAILED, (expr),
 \
> - "Expected error %d but got %d",
\
> - (expected),
\
> - (expr)->apr_err)
 \
> - : svn_error_createf(SVN_ERR_TEST_FAILED, (expr),
 \
> + if (err__ == SVN_NO_ERROR || err__->apr_err != (expected))
 \
> + return err__ ? svn_error_createf(SVN_ERR_TEST_FAILED, err__,
 \
> + "Expected error %d but got %d",
 \
> + (expected),
 \
> + err__->apr_err)
 \
> + : svn_error_createf(SVN_ERR_TEST_FAILED, err__,
 \
> "Expected error %d but got %s",
\
> (expected),
\
> "SVN_NO_ERROR");
 \

Why the substitution of the "SVN_NO_ERROR" constant?
Received on 2011-08-30 14:02:34 CEST

This is an archived mail posted to the Subversion Dev mailing list.