source: tests/exceptions/except-io.hfa @ 3d2852a

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 3d2852a 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
Line 
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.
6struct loud_exit {
7    const char * area;
8};
9
10inline void ?{}(loud_exit & this, const char * area) {
11    this.area = area;
12}
13
14inline void ^?{}(loud_exit & this) {
15    printf("Exiting: %s\n", this.area);
16}
17
18struct loud_region {
19        const char * region;
20};
21
22inline void ?{}(loud_region & this, const char * region) {
23        this.region = region;
24        printf("Entering: %s\n", region);
25}
26
27inline void ^?{}(loud_region & this) {
28        printf("Exiting: %s\n", this.region);
29}
Note: See TracBrowser for help on using the repository browser.