source:
tests/exceptions/except-io.hfa
@
594e1db
Last change on this file since 594e1db was afe2939, checked in by , 4 years ago | |
---|---|
|
|
File size: 555 bytes |
Rev | Line | |
---|---|---|
[6d43cdde] | 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.