Strings test, tests in, out, inout string and char * types.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4687 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Art Yerkes 2003-04-16 05:18:57 +00:00
commit 3acd792de3
4 changed files with 95 additions and 0 deletions

View file

@ -0,0 +1,16 @@
(* This example is meant to reach every case in cstring.i *)
open Example
let _ = _takes_std_string (C_string "foo")
let _ = print_endline
("_gives_std_string <<" ^ (get_string (_gives_std_string C_void)) ^ " >>")
let _ = _takes_char_ptr (C_string "bar")
let _ = print_endline
("_gives_char_ptr << " ^ (get_string (_gives_char_ptr C_void)) ^ " >>")
let _ = print_endline
("_takes_and_gives_std_string << " ^
(get_string (_takes_and_gives_std_string (C_string "foo"))) ^ " >>")
let _ = print_endline
("_takes_and_gives_char_ptr << " ^
(get_string (_takes_and_gives_char_ptr (C_string "bar.bar"))) ^ " >>")