Changes in src/tests/dtor-early-exit.c [142cf5d:2afec66]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/dtor-early-exit.c
r142cf5d r2afec66 27 27 28 28 // don't want these called 29 void ?{}(A *a) { assert( false ); }30 void ?{}(A * a, const char * name) { a->name = name; sout | "construct " | name | endl; a->x = (int*)malloc(); }31 void ?{}(A *a, const char * name, int * ptr) { assert( false ); }32 33 A ?=?(A * a, A a) { sout | "assign " | a->name | " " | a.name; return a; }34 void ?{}(A * a, A a) { sout | "copy construct " | a.name | endl; a->x = (int*)malloc(); }35 void ^?{}(A * a) { sout | "destruct " | a->name | endl; free(a->x); }29 void ?{}(A & a) { assert( false ); } 30 void ?{}(A & a, const char * name) { a.name = name; sout | "construct " | name | endl; a.x = (int*)malloc(); } 31 void ?{}(A & a, const char * name, int * ptr) { assert( false ); } 32 33 A ?=?(A & a, A b) { sout | "assign " | a.name | " " | b.name; return a; } 34 void ?{}(A & a, A b) { sout | "copy construct " | b.name | endl; a.x = (int*)malloc(); } 35 void ^?{}(A & a) { sout | "destruct " | a.name | endl; free(a.x); } 36 36 37 37 // test returns
Note:
See TracChangeset
for help on using the changeset viewer.