| 21 | } |
| 22 | |
| 23 | void runtest() { |
| 24 | printf("- Run test\n"); |
| 25 | Before bef; |
| 26 | if ( bef.allow() ) { |
| 27 | try { |
| 28 | do_throw2(); |
| 29 | } |
| 30 | catch( std::runtime_error ) { |
| 31 | printf("- Caught expected\n"); |
| 32 | } |
| 33 | } |
| 34 | else { printf("- not allowed\n"); } |
| 35 | |
| 36 | } |
| 37 | |
| 38 | int main( int argc, char* argv[] ) { |
| 39 | runtest(); |