ADTast-experimentalenumforall-pointer-decaypthread-emulationqualifiedEnum
Last change
on this file since f520c4c was
afe2939,
checked in by Andrew Beach <ajbeach@…>, 4 years ago
|
Removed #include <stdio.h> from tests that only use printf.
|
-
Property mode set to
100644
|
File size:
555 bytes
|
Line | |
---|
1 | // Common tools for the exception tests. |
---|
2 | |
---|
3 | // Echo when a destructor is run and an area/block is left. |
---|
4 | struct loud_exit { |
---|
5 | const char * area; |
---|
6 | }; |
---|
7 | |
---|
8 | inline void ?{}(loud_exit & this, const char * area) { |
---|
9 | this.area = area; |
---|
10 | } |
---|
11 | |
---|
12 | inline void ^?{}(loud_exit & this) { |
---|
13 | printf("Exiting: %s\n", this.area); |
---|
14 | } |
---|
15 | |
---|
16 | struct loud_region { |
---|
17 | const char * region; |
---|
18 | }; |
---|
19 | |
---|
20 | inline void ?{}(loud_region & this, const char * region) { |
---|
21 | this.region = region; |
---|
22 | printf("Entering: %s\n", region); |
---|
23 | } |
---|
24 | |
---|
25 | inline void ^?{}(loud_region & this) { |
---|
26 | printf("Exiting: %s\n", this.region); |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.