add li_cpointer and newobject2 test-suite
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11511 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
756f2645ce
commit
c85685b60b
7 changed files with 94 additions and 51 deletions
|
|
@ -24,8 +24,10 @@
|
|||
%constant int iconst = 37;
|
||||
%constant double fconst = 3.14;
|
||||
|
||||
%inline %{
|
||||
void constant_test(const int x) {
|
||||
printf("%i", x);
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,4 @@ catch
|
|||
printf("FOO is not defined (good)\n");
|
||||
end
|
||||
|
||||
constant_test(iconst);
|
||||
|
||||
exit
|
||||
|
|
|
|||
8
Examples/test-suite/scilab/li_cpointer_runme.sci
Normal file
8
Examples/test-suite/scilab/li_cpointer_runme.sci
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
exec loader.sce;
|
||||
|
||||
p = new_intp();
|
||||
intp_assign(p,3);
|
||||
|
||||
if intp_value(p) <> 3 then pause, end
|
||||
|
||||
exit
|
||||
15
Examples/test-suite/scilab/newobject2_runme.sci
Normal file
15
Examples/test-suite/scilab/newobject2_runme.sci
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
exec loader.sce;
|
||||
|
||||
x = makeFoo();
|
||||
if fooCount() <> 1 then pause, end
|
||||
|
||||
y = makeFoo();
|
||||
if fooCount() <> 2 then pause, end
|
||||
|
||||
delete_Foo(x);
|
||||
if fooCount() <> 1 then pause, end
|
||||
|
||||
delete_Foo(y);
|
||||
if fooCount() <> 0 then pause, end
|
||||
|
||||
exit
|
||||
Loading…
Add table
Add a link
Reference in a new issue