From 4014dbbc7e61e20f7edbab9ed447c48a7d2ef695 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Wed, 10 May 2023 18:17:18 +0200 Subject: Add the filename when assert fails --- test/test_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_list.c b/test/test_list.c index d56ad6b..949bff2 100644 --- a/test/test_list.c +++ b/test/test_list.c @@ -22,7 +22,7 @@ #include #include -#define assert(c) if (c == 0) { printf("%d", __LINE__); exit(1);} +#define assert(c) if (c == 0) { printf("%s:%d\n", __FILE__, __LINE__); exit(1);} #define log(str) printf("%s: %s\n", __func__, str); void -- cgit v1.2.3