Changeset 7f9968a for tests/exceptions
- Timestamp:
- Jun 24, 2020, 12:30:42 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8b58bae
- Parents:
- a8a3485
- Location:
- tests/exceptions
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/.expect/resume.txt
ra8a3485 r7f9968a 31 31 inner catch 32 32 outer catch 33 34 throw 35 rethrow 36 handle -
tests/exceptions/.expect/terminate.txt
ra8a3485 r7f9968a 29 29 inner catch 30 30 outer catch 31 32 throw 33 rethrow 34 handle -
tests/exceptions/resume.cfa
ra8a3485 r7f9968a 8 8 TRIVIAL_EXCEPTION(zen); 9 9 TRIVIAL_EXCEPTION(moment_of, zen); 10 11 void in_void(void); 10 12 11 13 int main(int argc, char * argv[]) { … … 121 123 printf("outer catch\n"); 122 124 } 125 printf("\n"); 126 127 in_void(); 123 128 } 129 130 // Do a throw and rethrow in a void function. 131 void in_void(void) { 132 try { 133 try { 134 printf("throw\n"); 135 throwResume (zen){}; 136 } catchResume (zen *) { 137 printf("rethrow\n"); 138 throwResume; 139 } 140 } catchResume (zen *) { 141 printf("handle\n"); 142 } 143 } -
tests/exceptions/terminate.cfa
ra8a3485 r7f9968a 8 8 TRIVIAL_EXCEPTION(zen); 9 9 TRIVIAL_EXCEPTION(moment_of, zen); 10 11 void in_void(void); 10 12 11 13 int main(int argc, char * argv[]) { … … 121 123 printf("outer catch\n"); 122 124 } 125 printf("\n"); 126 127 in_void(); 123 128 } 129 130 // Do a throw and rethrow in a void function. 131 void in_void(void) { 132 try { 133 try { 134 printf("throw\n"); 135 throw (zen){}; 136 } catch (zen *) { 137 printf("rethrow\n"); 138 throw; 139 } 140 } catch (zen *) { 141 printf("handle\n"); 142 } 143 } 144
Note: See TracChangeset
for help on using the changeset viewer.