aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/ocaml/struct_value_runme.ml
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/ocaml/struct_value_runme.ml')
-rw-r--r--Examples/test-suite/ocaml/struct_value_runme.ml11
1 files changed, 11 insertions, 0 deletions
diff --git a/Examples/test-suite/ocaml/struct_value_runme.ml b/Examples/test-suite/ocaml/struct_value_runme.ml
new file mode 100644
index 000000000..73688bef3
--- /dev/null
+++ b/Examples/test-suite/ocaml/struct_value_runme.ml
@@ -0,0 +1,11 @@
+open Swig
+open Struct_value
+
+let b = new_Bar (C_void)
+let a = (invoke b) "[a]" (C_void)
+let _ = (invoke a) "[x]" (C_int 3)
+let _ = assert((invoke a) "[x]" (C_void) = C_int 3)
+
+let bb = (invoke b) "[b]" (C_void)
+let _ = (invoke bb) "[x]" (C_int 3)
+let _ = assert((invoke bb) "[x]" (C_void) = C_int 3)