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> 5// 6// This file is distributed under the same license as the Scilab package. 7// ============================================================================= 8 9// <-- Non-regression test for bug 623 --> 10// 11// <-- Bugzilla URL --> 12// http://bugzilla.scilab.org/show_bug.cgi?id=623 13// 14// <-- Short Description --> 15// Even after applying the patch corresponding to bug report 16// 608, integer cast to boolean is still not perfect. 17 18uno = int8(1); 191 == [uno uno]; 20 21if or(1<>[uno uno]) then pause,end 22if or([1 1]<>[uno uno]) then pause,end 23if or([uno uno]<>1) then pause,end 24if or([uno uno]<>[1 1]) then pause,end 25 26if execstr("uint8(1) & %t" ,"errcatch") <> 0 then pause,end 27if execstr("%t & uint8(1)" ,"errcatch") <> 0 then pause,end 28if execstr("int32(1) & %t" ,"errcatch") <> 0 then pause,end 29if execstr("%t & int32(1)" ,"errcatch") <> 0 then pause,end 30if execstr("uint32(1) & %t" ,"errcatch") <> 0 then pause,end 31if execstr("%t & uint32(1)" ,"errcatch") <> 0 then pause,end 32if execstr("int16(1) & %t" ,"errcatch") <> 0 then pause,end 33if execstr("%t & int16(1)" ,"errcatch") <> 0 then pause,end 34if execstr("int8(1) & %f " ,"errcatch") <> 0 then pause,end 35if execstr("%t & int8(1)" ,"errcatch") <> 0 then pause,end 36