1 //<-- CLI SHELL MODE -->
2 // =============================================================================
3 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 // Copyright (C) 2006-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
6 // This file is distributed under the same license as the Scilab package.
7 // =============================================================================
9 // <-- Non-regression test for bug 623 -->
11 // <-- Bugzilla URL -->
12 // http://bugzilla.scilab.org/show_bug.cgi?id=623
14 // <-- Short Description -->
15 // Even after applying the patch corresponding to bug report
16 // 608, integer cast to boolean is still not perfect.
21 if or(1<>[uno uno]) then pause,end
22 if or([1 1]<>[uno uno]) then pause,end
23 if or([uno uno]<>1) then pause,end
24 if or([uno uno]<>[1 1]) then pause,end
26 if execstr("uint8(1) & %t" ,"errcatch") <> 999 then pause,end
27 if execstr("%t&uint8(1)" ,"errcatch") <> 999 then pause,end
28 if execstr("int32(1) & %t" ,"errcatch") <> 999 then pause,end
29 if execstr("%t&int32(1)" ,"errcatch") <> 999 then pause,end
30 if execstr("uint32(1) & %t","errcatch") <> 999 then pause,end
31 if execstr("%t&uint32(1)" ,"errcatch") <> 999 then pause,end
32 if execstr("int16(1) & %t" ,"errcatch") <> 999 then pause,end
33 if execstr("%t&int16(1)" ,"errcatch") <> 999 then pause,end
34 if execstr("int8(1) & %f " ,"errcatch") <> 999 then pause,end
35 if execstr("%t&int8(1)" ,"errcatch") <> 999 then pause,end