Some graphic tests: drawlater drawnow 12/4612/2
Bruno JOFRET [Wed, 27 Jul 2011 12:38:47 +0000 (14:38 +0200)]
Change-Id: Ia23efe495b4db04620ca534f3c0179862a5c0cf8

scilab/modules/graphics/tests/unit_tests/draw_later_now.dia.ref [new file with mode: 0644]
scilab/modules/graphics/tests/unit_tests/draw_later_now.tst [new file with mode: 0644]

diff --git a/scilab/modules/graphics/tests/unit_tests/draw_later_now.dia.ref b/scilab/modules/graphics/tests/unit_tests/draw_later_now.dia.ref
new file mode 100644 (file)
index 0000000..174877c
--- /dev/null
@@ -0,0 +1,13 @@
+// =============================================================================
+// 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 drawlater/drawnow behaviour
+f = gcf();
+drawlater();
+assert_checkequal(f.immediate_drawing, "off");
+drawnow();
+assert_checkequal(f.immediate_drawing, "on");
diff --git a/scilab/modules/graphics/tests/unit_tests/draw_later_now.tst b/scilab/modules/graphics/tests/unit_tests/draw_later_now.tst
new file mode 100644 (file)
index 0000000..b8ee154
--- /dev/null
@@ -0,0 +1,18 @@
+// =============================================================================
+// 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 drawlater/drawnow behaviour
+
+f = gcf();
+
+drawlater();
+assert_checkequal(f.immediate_drawing, "off");
+
+drawnow();
+assert_checkequal(f.immediate_drawing, "on");