update swig on windows

This commit is contained in:
Bassem Girgis
2019-08-04 21:38:19 -05:00
parent 8414b7136b
commit 76ad52be58
5943 changed files with 91790 additions and 71892 deletions

View File

@@ -0,0 +1,24 @@
open Swig
open Char_binary
let _ =
let t = new_Test '() in
assert (t -> strlen ("hile") as int = 4);
assert (t -> ustrlen ("hile") as int = 4);
assert (t -> strlen ("hil\x00") as int = 4);
assert (t -> ustrlen ("hil\x00") as int = 4);
let pc = _new_pchar '(5) in
assert (_pchar_setitem '(pc, 0, 'h') = C_void);
assert (_pchar_setitem '(pc, 1, 'o') = C_void);
assert (_pchar_setitem '(pc, 2, 'l') = C_void);
assert (_pchar_setitem '(pc, 3, 'a') = C_void);
assert (_pchar_setitem '(pc, 4, 0) = C_void);
assert (t -> strlen (pc) as int = 4);
assert (t -> ustrlen (pc) as int = 4);
ignore (_var_pchar '(pc));
assert (_var_pchar '() as string = "hola");
ignore (_var_namet '(pc));
assert (_var_namet '() as string = "hola");
_delete_pchar(pc)
;;