summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-1952.c
blob: a9506c417fe104cdb2e04c49a6be4e4b166ef36c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
   bug-1952.c - missing __func__
 */

#include <testfwk.h>
#include <string.h>

void ratherquitelongfuntionname(void)
{
	const char *funcp = __func__;
	ASSERT(funcp == __func__);
	ASSERT(!strcmp(__func__, "ratherquitelongfuntionname"));
	ASSERT(_Generic(__func__, const char *: 1, default: 0));
	ASSERT(sizeof(__func__) == strlen("ratherquitelongfuntionname") + 1);
}

void testBug(void)
{
	ratherquitelongfuntionname();
}