You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2011/08/30 14:02:01 UTC
Re: svn commit: r1163175 - /subversion/trunk/subversion/tests/svn_test.h
On Aug 30, 2011 7:34 AM, <da...@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?
Re: svn commit: r1163175 -
/subversion/trunk/subversion/tests/svn_test.h
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Greg Stein wrote on Tue, Aug 30, 2011 at 08:02:01 -0400:
> Why the substitution of the "SVN_NO_ERROR" constant?
Symmetry with the other branch of the ?: operator.