Add test for Scilab typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@12313 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
fe0f1a5331
commit
c786f2f980
1 changed files with 42 additions and 0 deletions
42
Examples/test-suite/scilab/scilab_typemaps_runme.sci
Normal file
42
Examples/test-suite/scilab/scilab_typemaps_runme.sci
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
exec("swigtest.start", -1);
|
||||
|
||||
if typeof(returnSignedChar()) <> "int8" then swigtesterror(); end
|
||||
if returnSignedChar() <> int8(42) then swigtesterror(); end
|
||||
if typeof(returnUnsignedChar()) <> "uint8" then swigtesterror(); end
|
||||
if returnUnsignedChar() <> uint8(42) then swigtesterror(); end
|
||||
|
||||
if typeof(returnShortAsInt16()) <> "int16" then swigtesterror(); end
|
||||
if returnShortAsInt16() <> int16(42) then swigtesterror(); end
|
||||
if typeof(returnSignedShortAsInt16()) <> "int16" then swigtesterror(); end
|
||||
if returnSignedShortAsInt16() <> int16(42) then swigtesterror(); end
|
||||
if typeof(returnUnsignedShort()) <> "uint16" then swigtesterror(); end
|
||||
if returnUnsignedShort() <> uint16(42) then swigtesterror(); end
|
||||
|
||||
if typeof(returnIntAsInt32()) <> "int32" then swigtesterror(); end
|
||||
if returnIntAsInt32() <> int32(42) then swigtesterror(); end
|
||||
if typeof(returnSignedIntAsInt32()) <> "int32" then swigtesterror(); end
|
||||
if returnSignedIntAsInt32() <> int32(42) then swigtesterror(); end
|
||||
if typeof(returnLongAsInt32()) <> "int32" then swigtesterror(); end
|
||||
if returnLongAsInt32() <> int32(42) then swigtesterror(); end
|
||||
if typeof(returnSignedLongAsInt32()) <> "int32" then swigtesterror(); end
|
||||
if returnSignedLongAsInt32() <> int32(42) then swigtesterror(); end
|
||||
if typeof(returnUnsignedInt()) <> "uint32" then swigtesterror(); end
|
||||
if returnUnsignedInt() <> uint32(42) then swigtesterror(); end
|
||||
if typeof(returnUnsignedLong()) <> "uint32" then swigtesterror(); end
|
||||
if returnUnsignedLong() <> uint32(42) then swigtesterror(); end
|
||||
|
||||
if typeof(returnDouble()) <> "constant" then swigtesterror(); end
|
||||
if returnDouble() <> 42.42 then swigtesterror(); end
|
||||
if typeof(returnFloat()) <> "constant" then swigtesterror(); end
|
||||
if returnFloat() <> 42 then swigtesterror(); end
|
||||
if typeof(returnInt()) <> "constant" then swigtesterror(); end
|
||||
if returnInt() <> 42 then swigtesterror(); end
|
||||
if typeof(returnLong()) <> "constant" then swigtesterror(); end
|
||||
if returnLong() <> 42 then swigtesterror(); end
|
||||
if typeof(returnShort()) <> "constant" then swigtesterror(); end
|
||||
if returnShort() <> 42 then swigtesterror(); end
|
||||
if typeof(returnChar()) <> "string" then swigtesterror(); end
|
||||
if returnChar() <> "a" then swigtesterror(); end
|
||||
|
||||
|
||||
exec("swigtest.quit", -1);
|
||||
Loading…
Add table
Add a link
Reference in a new issue