diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index d9269d9b2..c8fbe13c2 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -471,7 +471,7 @@ CPP_TEST_CASES += \ typedef_reference \ typedef_scope \ typedef_sizet \ - typedef_struct \ + typedef_struct_cpp \ typedef_typedef \ typemap_arrays \ typemap_array_qualifiers \ diff --git a/Examples/test-suite/scilab/typedef_struct_cpp_runme.sci b/Examples/test-suite/scilab/typedef_struct_cpp_runme.sci new file mode 100644 index 000000000..e41c21629 --- /dev/null +++ b/Examples/test-suite/scilab/typedef_struct_cpp_runme.sci @@ -0,0 +1,29 @@ +exec("swigtest.start", -1); + +try + x = new_LineObj(); + LineObj_numpoints_set(x, 100); +catch + swigtesterror(); +end +if LineObj_numpoints_get(x) <> 100 then swigtesterror(); end + +if MS_NOOVERRIDE_get() <> -1111 then swigtesterror(); end + +try + y = make_a(); + A_t_a_set(y, 200); +catch + swigtesterror(); +end +if A_t_a_get(y) <> 200 then swigtesterror(); end + +try + A_t_b_set(y, 300); +catch + swigtesterror(); +end +if A_t_b_get(y) <> 300 then swigtesterror(); end + +exec("swigtest.quit", -1); + diff --git a/Examples/test-suite/typedef_struct_cpp.i b/Examples/test-suite/typedef_struct_cpp.i new file mode 100644 index 000000000..7c6e3fff9 --- /dev/null +++ b/Examples/test-suite/typedef_struct_cpp.i @@ -0,0 +1,3 @@ +%module typedef_struct_cpp + +%include "typedef_struct.i"