Initial commit of Octave module.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10290 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
50b1578e19
commit
393391965c
275 changed files with 14004 additions and 5 deletions
86
Examples/test-suite/octave/default_args_runme.m
Normal file
86
Examples/test-suite/octave/default_args_runme.m
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
default_args
|
||||
|
||||
|
||||
if (default_args.Statics.staticmethod() != 60)
|
||||
error
|
||||
endif
|
||||
|
||||
if (default_args.cfunc1(1) != 2)
|
||||
error
|
||||
endif
|
||||
|
||||
if (default_args.cfunc2(1) != 3)
|
||||
error
|
||||
endif
|
||||
|
||||
if (default_args.cfunc3(1) != 4)
|
||||
error
|
||||
endif
|
||||
|
||||
|
||||
f = default_args.Foo();
|
||||
|
||||
f.newname();
|
||||
f.newname(1);
|
||||
|
||||
|
||||
try
|
||||
f = default_args.Foo(1);
|
||||
ok = 1;
|
||||
catch
|
||||
ok = 0;
|
||||
end_try_catch
|
||||
if (ok)
|
||||
error("Foo::Foo ignore is not working")
|
||||
endif
|
||||
|
||||
try
|
||||
f = default_args.Foo(1,2);
|
||||
ok = 1;
|
||||
catch
|
||||
ok = 0;
|
||||
end_try_catch
|
||||
if (ok)
|
||||
error("Foo::Foo ignore is not working")
|
||||
endif
|
||||
|
||||
try
|
||||
f = default_args.Foo(1,2,3);
|
||||
ok = 1;
|
||||
catch
|
||||
ok = 0;
|
||||
end_try_catch
|
||||
if (ok)
|
||||
error("Foo::Foo ignore is not working")
|
||||
endif
|
||||
|
||||
try
|
||||
m = f.meth(1);
|
||||
ok = 1;
|
||||
catch
|
||||
ok = 0;
|
||||
end_try_catch
|
||||
if (ok)
|
||||
error("Foo::meth ignore is not working")
|
||||
endif
|
||||
|
||||
try
|
||||
m = f.meth(1,2);
|
||||
ok = 1;
|
||||
catch
|
||||
ok = 0;
|
||||
end_try_catch
|
||||
if (ok)
|
||||
error("Foo::meth ignore is not working")
|
||||
endif
|
||||
|
||||
try
|
||||
m = f.meth(1,2,3);
|
||||
ok = 1;
|
||||
catch
|
||||
ok = 0;
|
||||
end_try_catch
|
||||
if (ok)
|
||||
error("Foo::meth ignore is not working")
|
||||
endif
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue