summaryrefslogtreecommitdiff
path: root/modules/graphics/tests/unit_tests/gce.tst
blob: 0b809ce61352945605823386fdb4ba78eca5c988 (plain)
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
// =============================================================================
// 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 gce behaviour

f = gcf();
a = gca();
e = gce();

assert_checkequal(e, a)

plot(1:10);

e = gce();
assert_checkequal(e.type, "Compound");
assert_checkequal(e.parent.type, "Axes");
assert_checkequal(e.children(1).type, "Polyline");

delete(e);

e = gce();

assert_checkequal(e.type, "Axes");
assert_checkequal(e.parent.type, "Figure");
assert_checkequal(e.children, []);