1 // Test whether __func__ works for constructors and destructors.
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Matt Austern <austern@apple.com>, 3 Aug 2003
12 static const char* fname;
13 static bool obj_exists;
28 const char* uk9i::fname = 0;
29 bool uk9i::obj_exists = false;
35 ok = ok && uk9i::fname == 0;
36 ok = ok && !uk9i::obj_exists;
40 ok = ok && uk9i::obj_exists;
41 ok = ok && uk9i::fname != 0;
44 ok = ok && uk9i::fname[0] == 'u';
45 ok = ok && uk9i::fname[1] == 'k';
46 ok = ok && uk9i::fname[2] == '9';
47 ok = ok && uk9i::fname[3] == 'i';
48 ok = ok && uk9i::fname[4] == '\0';
52 ok = ok && !uk9i::obj_exists;
53 ok = ok && uk9i::fname != 0;
56 ok = ok && uk9i::fname[0] == '~';
57 ok = ok && uk9i::fname[1] == 'u';
58 ok = ok && uk9i::fname[2] == 'k';
59 ok = ok && uk9i::fname[3] == '9';
60 ok = ok && uk9i::fname[4] == 'i';
61 ok = ok && uk9i::fname[5] == '\0';