diff options
| author | 2026-03-19 19:27:42 +0100 | |
|---|---|---|
| committer | 2026-03-19 19:27:42 +0100 | |
| commit | ff143376a7b4ac3b370bd8683d7aeb0b4827a494 (patch) | |
| tree | fd2c85c6277c7cbc803ef53c95d4ec928ce4e42c /test | |
| parent | 5d68766b983213a8750d59cc24dc844c6170626b (diff) | |
test: add test for __func__
Diffstat (limited to 'test')
| -rw-r--r-- | test/17-misc.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 <assert.h> +#include <string.h> 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")); } |