scilab: STL containers of int accept doubles in input

This commit is contained in:
Simon Marchetto 2014-03-20 17:36:58 +01:00
commit 2e2d1afc4d
3 changed files with 9 additions and 6 deletions

View file

@ -61,10 +61,6 @@ function testSequenceContainer(container, value_type, value1, value2, expected_a
checkerror(ierr, cmd);
if ~isdef('c') | ~isequal(c, [value1, value2]) then swigtesterror(); end
if (value_type == "int") then
c = int32(c);
end
// test sequence container passed as value of function
cmd = msprintf("s = val_%s_%s(c);", value_type, container);
ierr = execstr(cmd, "errcatch");

View file

@ -15,7 +15,7 @@ if ~exists("isum") | (isum <> 10) then swigtesterror(); end
iset2 = create_integer_set(3, 6);
if ~exists("iset2") | ~isequal(iset2, [3 4 5 6]) then swigtesterror(); end
// concat the two sets with concat_integer_set():");
iset3 = concat_integer_set(int32(iset), int32(iset2));
iset3 = concat_integer_set(int32(iset), iset2);
if ~exists("iset3") | ~isequal(iset3, [1 2 3 4 5 6]) then swigtesterror(); end
// string sets