From ff143376a7b4ac3b370bd8683d7aeb0b4827a494 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 19 Mar 2026 19:27:42 +0100 Subject: test: add test for __func__ --- test/17-misc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/17-misc.c b/test/17-misc.c index 73f09d1..cec45b4 100644 --- a/test/17-misc.c +++ b/test/17-misc.c @@ -54,6 +54,7 @@ struct S3 { extern int printf(const char *, ...); #include +#include int main() { printf("%d\n", fn1(-77ull)); assert(offst[0] == offsetof(struct foo, b)); @@ -61,4 +62,5 @@ int main() { assert(offst[2] == offsetof(struct foo, b[1])); assert(*g_131 == 5 && *g_132 == 14 && *g_133 == 0); printf("S3 =%d, f2@%d, q@%d\n", (int)sizeof(struct S3), (int)offsetof(struct S3, f2), (int)offsetof(struct S3, q)); + assert(!strcmp(__func__, "main")); } -- cgit v1.2.3