aboutsummaryrefslogtreecommitdiff
path: root/tests/i/library-regions/regions.cps
diff options
context:
space:
mode:
Diffstat (limited to 'tests/i/library-regions/regions.cps')
-rw-r--r--tests/i/library-regions/regions.cps47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/i/library-regions/regions.cps b/tests/i/library-regions/regions.cps
new file mode 100644
index 0000000..310014a
--- /dev/null
+++ b/tests/i/library-regions/regions.cps
@@ -0,0 +1,47 @@
+PROCEDURE Mixed()
+PP_DEFINE __LIB
+TRY
+ OUTPUT 1 DIV 0
+CATCH
+ OUTPUT 1
+ENDTRY
+PP_UNDEF __LIB
+TRY
+ OUTPUT 1 DIV 0
+CATCH
+ OUTPUT 2
+ENDTRY
+TRY
+ CALL LibraryError()
+CATCH
+ OUTPUT 3
+ENDTRY
+PP_IFDEF Never
+PP_DEFINE __LIB
+PP_ENDIF
+TRY
+ OUTPUT 1 DIV 0
+CATCH
+ OUTPUT 4
+ENDTRY
+ENDPROCEDURE
+PP_DEFINE __LIB
+PROCEDURE LibraryError()
+ CALL NestedError()
+ENDPROCEDURE
+PROCEDURE NestedError()
+ OUTPUT 1 DIV 0
+ENDPROCEDURE
+TEMPLATE <T>
+PROCEDURE TemplateError()
+ OUTPUT 1 DIV 0
+ENDPROCEDURE
+CLASS DeleteError
+ PROCEDURE DELETE()
+ OUTPUT 1 DIV 0
+ ENDPROCEDURE
+ENDCLASS
+PROCEDURE DeleteOnExit()
+ DECLARE X : DeleteError
+ENDPROCEDURE
+PP_UNDEF __LIB