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