source:
tests/exceptions/except-io.hfa@
81e1984b
| Last change on this file since 81e1984b was 5251c6b, checked in by , 10 months ago | |
|---|---|
|
|
| File size: 596 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. | |
| [3bf9d10] | 4 | |
| 5 | #include <fstream.hfa> | |
| 6 | ||
| [6d43cdde] | 7 | struct loud_exit { |
| 8 | const char * area; | |
| 9 | }; | |
| 10 | ||
| [5251c6b] | 11 | static inline void ?{}(loud_exit & this, const char * area) { |
| [6d43cdde] | 12 | this.area = area; |
| 13 | } | |
| 14 | ||
| [5251c6b] | 15 | static inline void ^?{}(loud_exit & this) { |
| [3bf9d10] | 16 | sout | "Exiting: " | this.area; |
| [6d43cdde] | 17 | } |
| 18 | ||
| 19 | struct loud_region { | |
| 20 | const char * region; | |
| 21 | }; | |
| 22 | ||
| [5251c6b] | 23 | static inline void ?{}(loud_region & this, const char * region) { |
| [6d43cdde] | 24 | this.region = region; |
| [3bf9d10] | 25 | sout | "Entering: " | region; |
| [6d43cdde] | 26 | } |
| 27 | ||
| [5251c6b] | 28 | static inline void ^?{}(loud_region & this) { |
| [3bf9d10] | 29 | sout | "Exiting: " | this.region; |
| [6d43cdde] | 30 | } |
Note:
See TracBrowser
for help on using the repository browser.