aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/ocaml/char_constant_runme.ml
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/ocaml/char_constant_runme.ml')
-rw-r--r--Examples/test-suite/ocaml/char_constant_runme.ml16
1 files changed, 16 insertions, 0 deletions
diff --git a/Examples/test-suite/ocaml/char_constant_runme.ml b/Examples/test-suite/ocaml/char_constant_runme.ml
new file mode 100644
index 000000000..9d0ce6903
--- /dev/null
+++ b/Examples/test-suite/ocaml/char_constant_runme.ml
@@ -0,0 +1,16 @@
+open Swig
+open Char_constant
+
+let _ =
+ assert (_CHAR_CONSTANT '() as char = 'x');
+ assert (_STRING_CONSTANT '() as string = "xyzzy");
+ assert (_ESC_CONST '() as char = '\x01');
+ assert (_NULL_CONST '() as char = '\x00');
+ assert (_SPECIALCHARA '() as char = 'A');
+ assert (_SPECIALCHARB '() as char = 'B');
+ assert (_SPECIALCHARC '() as char = 'C');
+ assert (_SPECIALCHARD '() as char = 'D');
+ assert (_SPECIALCHARE '() as char = 'E');
+ assert (_ia '() as char = 'a');
+ assert (_ib '() as char = 'b');
+;;