]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(ASSERT): Write message to stderr.
authorNiels Möller <nisse@lysator.liu.se>
Mon, 3 Oct 2011 07:42:14 +0000 (09:42 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 3 Oct 2011 07:42:14 +0000 (09:42 +0200)
Rev: nettle/testsuite/testutils.h:1.9

testsuite/testutils.h

index 265cc498df87ec3899a141544be70acf13bfadc5..d7ced9a876483bb2e0339d46a58ab9bea2fc5ee5 100644 (file)
@@ -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 */