[graphics] fix tests 68/20768/7
St├ęphane Mottelet [Wed, 30 Jan 2019 16:20:05 +0000 (17:20 +0100)]
Change-Id: I985784999f18a1d10828794b3a19255d15c28237

17 files changed:
scilab/modules/graphics/tests/nonreg_tests/bug_10121.tst
scilab/modules/graphics/tests/nonreg_tests/bug_12150.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_12150.tst
scilab/modules/graphics/tests/nonreg_tests/bug_14042.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_14042.tst
scilab/modules/graphics/tests/nonreg_tests/bug_2953.tst
scilab/modules/graphics/tests/nonreg_tests/bug_3590.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_3590.tst
scilab/modules/graphics/tests/nonreg_tests/bug_6720.tst
scilab/modules/graphics/tests/nonreg_tests/bug_9052.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_9052.tst
scilab/modules/graphics/tests/nonreg_tests/bug_954.dia.ref [deleted file]
scilab/modules/graphics/tests/nonreg_tests/bug_954.tst
scilab/modules/graphics/tests/unit_tests/plot2d_demo.dia.ref [deleted file]
scilab/modules/graphics/tests/unit_tests/plot2d_demo.tst
scilab/modules/graphics/tests/unit_tests/plot_demo.dia.ref [deleted file]
scilab/modules/graphics/tests/unit_tests/plot_demo.tst

index fe4ae90..288f637 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 //
 // <-- TEST WITH GRAPHIC -->
+// <-- NOT FIXED -->  6.0.0 -> 6.0.2
 //
 // <-- Non-regression test for bug 10121 -->
 //
@@ -21,7 +22,7 @@ e.interp_color_vector=[1:4];
 xsave("TMPDIR/inter_file.scg");
 delete(gcf())
 xload("TMPDIR/inter_file.scg");
-ef=gce(); ef=ef.children(1);
+ef=gce(); ef=ef.children(1).children;
 assert_checkequal(ef.interp_color_vector,[1:4]);
 delete(gcf())
 
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_12150.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_12150.dia.ref
deleted file mode 100644 (file)
index 0eea938..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 12150 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=12150
-//
-// <-- Short Description -->
-//    datatipCreate fails with one single point
-scf();
-x=[20];
-y=[190];
-plot(x,y,"bo-");
-e=gce();
-p=e.children(1);
-t=datatipCreate(p,1);
-assert_checkequal(p.datatips(1).data, [20 190 0]);
-assert_checkequal(p.datatips(1).text, ["X:20.0000";"Y:190.000"]);
-close
index 40ca383..ef1bce1 100644 (file)
@@ -4,7 +4,10 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
+//
 // <-- Non-regression test for bug 12150 -->
 //
 // <-- Bugzilla URL -->
@@ -22,5 +25,5 @@ e=gce();
 p=e.children(1);
 t=datatipCreate(p,1);
 assert_checkequal(p.datatips(1).data, [20 190 0]);
-assert_checkequal(p.datatips(1).text, ["X:20.0000";"Y:190.000"]);
+assert_checkequal(p.datatips(1).text, ["X:20";"Y:190"]);
 close
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_14042.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_14042.dia.ref
deleted file mode 100644 (file)
index e31d06e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2015 - Scilab Enterprises - Vincent COUVERT
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 13881 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/14042
-//
-// <-- Short Description -->
-// Crash cause by reference to an unset handle
-clf;
-xstring(0.1,0.1,"foo1");H(1)=gce();
-xstring(0.1,0.2,"foo1");H(3)=gce();
-assert_checkequal(H.type, ["Text" "????" "Text"]);
-errmsg = msprintf(gettext("''%s'' property does not exist for this handle.\n"), "text");
-assert_checkerror("H(2).text",errmsg);
index be1d342..1063ccc 100644 (file)
@@ -4,9 +4,10 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- TEST WITH GRAPHIC -->
-
+// <-- NO CHECK REF -->
+//
 // <-- Non-regression test for bug 13881 -->
 //
 // <-- Bugzilla URL -->
@@ -18,7 +19,7 @@ clf;
 xstring(0.1,0.1,"foo1");H(1)=gce();
 xstring(0.1,0.2,"foo1");H(3)=gce();
 
-assert_checkequal(H.type, ["Text" "????" "Text"]);
+assert_checkequal(H.type, ["Text" ; "????" ; "Text"]);
 
 errmsg = msprintf(gettext("''%s'' property does not exist for this handle.\n"), "text");
 assert_checkerror("H(2).text",errmsg);
index 5af7c0d..b60bdd4 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK ERROR OUTPUT -->
 
 // <-- Non-regression test for bug 2953 -->
 //
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_3590.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_3590.dia.ref
deleted file mode 100644 (file)
index 34074d2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2008-2008 - DIGITEO - Vincent COUVERT
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 3590 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=3590
-//
-// <-- Short Description -->
-// Error message when we want to see a figure which has as userdata a structure (struct).
-// 
-userdata = struct("dd",2);
-h=figure();
-set(h,"user_data",userdata);
-if execstr("disp(h.user_data)","errcatch")<>0 then bugmes();quit;end
-  dd: [1x1 constant]
index e264660..2ac34f9 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
 
 // <-- Non-regression test for bug 3590 -->
 //
index f3d4ba1..30af54f 100644 (file)
@@ -6,6 +6,7 @@
 // =============================================================================
 
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK ERROR OUTPUT -->
 
 // <-- Non-regression test for bug 6720 -->
 //
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_9052.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_9052.dia.ref
deleted file mode 100644 (file)
index cc3e751..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2014 - Scilab Enterprises - Charlotte HECQUET
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 9052 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/9052
-//
-// <-- Short Description -->
-// All demos in graphics/animations are automatically closed at the end of each one
-xdel(winsid());
-path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim1","anim1.sce");
-exec(path_demo,-1);
-assert_checkequal(winsid(), 100001);
-xdel(winsid());
-path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim2","anim2.sce");
-exec(path_demo,-1);
-assert_checkequal(winsid(), 100001);
-xdel(winsid());
-path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim3","anim3.sce");
-exec(path_demo,-1);
-assert_checkequal(winsid(), 100001);
-xdel(winsid());
-path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim4","anim4.sce");
-exec(path_demo,-1);
-assert_checkequal(winsid(), 100001);
-xdel(winsid());
-path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim5","anim5.sce");
-exec(path_demo,-1);
-assert_checkequal(winsid(), 100001);
-xdel(winsid());
-path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim6","anim6.sce");
-exec(path_demo,-1);
-assert_checkequal(winsid(), 100001);
-xdel(winsid());
-path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim7","anim7.sce");
-exec(path_demo,-1);
-assert_checkequal(winsid(), 100001);
-xdel(winsid());
-path_demo = fullfile(SCI,"modules","graphics","demos","anim","anim8","anim8.sci");
-exec(path_demo,-1);
-demo_riemann();
-assert_checkequal(winsid(), 100001);
-xdel(winsid());
-path_demo = fullfile(SCI,"modules","graphics","demos","anim","bubbleSort","bubbleSort.sci");
-exec(path_demo,-1);
-demo_bubbleSort();
-assert_checkequal(winsid(), 0);
index c4aea83..d606fc5 100644 (file)
@@ -4,7 +4,10 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
+//
 // <-- Non-regression test for bug 9052 -->
 //
 // <-- Bugzilla URL -->
@@ -50,4 +53,4 @@ xdel(winsid());
 path_demo = fullfile(SCI,"modules","graphics","demos","anim","bubbleSort","bubbleSort.sci");
 exec(path_demo,-1);
 demo_bubbleSort();
-assert_checkequal(winsid(), 0);
+assert_checkequal(winsid(), 100001);
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_954.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_954.dia.ref
deleted file mode 100644 (file)
index 8b023eb..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2008-2008 - INRIA - Vincent COUVERT
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- ENGLISH IMPOSED -->
-// <-- TEST WITH GRAPHIC -->
-// <-- Non-regression test for bug 954 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=954
-//
-// <-- Short Description -->
-// Scilab is dead after running this script. It is the graphical
-// commands at the end. Some test must be missing for
-// huge number of points.
-// Test #1
-function Xd=f(t,X)
-    p=X(1);pi=X(2);xh=X(3);z=X(4);
-    pd=-(p^2+2*p+1/lam);
-    pid=1+2*(1/(lam*p)+1)*pi;
-    xhd=-(1+p)*xh;
-    zd=-1/(lam*p)*(z-xh)-(1+(1/pi))*z;
-    sigd=z^2;
-    Xd=[pd;pid;xhd;zd;sigd];
-endfunction
-lam=.8;
-p0=1;
-pi0=inv(p0);
-xh0=2;
-z0=xh0;
-sig0=0;
-TT=0:.0000001:1;
-XX=ode([p0;pi0;xh0;z0;sig0],0,TT,f);
-Warning:  Result may be inaccurate.
-
-TT=TT(1:size(XX,2));
-K=XX($,:)+XX(2,:).*(XX(3,:)-XX(4,:)).^2;
-scf(0);
-plot2d(TT',K');
-delete(gcf());
-scf(1);
-plot2d(TT',XX(2,:)');
-delete(gcf());
-scf(2);
-plot2d(TT',XX(1,:)');
-delete(gcf());
-// Test #2
-clear
-scf();
-N=5d6;
-TT=linspace(0,1,N);
-plot2d(TT,sin(TT));
-delete(gcf());
index 27a93e1..418b14b 100644 (file)
@@ -4,9 +4,11 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
 // <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
+//
 // <-- Non-regression test for bug 954 -->
 //
 // <-- Bugzilla URL -->
@@ -35,7 +37,7 @@ pi0=inv(p0);
 xh0=2;
 z0=xh0;
 sig0=0;
-TT=0:.0000001:1;
+TT=0:.0000001:0.43;
 XX=ode([p0;pi0;xh0;z0;sig0],0,TT,f);
 
 TT=TT(1:size(XX,2));
diff --git a/scilab/modules/graphics/tests/unit_tests/plot2d_demo.dia.ref b/scilab/modules/graphics/tests/unit_tests/plot2d_demo.dia.ref
deleted file mode 100644 (file)
index 502c756..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2011 - DIGITEO - Bruno JOFRET
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// test plot2d()
-// Check each default property
-plot2d();
-f = gcf();
-a = gca();
-c = a.children(1); // compound
-p1 = c.children(1); // polyline 1
-p2 = c.children(2); // polyline 2
-p3 = c.children(3); // polyline 3
-// Check figure
-//assert_checkequal(f.figure_position, [200,200]);
-//assert_checkequal(f.figure_size, [614,568]);
-//assert_checkequal(f.axes_size, [610,460]);
-assert_checkequal(f.auto_resize, "on");
-assert_checkequal(f.viewport, [0,0]);
-assert_checkequal(f.figure_name, gettext("Graphic window number %d"));
-assert_checkequal(f.figure_id, 0);
-assert_checkequal(f.pixel_drawing_mode, "copy");
-assert_checkequal(f.anti_aliasing, "off");
-assert_checkequal(f.immediate_drawing, "on");
-assert_checkequal(f.background, -2);
-assert_checkequal(f.visible, "on");
-assert_checkequal(f.rotation_style, "unary");
-assert_checkequal(f.event_handler, "");
-assert_checkequal(f.event_handler_enable, "off");
-assert_checkequal(f.user_data, []);
-assert_checkequal(f.tag, "");
-// Check Axes
-assert_checkequal(a.visible, "on");
-assert_checkequal(a.axes_visible, ["on" "on" "on"]);
-assert_checkequal(a.axes_reverse, ["off" "off" "off"]);
-assert_checkequal(a.grid, [-1 -1]);
-assert_checkequal(a.grid_position, "background");
-assert_checkequal(a.x_location, "bottom");
-assert_checkequal(a.y_location, "left");
-assert_checkequal(a.auto_ticks, ["on" "on" "on"]);
-//assert_checkequal(a.x_ticks.locations, [0:0.1:1]');
-//assert_checkequal(a.y_ticks.locations, [0:0.1:1]');
-//assert_checkequal(a.z_ticks.locations, []);
-assert_checkequal(a.box, "on");
-assert_checkequal(a.filled, "on");
-assert_checkequal(a.sub_ticks, [0, 4]);
-assert_checkequal(a.font_style, 6);
-assert_checkequal(a.font_size, 1);
-assert_checkequal(a.font_color, -1);
-assert_checkequal(a.fractional_font, "off");
-assert_checkequal(a.isoview, "off");
-assert_checkequal(a.cube_scaling, "off");
-assert_checkequal(a.view, "2d");
-assert_checkequal(a.rotation_angles, [0, 270]);
-assert_checkequal(a.log_flags, "nnn");
-assert_checkequal(a.tight_limits, ["on", "on", "on"]);
-assert_checkequal(a.data_bounds, [0, -2; 2 * %pi, 2]);
-assert_checkequal(a.zoom_box, []);
-assert_checkequal(a.margins, [0.125, 0.125, 0.125, 0.125]);
-assert_checkequal(a.axes_bounds, [0, 0, 1, 1]);
-assert_checkequal(a.auto_clear, "off");
-assert_checkequal(a.auto_scale, "on");
-assert_checkequal(a.hidden_axis_color, 4);
-assert_checkequal(a.hiddencolor, 4);
-assert_checkequal(a.line_mode, "on");
-assert_checkequal(a.line_style, 1);
-assert_checkequal(a.thickness, 1);
-assert_checkequal(a.mark_mode, "off");
-assert_checkequal(a.mark_style, 0);
-assert_checkequal(a.mark_size_unit, "tabulated");
-assert_checkequal(a.mark_size, 0);
-assert_checkequal(a.mark_foreground, -1);
-assert_checkequal(a.mark_background, -2);
-assert_checkequal(a.foreground, -1);
-assert_checkequal(a.background, -2);
-assert_checkequal(a.arc_drawing_method, "lines");
-assert_checkequal(a.clip_state, "clipgrf");
-assert_checkequal(a.clip_box, []);
-assert_checkequal(a.user_data, []);
-// Check Compound Object
-assert_checkequal(c.parent.type, "Axes");
-assert_checkequal(c.children(:).type, ["Polyline", "Polyline", "Polyline"]);
-assert_checkequal(c.visible, "on");
-assert_checkequal(c.user_data, []);
-// Check Polyline 1
-demoData = [0:0.1:2*%pi]';
-assert_checkequal(p1.parent.type, "Compound");
-assert_checkequal(p1.children, []);
-assert_checkequal(p1.visible, "on");
-assert_checkequal(p1.data, [demoData, sin(3 * demoData)]);
-assert_checkequal(p1.closed, "off");
-assert_checkequal(p1.line_mode, "on");
-assert_checkequal(p1.fill_mode, "off");
-assert_checkequal(p1.line_style, 1);
-assert_checkequal(p1.thickness, 1);
-assert_checkequal(p1.arrow_size_factor, 1);
-assert_checkequal(p1.polyline_style, 1);
-assert_checkequal(p1.foreground, 3);
-assert_checkequal(p1.background, -2);
-assert_checkequal(p1.interp_color_vector, []);
-assert_checkequal(p1.interp_color_mode, "off");
-assert_checkequal(p1.mark_mode, "off");
-assert_checkequal(p1.mark_style, 0);
-assert_checkequal(p1.mark_size_unit, "tabulated");
-assert_checkequal(p1.mark_size, 0);
-assert_checkequal(p1.mark_foreground, -1);
-assert_checkequal(p1.mark_background, -2);
-assert_checkequal(p1.x_shift, []);
-assert_checkequal(p1.y_shift, []);
-assert_checkequal(p1.z_shift, []);
-assert_checkequal(p1.bar_width, 0);
-assert_checkequal(p1.clip_state, "clipgrf");
-assert_checkequal(p1.clip_box, []);
-assert_checkequal(p1.user_data, []);
-// Check Polyline 2
-assert_checkequal(p2.parent.type, "Compound");
-assert_checkequal(p2.children, []);
-assert_checkequal(p2.visible, "on");
-assert_checkequal(p2.data, [demoData, sin(2 * demoData)]);
-assert_checkequal(p2.closed, "off");
-assert_checkequal(p2.line_mode, "off");
-assert_checkequal(p2.fill_mode, "off");
-assert_checkequal(p2.line_style, 1);
-assert_checkequal(p2.thickness, 1);
-assert_checkequal(p2.arrow_size_factor, 1);
-assert_checkequal(p2.polyline_style, 1);
-assert_checkequal(p2.foreground, -1);
-assert_checkequal(p2.background, -2);
-assert_checkequal(p2.interp_color_vector, []);
-assert_checkequal(p2.interp_color_mode, "off");
-assert_checkequal(p2.mark_mode, "on");
-assert_checkequal(p2.mark_style, 2);
-assert_checkequal(p2.mark_size_unit, "tabulated");
-assert_checkequal(p2.mark_size, 0);
-assert_checkequal(p2.mark_foreground, -1);
-assert_checkequal(p2.mark_background, -2);
-assert_checkequal(p2.x_shift, []);
-assert_checkequal(p2.y_shift, []);
-assert_checkequal(p2.z_shift, []);
-assert_checkequal(p2.bar_width, 0);
-assert_checkequal(p2.clip_state, "clipgrf");
-assert_checkequal(p2.clip_box, []);
-assert_checkequal(p2.user_data, []);
-// Check Polyline 3
-assert_checkequal(p3.parent.type, "Compound");
-assert_checkequal(p3.children, []);
-assert_checkequal(p3.visible, "on");
-assert_checkequal(p3.data, [demoData, sin(demoData)]);
-assert_checkequal(p3.closed, "off");
-assert_checkequal(p3.line_mode, "off");
-assert_checkequal(p3.fill_mode, "off");
-assert_checkequal(p3.line_style, 1);
-assert_checkequal(p3.thickness, 1);
-assert_checkequal(p3.arrow_size_factor, 1);
-assert_checkequal(p3.polyline_style, 1);
-assert_checkequal(p3.foreground, -1);
-assert_checkequal(p3.background, -2);
-assert_checkequal(p3.interp_color_vector, []);
-assert_checkequal(p3.interp_color_mode, "off");
-assert_checkequal(p3.mark_mode, "on");
-assert_checkequal(p3.mark_style, 1);
-assert_checkequal(p3.mark_size_unit, "tabulated");
-assert_checkequal(p3.mark_size, 0);
-assert_checkequal(p3.mark_foreground, -1);
-assert_checkequal(p3.mark_background, -2);
-assert_checkequal(p3.x_shift, []);
-assert_checkequal(p3.y_shift, []);
-assert_checkequal(p3.z_shift, []);
-assert_checkequal(p3.bar_width, 0);
-assert_checkequal(p3.clip_state, "clipgrf");
-assert_checkequal(p3.clip_box, []);
-assert_checkequal(p3.user_data, []);
index 248f6f1..5fff458 100644 (file)
@@ -4,9 +4,10 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- TEST WITH GRAPHIC -->
-
+// <-- NO CHECK REF -->
+//
 // test plot2d()
 
 // Check each default property
@@ -88,7 +89,7 @@ assert_checkequal(a.user_data, []);
 
 // Check Compound Object
 assert_checkequal(c.parent.type, "Axes");
-assert_checkequal(c.children(:).type, ["Polyline", "Polyline", "Polyline"]);
+assert_checkequal(c.children(:).type, ["Polyline"; "Polyline"; "Polyline"]);
 assert_checkequal(c.visible, "on");
 assert_checkequal(c.user_data, []);
 
diff --git a/scilab/modules/graphics/tests/unit_tests/plot_demo.dia.ref b/scilab/modules/graphics/tests/unit_tests/plot_demo.dia.ref
deleted file mode 100644 (file)
index bfdba04..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2011 - DIGITEO - Bruno JOFRET
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- TEST WITH GRAPHIC -->
-// test plot()
-// Check each default property
-plot();
-f = gcf();
-a1 = f.children(1);
-a2 = f.children(2);
-c1 = a1.children(1);
-c2 = a2.children(1);
-p1 = c1.children;
-p2 = c2.children;
-// Check figure
-//assert_checkequal(f.figure_position, [200,200]);
-//assert_checkequal(f.figure_size, [614,568]);
-//assert_checkequal(f.axes_size, [610, 460]);
-assert_checkequal(f.auto_resize, "on");
-assert_checkequal(f.viewport, [0,0]);
-assert_checkequal(f.figure_name, gettext("Graphic window number %d"));
-assert_checkequal(f.figure_id, 0);
-assert_checkequal(f.pixel_drawing_mode, "copy");
-assert_checkequal(f.anti_aliasing, "off");
-assert_checkequal(f.immediate_drawing, "on");
-assert_checkequal(f.background, -2);
-assert_checkequal(f.visible, "on");
-assert_checkequal(f.rotation_style, "unary");
-assert_checkequal(f.event_handler, "");
-assert_checkequal(f.event_handler_enable, "off");
-assert_checkequal(f.user_data, []);
-assert_checkequal(f.tag, "");
-assert_checkequal(f.info_message, "");
-handMadeColorMap = [0,0,0;
-0,0,1;
-0,1,0;
-0,1,1;
-1,0,0;
-1,0,1;
-1,1,0;
-1,1,1;
-0,0,0.5647058823529411686337;
-0,0,0.6901960784313725394412;
-0,0,0.8156862745098039102487;
-0.5294117647058823594719,0.8078431372549019773288,1;
-0,0.5647058823529411686337,0;
-0,0.6901960784313725394412,0;
-0,0.8156862745098039102487,0;
-0,0.5647058823529411686337,0.5647058823529411686337;
-0,0.6901960784313725394412,0.6901960784313725394412;
-0,0.8156862745098039102487,0.8156862745098039102487;
-0.5647058823529411686337,0,0;
-0.6901960784313725394412,0,0;
-0.8156862745098039102487,0,0;
-0.5647058823529411686337,0,0.5647058823529411686337;
-0.6901960784313725394412,0,0.6901960784313725394412;
-0.8156862745098039102487,0,0.8156862745098039102487;
-0.5019607843137254832300,0.1882352941176470562112,0;
-0.6274509803921568540375,0.2509803921568627416150,0;
-0.7529411764705882248450,0.3764705882352941124225,0;
-1,0.5019607843137254832300,0.5019607843137254832300;
-1,0.6274509803921568540375,0.6274509803921568540375;
-1,0.7529411764705882248450,0.7529411764705882248450;
-1,0.8784313725490195956525,0.8784313725490195956525;
-1,0.8431372549019607864906,0;
-0,0.5,0;
-0,0.75,0.75;
-0.75,0,0.75;
-0.75,0.75,0;
-0.25,0.25,0.25];
-assert_checkequal(f.color_map, handMadeColorMap);
-// Check Axes 1
-assert_checkequal(a1.visible, "on");
-assert_checkequal(a1.axes_visible, ["on" "on" "on"]);
-assert_checkequal(a1.axes_reverse, ["off" "off" "off"]);
-assert_checkequal(a1.grid, [-1 -1]);
-assert_checkequal(a1.grid_position, "background");
-assert_checkequal(a1.x_location, "bottom");
-assert_checkequal(a1.y_location, "left");
-assert_checkequal(a1.auto_ticks, ["on" "on" "on"]);
-//assert_checkequal(a1.x_ticks.locations, [0:0.1:1]');
-//assert_checkequal(a1.y_ticks.locations, [0:0.1:1]');
-//assert_checkequal(a1.z_ticks.locations, []);
-assert_checkequal(a1.box, "on");
-assert_checkequal(a1.filled, "on");
-assert_checkequal(a1.sub_ticks, [1, 4]);
-assert_checkequal(a1.font_style, 6);
-assert_checkequal(a1.font_size, 1);
-assert_checkequal(a1.font_color, -1);
-assert_checkequal(a1.fractional_font, "off");
-assert_checkequal(a1.isoview, "off");
-assert_checkequal(a1.cube_scaling, "off");
-assert_checkequal(a1.view, "2d");
-assert_checkequal(a1.rotation_angles, [0, 270]);
-assert_checkequal(a1.log_flags, "nnn");
-assert_checkequal(a1.tight_limits, ["off", "off", "off"]);
-assert_checkequal(a1.data_bounds, [1, -1 ; 2, 1]);
-assert_checkequal(a1.zoom_box, []);
-assert_checkequal(a1.margins, [0.125, 0.125, 0.125, 0.125]);
-assert_checkequal(a1.axes_bounds, [0, 0.5, 1, 0.5]);
-assert_checkequal(a1.auto_clear, "off");
-assert_checkequal(a1.auto_scale, "on");
-assert_checkequal(a1.hidden_axis_color, 4);
-assert_checkequal(a1.hiddencolor, 4);
-assert_checkequal(a1.line_mode, "on");
-assert_checkequal(a1.line_style, 1);
-assert_checkequal(a1.thickness, 1);
-assert_checkequal(a1.mark_mode, "off");
-assert_checkequal(a1.mark_style, 0);
-assert_checkequal(a1.mark_size_unit, "tabulated");
-assert_checkequal(a1.mark_size, 0);
-assert_checkequal(a1.mark_foreground, -1);
-assert_checkequal(a1.mark_background, -2);
-assert_checkequal(a1.foreground, -1);
-assert_checkequal(a1.background, -2);
-assert_checkequal(a1.arc_drawing_method, "lines");
-assert_checkequal(a1.clip_state, "clipgrf");
-assert_checkequal(a1.clip_box, []);
-assert_checkequal(a1.user_data, []);
-// Check Axes 2
-assert_checkequal(a2.visible, "on");
-assert_checkequal(a2.axes_visible, ["on" "on" "on"]);
-assert_checkequal(a2.axes_reverse, ["off" "off" "off"]);
-assert_checkequal(a2.grid, [-1 -1]);
-assert_checkequal(a2.grid_position, "background");
-assert_checkequal(a2.x_location, "bottom");
-assert_checkequal(a2.y_location, "left");
-assert_checkequal(a2.auto_ticks, ["on" "on" "on"]);
-//assert_checkequal(a2.x_ticks.locations, [0:0.1:1]');
-//assert_checkequal(a2.y_ticks.locations, [0:0.1:1]');
-//assert_checkequal(a2.z_ticks.locations, []);
-assert_checkequal(a2.box, "on");
-assert_checkequal(a2.filled, "on");
-assert_checkequal(a2.sub_ticks, [0, 4]);
-assert_checkequal(a2.font_style, 6);
-assert_checkequal(a2.font_size, 1);
-assert_checkequal(a2.font_color, -1);
-assert_checkequal(a2.fractional_font, "off");
-assert_checkequal(a2.isoview, "off");
-assert_checkequal(a2.cube_scaling, "off");
-assert_checkequal(a2.view, "2d");
-assert_checkequal(a2.rotation_angles, [0, 270]);
-assert_checkequal(a2.log_flags, "nnn");
-assert_checkequal(a2.tight_limits, ["off", "off", "off"]);
-assert_checkequal(a2.data_bounds, [0, -1 ; 2 * %pi, 1]);
-assert_checkequal(a2.zoom_box, []);
-assert_checkequal(a2.margins, [0.125, 0.125, 0.125, 0.125]);
-assert_checkequal(a2.axes_bounds, [0, 0, 1, 0.5]);
-assert_checkequal(a2.auto_clear, "off");
-assert_checkequal(a2.auto_scale, "on");
-assert_checkequal(a2.hidden_axis_color, 4);
-assert_checkequal(a2.hiddencolor, 4);
-assert_checkequal(a2.line_mode, "on");
-assert_checkequal(a2.line_style, 1);
-assert_checkequal(a2.thickness, 1);
-assert_checkequal(a2.mark_mode, "off");
-assert_checkequal(a2.mark_style, 0);
-assert_checkequal(a2.mark_size_unit, "tabulated");
-assert_checkequal(a2.mark_size, 0);
-assert_checkequal(a2.mark_foreground, -1);
-assert_checkequal(a2.mark_background, -2);
-assert_checkequal(a2.foreground, -1);
-assert_checkequal(a2.background, -2);
-assert_checkequal(a2.arc_drawing_method, "lines");
-assert_checkequal(a2.clip_state, "clipgrf");
-assert_checkequal(a2.clip_box, []);
-assert_checkequal(a2.user_data, []);
-// Compound 1
-assert_checkequal(c1.parent.type, "Axes");
-assert_checkequal(c1.children(:).type, emptystr(1,41) + "Polyline");
-assert_checkequal(c1.visible, "on");
-assert_checkequal(c1.user_data, []);
-// Compount 2
-assert_checkequal(c2.parent.type, "Axes");
-assert_checkequal(c2.children(:).type, emptystr(1,3) + "Polyline");
-assert_checkequal(c2.visible, "on");
-assert_checkequal(c2.user_data, []);
-// Check Polylines in Compound 1
-assert_checkequal(p1(:).parent.type, emptystr(1,41) + "Compound");
-assert_checkequal(p1(:).children, []);
-assert_checkequal(p1(:).visible, emptystr(1,41) + "on");
-// Don't know how to check those data's
-//assert_checkequal(p1.data, [demoData, sin(3 * demoData)]);
-assert_checkequal(p1(:).closed, emptystr(1,41) + "off");
-assert_checkequal(p1(:).line_mode, emptystr(1,41) + "on");
-assert_checkequal(p1(:).fill_mode, emptystr(1,41) + "off");
-assert_checkequal(p1(:).line_style, ones(1,41));
-assert_checkequal(p1(:).thickness, ones(1,41));
-assert_checkequal(p1(:).arrow_size_factor, ones(1,41));
-assert_checkequal(p1(:).polyline_style, ones(1,41));
-fg_colors = [36 , 35 , 34 , 5 , 33 , 2 , 37 , 36 , 35 , 34 , 5 , 33 ,...
-2 , 37 , 36 , 35 , 34 , 5 , 33 , 2 , 37 , 36 , 35 , 34 ,...
-5 , 33 , 2 , 37 , 36 , 35 , 34 , 5 , 33 , 2 , 37 , 36 ,...
-35 , 34 , 5 , 33 , 2];
-assert_checkequal(p1(:).foreground, fg_colors);
-assert_checkequal(p1(:).background, -2 * ones(1,41));
-assert_checkequal(p1(:).interp_color_vector, []);
-assert_checkequal(p1(:).interp_color_mode, emptystr(1,41) + "off");
-assert_checkequal(p1(:).mark_mode, emptystr(1,41) + "off");
-assert_checkequal(p1(:).mark_style, zeros(1,41));
-assert_checkequal(p1(:).mark_size_unit, emptystr(1,41) + "point");
-assert_checkequal(p1(:).mark_size, zeros(1,41));
-assert_checkequal(p1(:).mark_foreground, -1 * ones(1,41));
-assert_checkequal(p1(:).mark_background, -2 * ones(1,41));
-assert_checkequal(p1(:).x_shift, []);
-assert_checkequal(p1(:).y_shift, []);
-assert_checkequal(p1(:).z_shift, []);
-assert_checkequal(p1(:).bar_width, zeros(1,41));
-assert_checkequal(p1(:).clip_state, emptystr(1,41) + "clipgrf");
-assert_checkequal(p1(:).clip_box, []);
-assert_checkequal(p1(:).user_data, []);
-// Check Polylines in Compound 2
-demoData = [0:%pi/20:2*%pi]';
-assert_checkequal(p2(:).parent.type, emptystr(1,3) + "Compound");
-assert_checkequal(p2(:).children, []);
-assert_checkequal(p2(:).visible, emptystr(1,3) + "on");
-assert_checkequal(p2(1).data, [demoData, abs(sin(demoData))]);
-assert_checkequal(p2(2).data, [demoData, cos(demoData)]);
-assert_checkequal(p2(3).data, [demoData, sin(demoData)]);
-assert_checkequal(p2(:).closed, emptystr(1,3) + "off");
-assert_checkequal(p2(:).line_mode, ["on" , "off" , "on"]);
-assert_checkequal(p2(:).fill_mode, emptystr(1,3) + "off");
-assert_checkequal(p2(:).line_style, [2 , 1 , 4]);
-assert_checkequal(p2(:).thickness, ones(1,3));
-assert_checkequal(p2(:).arrow_size_factor, ones(1,3));
-assert_checkequal(p2(:).polyline_style, ones(1,3));
-assert_checkequal(p2(:).foreground, [6 , 1 , 5]);
-assert_checkequal(p2(:).background, -2 * ones(1,3));
-assert_checkequal(p2(:).interp_color_vector, []);
-assert_checkequal(p2(:).interp_color_mode, emptystr(1,3) + "off");
-assert_checkequal(p2(:).mark_mode, emptystr(1,3) + "on");
-assert_checkequal(p2(:).mark_style, [9 , 1 , 9]);
-assert_checkequal(p2(:).mark_size_unit, emptystr(1,3) + "point");
-assert_checkequal(p2(:).mark_size, 6 * ones(1,3));
-assert_checkequal(p2(:).mark_foreground, [6 , 4 , 5]);
-assert_checkequal(p2(:).mark_background, -2 * ones(1,3));
-assert_checkequal(p2(:).x_shift, []);
-assert_checkequal(p2(:).y_shift, []);
-assert_checkequal(p2(:).z_shift, []);
-assert_checkequal(p2(:).bar_width, zeros(1,3));
-assert_checkequal(p2(:).clip_state, emptystr(1,3) + "clipgrf");
-assert_checkequal(p2(:).clip_box, []);
-assert_checkequal(p2(:).user_data, []);
index 3f9cd41..457b56b 100644 (file)
@@ -4,9 +4,10 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- TEST WITH GRAPHIC -->
-
+// <-- NO CHECK REF -->
+//
 // test plot()
 
 // Check each default property
@@ -178,80 +179,80 @@ assert_checkequal(a2.user_data, []);
 
 // Compound 1
 assert_checkequal(c1.parent.type, "Axes");
-assert_checkequal(c1.children(:).type, emptystr(1,41) + "Polyline");
+assert_checkequal(c1.children(:).type, emptystr(41,1) + "Polyline");
 assert_checkequal(c1.visible, "on");
 assert_checkequal(c1.user_data, []);
 
 // Compount 2
 assert_checkequal(c2.parent.type, "Axes");
-assert_checkequal(c2.children(:).type, emptystr(1,3) + "Polyline");
+assert_checkequal(c2.children(:).type, emptystr(3,1) + "Polyline");
 assert_checkequal(c2.visible, "on");
 assert_checkequal(c2.user_data, []);
 
 // Check Polylines in Compound 1
-assert_checkequal(p1(:).parent.type, emptystr(1,41) + "Compound");
+assert_checkequal(p1(:).parent.type, emptystr(41,1) + "Compound");
 assert_checkequal(p1(:).children, []);
-assert_checkequal(p1(:).visible, emptystr(1,41) + "on");
+assert_checkequal(p1(:).visible, emptystr(41,1) + "on");
 // Don't know how to check those data's
 //assert_checkequal(p1.data, [demoData, sin(3 * demoData)]);
-assert_checkequal(p1(:).closed, emptystr(1,41) + "off");
-assert_checkequal(p1(:).line_mode, emptystr(1,41) + "on");
-assert_checkequal(p1(:).fill_mode, emptystr(1,41) + "off");
-assert_checkequal(p1(:).line_style, ones(1,41));
-assert_checkequal(p1(:).thickness, ones(1,41));
-assert_checkequal(p1(:).arrow_size_factor, ones(1,41));
-assert_checkequal(p1(:).polyline_style, ones(1,41));
+assert_checkequal(p1(:).closed, emptystr(41,1) + "off");
+assert_checkequal(p1(:).line_mode, emptystr(41,1) + "on");
+assert_checkequal(p1(:).fill_mode, emptystr(41,1) + "off");
+assert_checkequal(p1(:).line_style, ones(41,1));
+assert_checkequal(p1(:).thickness, ones(41,1));
+assert_checkequal(p1(:).arrow_size_factor, ones(41,1));
+assert_checkequal(p1(:).polyline_style, ones(41,1));
 fg_colors = [36 , 35 , 34 , 5 , 33 , 2 , 37 , 36 , 35 , 34 , 5 , 33 ,...
 2 , 37 , 36 , 35 , 34 , 5 , 33 , 2 , 37 , 36 , 35 , 34 ,...
 5 , 33 , 2 , 37 , 36 , 35 , 34 , 5 , 33 , 2 , 37 , 36 ,...
-35 , 34 , 5 , 33 , 2];
+35 , 34 , 5 , 33 , 2]';
 assert_checkequal(p1(:).foreground, fg_colors);
-assert_checkequal(p1(:).background, -2 * ones(1,41));
+assert_checkequal(p1(:).background, -2 * ones(41,1));
 assert_checkequal(p1(:).interp_color_vector, []);
-assert_checkequal(p1(:).interp_color_mode, emptystr(1,41) + "off");
-assert_checkequal(p1(:).mark_mode, emptystr(1,41) + "off");
-assert_checkequal(p1(:).mark_style, zeros(1,41));
-assert_checkequal(p1(:).mark_size_unit, emptystr(1,41) + "point");
-assert_checkequal(p1(:).mark_size, zeros(1,41));
-assert_checkequal(p1(:).mark_foreground, -1 * ones(1,41));
-assert_checkequal(p1(:).mark_background, -2 * ones(1,41));
+assert_checkequal(p1(:).interp_color_mode, emptystr(41,1) + "off");
+assert_checkequal(p1(:).mark_mode, emptystr(41,1) + "off");
+assert_checkequal(p1(:).mark_style, zeros(41,1));
+assert_checkequal(p1(:).mark_size_unit, emptystr(41,1) + "point");
+assert_checkequal(p1(:).mark_size, zeros(41,1));
+assert_checkequal(p1(:).mark_foreground, -1 * ones(41,1));
+assert_checkequal(p1(:).mark_background, -2 * ones(41,1));
 assert_checkequal(p1(:).x_shift, []);
 assert_checkequal(p1(:).y_shift, []);
 assert_checkequal(p1(:).z_shift, []);
-assert_checkequal(p1(:).bar_width, zeros(1,41));
-assert_checkequal(p1(:).clip_state, emptystr(1,41) + "clipgrf");
+assert_checkequal(p1(:).bar_width, zeros(41,1));
+assert_checkequal(p1(:).clip_state, emptystr(41,1) + "clipgrf");
 assert_checkequal(p1(:).clip_box, []);
 assert_checkequal(p1(:).user_data, []);
 
 // Check Polylines in Compound 2
 demoData = [0:%pi/20:2*%pi]';
-assert_checkequal(p2(:).parent.type, emptystr(1,3) + "Compound");
+assert_checkequal(p2(:).parent.type, emptystr(3,1) + "Compound");
 assert_checkequal(p2(:).children, []);
-assert_checkequal(p2(:).visible, emptystr(1,3) + "on");
+assert_checkequal(p2(:).visible, emptystr(3,1) + "on");
 assert_checkequal(p2(1).data, [demoData, abs(sin(demoData))]);
 assert_checkequal(p2(2).data, [demoData, cos(demoData)]);
 assert_checkequal(p2(3).data, [demoData, sin(demoData)]);
-assert_checkequal(p2(:).closed, emptystr(1,3) + "off");
-assert_checkequal(p2(:).line_mode, ["on" , "off" , "on"]);
-assert_checkequal(p2(:).fill_mode, emptystr(1,3) + "off");
-assert_checkequal(p2(:).line_style, [2 , 1 , 4]);
-assert_checkequal(p2(:).thickness, ones(1,3));
-assert_checkequal(p2(:).arrow_size_factor, ones(1,3));
-assert_checkequal(p2(:).polyline_style, ones(1,3));
-assert_checkequal(p2(:).foreground, [6 , 1 , 5]);
-assert_checkequal(p2(:).background, -2 * ones(1,3));
+assert_checkequal(p2(:).closed, emptystr(3,1) + "off");
+assert_checkequal(p2(:).line_mode, ["on" ; "off" ; "on"]);
+assert_checkequal(p2(:).fill_mode, emptystr(3,1) + "off");
+assert_checkequal(p2(:).line_style, [2 ; 1 ; 4]);
+assert_checkequal(p2(:).thickness, ones(3,1));
+assert_checkequal(p2(:).arrow_size_factor, ones(3,1));
+assert_checkequal(p2(:).polyline_style, ones(3,1));
+assert_checkequal(p2(:).foreground, [6 ; 1 ; 5]);
+assert_checkequal(p2(:).background, -2 * ones(3,1));
 assert_checkequal(p2(:).interp_color_vector, []);
-assert_checkequal(p2(:).interp_color_mode, emptystr(1,3) + "off");
-assert_checkequal(p2(:).mark_mode, emptystr(1,3) + "on");
-assert_checkequal(p2(:).mark_style, [9 , 1 , 9]);
-assert_checkequal(p2(:).mark_size_unit, emptystr(1,3) + "point");
-assert_checkequal(p2(:).mark_size, 6 * ones(1,3));
-assert_checkequal(p2(:).mark_foreground, [6 , 4 , 5]);
-assert_checkequal(p2(:).mark_background, -2 * ones(1,3));
+assert_checkequal(p2(:).interp_color_mode, emptystr(3,1) + "off");
+assert_checkequal(p2(:).mark_mode, emptystr(3,1) + "on");
+assert_checkequal(p2(:).mark_style, [9 ; 1 ; 9]);
+assert_checkequal(p2(:).mark_size_unit, emptystr(3,1) + "point");
+assert_checkequal(p2(:).mark_size, 6 * ones(3,1));
+assert_checkequal(p2(:).mark_foreground, [6 ; 4 ; 5]);
+assert_checkequal(p2(:).mark_background, -2 * ones(3,1));
 assert_checkequal(p2(:).x_shift, []);
 assert_checkequal(p2(:).y_shift, []);
 assert_checkequal(p2(:).z_shift, []);
-assert_checkequal(p2(:).bar_width, zeros(1,3));
-assert_checkequal(p2(:).clip_state, emptystr(1,3) + "clipgrf");
+assert_checkequal(p2(:).bar_width, zeros(3,1));
+assert_checkequal(p2(:).clip_state, emptystr(3,1) + "clipgrf");
 assert_checkequal(p2(:).clip_box, []);
 assert_checkequal(p2(:).user_data, []);