Commit 40177e18e5c7f7b741a65048c6e75c1b92998265

Daniel Mendler 2019-12-05T11:47:36

test: print __func__

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/demo/shared.h b/demo/shared.h
index 5eae973..2a1ab3c 100644
--- a/demo/shared.h
+++ b/demo/shared.h
@@ -17,8 +17,8 @@
 #include "tommath_private.h"
 
 
-#define EXPECT(a) do { if (!(a)) { fprintf(stderr, "%d: EXPECT(%s) failed\n", __LINE__, #a); goto LBL_ERR; } } while(0)
-#define DO_WHAT(a, what) do { mp_err err; if ((err = (a)) != MP_OKAY) { fprintf(stderr, "%d: DO(%s) failed: %s\n", __LINE__, #a, mp_error_to_string(err)); what; } } while(0)
+#define EXPECT(a) do { if (!(a)) { fprintf(stderr, "%s, line %d: EXPECT(%s) failed\n", __func__, __LINE__, #a); goto LBL_ERR; } } while(0)
+#define DO_WHAT(a, what) do { mp_err err; if ((err = (a)) != MP_OKAY) { fprintf(stderr, "%s, line %d: DO(%s) failed: %s\n", __func__, __LINE__, #a, mp_error_to_string(err)); what; } } while(0)
 #define DO(a) DO_WHAT(a, goto LBL_ERR)
 #define DOR(a) DO_WHAT(a, return EXIT_FAILURE)