[OCaml] Runtime tests for abstract_access, abstract_typedef and some others

Add runtime tests for abstract_access, abstract_typedef,
abstract_typedef2, abstract_virtual, aggregate, cast_operator, and
constover. The aggregate and cast_operator tests are based on the
corresponding ruby tests, and the rest are based on python tests.
This commit is contained in:
Zackery Spytz 2019-01-11 22:26:11 -07:00
commit e5b470327b
7 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,16 @@
open Swig
open Constover
let test_str = "test" to string
let _ =
assert ((_test (test_str) as string) = "test");
assert ((_test_pconst (test_str) as string) = "test_pconst");
;;
let f = new_Foo '()
let _ =
assert ((f -> "test" (test_str) as string) = "test");
assert ((f -> "test_pconst" (test_str) as string) = "test_pconst");
assert ((f -> "test_constm" (test_str) as string) = "test_constmethod");
assert ((f -> "test_pconstm" (test_str) as string) = "test_pconstmethod");
;;