ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since a86b1b85 was
6d43cdde,
checked in by Andrew Beach <ajbeach@…>, 5 years ago
|
Rework of exception tests. Includes a new disabled failing test case.
|
-
Property mode set to
100644
|
File size:
575 bytes
|
Rev | Line | |
---|
[6d43cdde] | 1 | // Common tools for the exception tests. |
---|
| 2 | |
---|
| 3 | #include <stdio.h> |
---|
| 4 | |
---|
| 5 | // Echo when a destructor is run and an area/block is left. |
---|
| 6 | struct loud_exit { |
---|
| 7 | const char * area; |
---|
| 8 | }; |
---|
| 9 | |
---|
| 10 | inline void ?{}(loud_exit & this, const char * area) { |
---|
| 11 | this.area = area; |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | inline void ^?{}(loud_exit & this) { |
---|
| 15 | printf("Exiting: %s\n", this.area); |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | struct loud_region { |
---|
| 19 | const char * region; |
---|
| 20 | }; |
---|
| 21 | |
---|
| 22 | inline void ?{}(loud_region & this, const char * region) { |
---|
| 23 | this.region = region; |
---|
| 24 | printf("Entering: %s\n", region); |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | inline void ^?{}(loud_region & this) { |
---|
| 28 | printf("Exiting: %s\n", this.region); |
---|
| 29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.