File: load_old_file.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 (89 lines) | stat: -rw-r--r-- 4,347 bytes parent folder | download | duplicates (2)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// =============================================================================
// scilab ( http://www.scilab.org/ ) - this file is part of scilab
// copyright (c) 2008 - inria - jean-baptiste silvy <jean-baptiste.silvy@inria.fr>
//
//  this file is distributed under the same license as the scilab package.
// =============================================================================
// <-- test with graphic -->
// non regression bug for load which weren't able to open
// files saved from old scilab version
// here we have a file saved by scilab 4.1.2, name load_old_file.scg
// load the file
// this file was obtained with the command save("load_old_file.scg",gcf())
// from Scilab 4.1.2. The figure was obtained by renning the example
// of the axes_properties help from from the first line to the next to the last one
// (ie everything without the final sda())
load(SCI + "/modules/graphics/tests/unit_tests/load_old_file.scg");
// check some data
fig = gcf();
// check figure
if fig.figure_id <> 0 then bugmes();quit;end
if fig.background <> 8 then bugmes();quit;end
if fig.pixel_drawing_mode <> "copy" then bugmes();quit;end
if size(fig.children, '*') <> 1 then bugmes();quit;end
// check axes
axes = f.children;
if axes.type <> "Axes" then bugmes();quit;end
if size(axes.children, '*') <> 5 then bugmes();quit;end
if axes.axes_visible <> ["on", "on", "on"] then bugmes();quit;end
if axes.x_location <> "bottom" then bugmes();quit;end
if axes.grid <> [-1, -1] then bugmes();quit;end
if axes.font_style <> 6 then bugmes();quit;end
if axes.data_bounds <> [-10, 2; 10, 2] then bugmes();quit;end
if axes.margins <> [0.125, 0.125, 0.125, 0.125] then bugmes();quit;end
if axes.axes_bounds <> [0,0,1,1] then bugmes();quit;end
if axes.hiddencolor <> 4 then bugmes();quit;end
if axes.user_data <> [] then bugmes();quit;end;
if axes.clip_state <> "clipgrf" then bugmes();quit;end
if axes.view <> "2d" then bugmes();quit;end
// check first compound
comp1 = axes.children(1);
if comp1.type <> "Compound" then bugmes();quit;end
if size(comp1.children, '*') <> 3 then bugmes();quit;end
if comp1.visible <> "on" then bugmes();quit;end
// check compund children
if comp1.children(1).type <> "Polyline" then bugmes();quit;end
if comp1.children(1).foreground <> 3 then bugmes();quit;end
if comp1.children(2).type <> "Polyline" then bugmes();quit;end
if comp1.children(2).foreground <> 2 then bugmes();quit;end
if comp1.children(3).type <> "Polyline" then bugmes();quit;end
if comp1.children(3).foreground <> 1 then bugmes();quit;end
// check segs
segs = axes.children(2);
if segs.type <> "Segs" then bugmes();quit;end
if segs.segs_color <> [5,5,5,5,5,5,5,5] then bugmes();quit;end
if segs.arrow_size <> 1 then bugmes();quit;end
if segs.line_style <> 0 then bugmes();quit;end
if size(segs.data) <> [16, 2] then bugmes();quit;end
// check first rectangle
rect1 = axes.children(3);
if rect1.type <> "Rectangle" then bugmes();quit;end
if rect1.mark_size <> 0 then bugmes();quit;end
if rect1.data <> [-2, 0.25, 4, 0.5]; then bugmes();quit;end
if rect1.background <> -2; then bugmes();quit;end
if rect1.fill_mode <> "on" then bugmes();quit;end
if rect1.line_mode <> "on" then bugmes();quit;end
if rect1.clip_state <> "clipgrf" then bugmes();quit;end
if rect1.user_data <> [] then bugmes();quit;end
// check second rectangle
rect2 = axes.children(4);
if rect2.type <> "Rectangle" then bugmes();quit;end
if rect2.mark_size <> 0 then bugmes();quit;end
if rect2.data <> [-4, 0.5, 8, 1]; then bugmes();quit;end
if rect2.background <> -2; then bugmes();quit;end
if rect2.fill_mode <> "off" then bugmes();quit;end
if rect2.line_mode <> "on" then bugmes();quit;end
if rect2.clip_state <> "clipgrf" then bugmes();quit;end
if rect2.user_data <> [] then bugmes();quit;end
// check second compound
comp2 = axes.children(5);
if comp2.type <> "Compound" then bugmes();quit;end
if size(comp2.children, '*') <> 1 then bugmes();quit;end
if comp2.visible <> "on" then bugmes();quit;end
if comp2.user_data <> [] then bugmes();quit;end
// check polyline
if comp2.children(1).type <> "Polyline" then bugmes();quit;end
if comp2.children(1).foreground <> 1 then bugmes();quit;end
if size(comp2.children(1).data) <> [79, 2] then bugmes();quit;end
if comp2.children(1).interp_color_mode <> "off" then bugmes();quit;end
if comp2.children(1).fill_mode <> "off" then bugmes();quit;end