summaryrefslogtreecommitdiff
path: root/Examples/test-suite/ocaml/using_protected_runme.ml
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/ocaml/using_protected_runme.ml')
-rw-r--r--Examples/test-suite/ocaml/using_protected_runme.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/Examples/test-suite/ocaml/using_protected_runme.ml b/Examples/test-suite/ocaml/using_protected_runme.ml
new file mode 100644
index 0000000..4dc4fe1
--- /dev/null
+++ b/Examples/test-suite/ocaml/using_protected_runme.ml
@@ -0,0 +1,8 @@
+open Swig
+open Using_protected
+
+let f = new_FooBar C_void
+let _ = (invoke f) "x" (C_int 3)
+
+let _ = if (invoke f) "blah" (C_int 4) <> (C_int 4) then
+ raise (Failure "blah(int)")