Add a non-regression test for bug 4834 which has been fixed a long time ago... 12/2512/2
Vincent COUVERT [Thu, 18 Nov 2010 15:07:29 +0000 (16:07 +0100)]
Change-Id: Ifbf58a294ece91d82aa6658154f43ce2ae46f326

scilab/modules/gui/tests/nonreg_tests/bug_4834.dia.ref [new file with mode: 0644]
scilab/modules/gui/tests/nonreg_tests/bug_4834.tst [new file with mode: 0644]

diff --git a/scilab/modules/gui/tests/nonreg_tests/bug_4834.dia.ref b/scilab/modules/gui/tests/nonreg_tests/bug_4834.dia.ref
new file mode 100644 (file)
index 0000000..fa43ad3
--- /dev/null
@@ -0,0 +1,57 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Vincent COUVERT
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- TEST WITH GRAPHICS -->
+//
+// <-- JVM MANDATORY -->
+//
+// <-- Non-regression test for bug 4834 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4834
+//
+// <-- Short Description -->
+// When called with more than 11 items displaytree did not open a window and Scilab reported a java exception.
+l1 = uiCreateNode("CONST_m","default","");
+l2 = uiCreateNode("GENSQR_f","default","");
+l3 = uiCreateNode("RAMP","default","");
+l4 = uiCreateNode("RAND_m","default","");
+l5 = uiCreateNode("RFILE_f","default","");
+l6 = uiCreateNode("CLKINV_f","default","");
+l7 = uiCreateNode("CURV_f","default","");
+l8 = uiCreateNode("INIMPL_f","default","");
+l9 = uiCreateNode("SAWTOOTH_f","default","");
+l10 = uiCreateNode("READAU_f","default","");
+l11 = uiCreateNode("WRITEAU_f","default","");
+root1 = uiCreateNode("Sources");
+tree = uiCreateTree(root1,l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11);
+uiDisplayTree(tree)
+ ans  =
+       ans(1)
+ Tree   
+       ans(2)
+   label: "Sources"
+   icon: ""
+   callback: ""
+       ans(3)
+        ans(3)(1)
+ Tree   
+        ans(3)(2)
+   label: "CONST_m"
+   icon: "default"
+   callback: ""
diff --git a/scilab/modules/gui/tests/nonreg_tests/bug_4834.tst b/scilab/modules/gui/tests/nonreg_tests/bug_4834.tst
new file mode 100644 (file)
index 0000000..c52dc8d
--- /dev/null
@@ -0,0 +1,36 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Vincent COUVERT
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- TEST WITH GRAPHICS -->
+//
+// <-- JVM MANDATORY -->
+//
+// <-- Non-regression test for bug 4834 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=4834
+//
+// <-- Short Description -->
+// When called with more than 11 items displaytree did not open a window and Scilab reported a java exception.
+
+l1 = uiCreateNode("CONST_m","default","");
+l2 = uiCreateNode("GENSQR_f","default","");
+l3 = uiCreateNode("RAMP","default","");
+l4 = uiCreateNode("RAND_m","default","");
+l5 = uiCreateNode("RFILE_f","default","");
+l6 = uiCreateNode("CLKINV_f","default","");
+l7 = uiCreateNode("CURV_f","default","");
+l8 = uiCreateNode("INIMPL_f","default","");
+l9 = uiCreateNode("SAWTOOTH_f","default","");
+l10 = uiCreateNode("READAU_f","default","");
+l11 = uiCreateNode("WRITEAU_f","default","");
+
+root1 = uiCreateNode("Sources");
+
+tree = uiCreateTree(root1,l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11);
+
+uiDisplayTree(tree)