[OCaml] class_scope_weird, cpp_static, and ignore_parameter runtime tests
They are based on the corresponding python runtime tests.
This commit is contained in:
parent
b64d685d5f
commit
5bdb52b319
3 changed files with 43 additions and 0 deletions
20
Examples/test-suite/ocaml/ignore_parameter_runme.ml
Normal file
20
Examples/test-suite/ocaml/ignore_parameter_runme.ml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
open Swig
|
||||
open Ignore_parameter
|
||||
|
||||
let _ =
|
||||
assert (get_string (_jaguar (C_list [ C_int 200 ; C_float 0. ])) = "hello");
|
||||
assert (get_int (_lotus (C_list [ C_string "fast" ; C_float 0. ])) = 101);
|
||||
assert (get_float (_tvr (C_list [ C_string "fast" ; C_int 200 ])) = 8.8);
|
||||
assert (get_int (_ferrari (C_void)) = 101);
|
||||
;;
|
||||
let sc = new_SportsCars (C_void)
|
||||
let _ =
|
||||
assert (get_string ((invoke sc) "daimler" (C_list [ C_int 200 ; C_float 0. ])) = "hello");
|
||||
assert (get_int ((invoke sc) "astonmartin" (C_list [ C_string "fast" ; C_float 0. ])) = 101);
|
||||
assert (get_float ((invoke sc) "bugatti" (C_list [ C_string "fast" ; C_int 200 ])) = 8.8);
|
||||
assert (get_int ((invoke sc) "lamborghini" (C_void)) = 101);
|
||||
;;
|
||||
let mc = new_MiniCooper (C_list [ C_int 200 ; C_float 0. ])
|
||||
let mm = new_MorrisMinor (C_list [ C_string "slow" ; C_float 0. ])
|
||||
let fa = new_FordAnglia (C_list [ C_string "slow" ; C_int 200 ])
|
||||
let aa = new_AustinAllegro (C_void)
|
||||
Loading…
Add table
Add a link
Reference in a new issue