Changeset ecfd758 for tests/exceptions/cancel
- Timestamp:
- Apr 9, 2021, 2:11:43 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b91bfde
- Parents:
- e07b589
- Location:
- tests/exceptions/cancel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/cancel/coroutine.cfa
re07b589 recfd758 4 4 #include <exception.hfa> 5 5 6 TRIVIAL_EXCEPTION(internal_error); 6 EHM_EXCEPTION(internal_error)(); 7 EHM_VIRTUAL_TABLE(internal_error, internal_vt); 7 8 8 9 coroutine WillCancel {}; … … 14 15 void main(WillCancel & wc) { 15 16 printf("1"); 16 cancel_stack((internal_error){ });17 cancel_stack((internal_error){&internal_vt}); 17 18 printf("!"); 18 19 } … … 24 25 resume(cancel); 25 26 printf("4"); 26 } catchResume ( CoroutineCancelled(WillCancel)* error) {27 } catchResume (SomeCoroutineCancelled * error) { 27 28 printf("2"); 28 29 if ((virtual internal_error *)error->the_exception) { -
tests/exceptions/cancel/thread.cfa
re07b589 recfd758 4 4 #include <exception.hfa> 5 5 6 TRIVIAL_EXCEPTION(internal_error); 6 EHM_EXCEPTION(internal_error)(); 7 EHM_VIRTUAL_TABLE(internal_error, internal_vt); 7 8 8 9 thread WillCancel {}; … … 14 15 void main(WillCancel &) { 15 16 printf("1"); 16 cancel_stack((internal_error){ });17 cancel_stack((internal_error){&internal_vt}); 17 18 printf("!"); 18 19 } … … 25 26 join(cancel); 26 27 printf("4"); 27 } catchResume ( ThreadCancelled(WillCancel)* error) {28 } catchResume (SomeThreadCancelled * error) { 28 29 printf("2"); 29 30 if ((virtual internal_error *)error->the_exception) { … … 42 43 } 43 44 printf("4"); 44 } catchResume ( ThreadCancelled(WillCancel)* error) {45 } catchResume (SomeThreadCancelled * error) { 45 46 printf("2"); 46 47 if ((virtual internal_error *)error->the_exception) {
Note:
See TracChangeset
for help on using the changeset viewer.