diff options
Diffstat (limited to 'tests/core')
-rw-r--r-- | tests/core/test_exceptions_white_list_2.c | 27 | ||||
-rw-r--r-- | tests/core/test_exceptions_white_list_2.out | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/core/test_exceptions_white_list_2.c b/tests/core/test_exceptions_white_list_2.c new file mode 100644 index 00000000..40d7c56c --- /dev/null +++ b/tests/core/test_exceptions_white_list_2.c @@ -0,0 +1,27 @@ +#include <stdio.h> + +void throwhere(void) { + throw(1); +} + +void (*funptr)(void) = throwhere; + +void nocatch(void) { + try { + funptr(); + } + catch (...) { + printf("ERROR\n"); + } +} + +int main(void) { + try { + nocatch(); + } + catch (...) { + printf("SUCCESS\n"); + } + return 0; +} + diff --git a/tests/core/test_exceptions_white_list_2.out b/tests/core/test_exceptions_white_list_2.out new file mode 100644 index 00000000..ff43ca40 --- /dev/null +++ b/tests/core/test_exceptions_white_list_2.out @@ -0,0 +1 @@ +SUCCESS |