From: Niels Möller Date: Mon, 3 Oct 2011 07:42:14 +0000 (+0200) Subject: (ASSERT): Write message to stderr. X-Git-Tag: converted-master-branch-to-git~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af1d0e1c73708c006c201633647cf4951b2ff9a0;p=thirdparty%2Fnettle.git (ASSERT): Write message to stderr. Rev: nettle/testsuite/testutils.h:1.9 --- diff --git a/testsuite/testutils.h b/testsuite/testutils.h index 265cc498..d7ced9a8 100644 --- a/testsuite/testutils.h +++ b/testsuite/testutils.h @@ -221,6 +221,12 @@ test_dsa_key(struct dsa_public_key *pub, #define SKIP() exit(77) #define SUCCESS() return EXIT_SUCCESS -#define ASSERT(x) do { if (!(x)) FAIL(); } while(0) +#define ASSERT(x) do { \ + if (!(x)) \ + { \ + fprintf(stderr, "Assert failed %d: %s\n", __LINE__, #x); \ + FAIL(); \ + } \ + } while(0) #endif /* NETTLE_TESTUTILS_H_INCLUDED */