[OCaml] Fix the wrapping of static const member chars
OCaml's constantWrapper() was adding unneeded quotes when wrapping static const member chars. Add runtime tests for char_constant, chartest, and static_const_member.
This commit is contained in:
parent
fa0c3fe5c2
commit
c61c221057
4 changed files with 53 additions and 27 deletions
16
Examples/test-suite/ocaml/char_constant_runme.ml
Normal file
16
Examples/test-suite/ocaml/char_constant_runme.ml
Normal file
|
|
@ -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');
|
||||
;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue