scilab: implement and fix test array_member
This commit is contained in:
parent
9a71f5396b
commit
0bf11ef2d6
2 changed files with 18 additions and 0 deletions
16
Examples/test-suite/scilab/array_member_runme.sci
Normal file
16
Examples/test-suite/scilab/array_member_runme.sci
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
exec("swigtest.start", -1);
|
||||
|
||||
f = new_Foo();
|
||||
Foo_data_set(f, [0:7]);
|
||||
if ~isequal(Foo_data_get(f), [0:7]) then swigtesterror(); end
|
||||
|
||||
Foo_text_set(f, 'abcdefgh');
|
||||
if ~isequal(Foo_text_get(f), 'abcdefgh') then swigtesterror(); end
|
||||
delete_Foo(f);
|
||||
|
||||
m = new_MyBuff();
|
||||
MyBuff_x_set(m, uint8([0:11]));
|
||||
if ~isequal(MyBuff_x_get(m), uint8([0:11])) then swigtesterror(); end
|
||||
delete_MyBuff(m);
|
||||
|
||||
exec("swigtest.quit", -1);
|
||||
|
|
@ -55,7 +55,9 @@
|
|||
|
||||
%define %scilab_array_typemaps(CTYPE, ASARRAY_FRAGMENT, FROMARRAY_FRAGMENT, TEMPDATATYPE)
|
||||
%scilab_asarrayandsize_withcopy(varin, ASARRAY_FRAGMENT, CTYPE[ANY], TEMPDATATYPE);
|
||||
%scilab_asarray_withallocatecopy(in, ASARRAY_FRAGMENT, CTYPE[ANY], TEMPDATATYPE);
|
||||
%scilab_fromarrayandsize(varout, FROMARRAY_FRAGMENT, CTYPE[ANY]);
|
||||
%scilab_fromarrayandsize(out, FROMARRAY_FRAGMENT, CTYPE[ANY]);
|
||||
|
||||
%apply SWIGTYPE[] { CTYPE[] };
|
||||
%scilab_asarray_withallocatecopy(in, ASARRAY_FRAGMENT, CTYPE[], TEMPDATATYPE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue