File: bug_3241.dia.ref

package info (click to toggle)
scilab 5.2.2-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 334,832 kB
  • ctags: 52,586
  • sloc: xml: 526,945; ansic: 223,590; fortran: 163,080; java: 56,934; cpp: 33,840; tcl: 27,936; sh: 20,397; makefile: 9,908; ml: 9,451; perl: 1,323; cs: 614; lisp: 30
file content (42 lines) | stat: -rw-r--r-- 2,520 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2008 - DIGITEO - Allan CORNET
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================
// <-- TEST WITH GRAPHIC -->
// <-- Non-regression test for bug 3241 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/show_bug.cgi?id=3241
//
// <-- Short Description -->
// length function does not work anymore with polynomials, boolean, integers.
// in scilab 4 length(x) was similar to size(x) for these data types
if length(%s) <> size(%s,'*') then bugmes();quit;end
if length(%t) <> size(%s,'*') then bugmes();quit;end
if length(int32(1)) <> size(int32(1),'*') then bugmes();quit;end
if length(int16(2)) <> size(int16(2),'*') then bugmes();quit;end
if length(int8(3)) <> size(int8(3),'*') then bugmes();quit;end
if length(%s) <> 1 then bugmes();quit;end
if length(%t) <> 1 then bugmes();quit;end
if length(int32(1)) <> 1 then bugmes();quit;end
if length(int16(2)) <> 1 then bugmes();quit;end
if length(int8(3)) <> 1 then bugmes();quit;end
if length([%s,%s,%s;%s,%s,%s]) <> size([%s,%s,%s;%s,%s,%s],'*') then bugmes();quit;end
if length([%t,%f,%t;%t,%f,%t]) <> size([%t,%f,%t;%t,%f,%t],'*') then bugmes();quit;end
if length([int32(1),int32(2),int32(3);int32(1),int32(2),int32(3)]) <> size([int32(1),int32(2),int32(3);int32(1),int32(2),int32(3)],'*') then bugmes();quit;end
if length([int16(1),int16(2),int16(3);int16(1),int16(2),int16(3)]) <> size([int16(1),int16(2),int16(3);int16(1),int16(2),int16(3)],'*') then bugmes();quit;end
if length([int8(1),int8(2),int8(3);int8(1),int8(2),int8(3)]) <> size([int8(1),int8(2),int8(3);int8(1),int8(2),int8(3)],'*')  then bugmes();quit;end
if length([%s,%s,%s;%s,%s,%s]) <> 6 then bugmes();quit;end
if length([%t,%f,%t;%t,%f,%t]) <> 6 then bugmes();quit;end
if length([int32(1),int32(2),int32(3);int32(1),int32(2),int32(3)]) <> 6 then bugmes();quit;end
if length([int16(1),int16(2),int16(3);int16(1),int16(2),int16(3)]) <> 6 then bugmes();quit;end
if length([int8(1),int8(2),int8(3);int8(1),int8(2),int8(3)]) <> 6 then bugmes();quit;end
s = scf();
handle_Matrix = [s,s,s;s,s,s];
if length(s) <> 1 then bugmes();quit;end
if length(s) <> size(s,'*') then bugmes();quit;end
if length(handle_Matrix) <> size(handle_Matrix,'*') then bugmes();quit;end
if length(handle_Matrix) <> 6 then bugmes();quit;end
delete(s);