aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/ocaml/using_extend_runme.ml
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/ocaml/using_extend_runme.ml')
-rw-r--r--Examples/test-suite/ocaml/using_extend_runme.ml12
1 files changed, 12 insertions, 0 deletions
diff --git a/Examples/test-suite/ocaml/using_extend_runme.ml b/Examples/test-suite/ocaml/using_extend_runme.ml
new file mode 100644
index 000000000..0b7c57f65
--- /dev/null
+++ b/Examples/test-suite/ocaml/using_extend_runme.ml
@@ -0,0 +1,12 @@
+open Swig
+open Using_extend
+
+let _ =
+ let f = new_FooBar '() in
+ assert (f -> blah (3) as int = 3);
+ assert (f -> blah (3.5) as float = 3.5);
+ assert (f -> blah ("hello") as string = "hello");
+ assert (f -> blah (3, 4) as int = 7);
+ assert (f -> blah (3.5, 7.5) as float = 11.);
+ assert (f -> duh (3) as int = 3)
+;;