Xcos MVC: fix memleak in list insertion
[scilab.git] / scilab / modules / scicos / tests / unit_tests / model / prop_wrong.tst
1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2015 - Scilab Enterprises - Paul Bignier
4 //
5 //  This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7 //
8 // <-- CLI SHELL MODE -->
9
10 scicos_log("TRACE");
11
12 b = scicos_block();
13
14 // Standard filling
15 b.graphics = mlist(..
16 ["graphics","orig","sz","flip","theta","exprs","pin","pout","pein","peout","gr_i","id","in_implicit","out_implicit"],..
17 [40,0],..
18 [10,40],..
19 %t,..
20 0,..
21 "2",..
22 [0;0],..
23 0,..
24 [],..
25 [],..
26 list(),..
27 "",..
28 ["E";"E"],..
29 "E");
30
31 // Omit "sz" and "id", so GEOMETRY#2 and LABEL are missing from the log
32 b.graphics = mlist(..
33 ["graphics","orig","flip","theta","exprs","pin","pout","pein","peout","gr_i","in_implicit","out_implicit"],..
34 [40,0],..
35 %t,..
36 0,..
37 "2",..
38 [0;0],..
39 0,..
40 [],..
41 [],..
42 list(),..
43 ["E";"E"],..
44 "E");
45
46 // Add a fake wrong property "fake" with value "fake". The log must be the same as above
47 b.graphics = mlist(..
48 ["graphics","orig","flip","fake","theta","exprs","pin","pout","pein","peout","gr_i","in_implicit","out_implicit"],..
49 [40,0],..
50 %t,..
51 "fake",..
52 0,..
53 "2",..
54 [0;0],..
55 0,..
56 [],..
57 [],..
58 list(),..
59 ["E";"E"],..
60 "E");
61
62 // Swap "flip" and "in_implicit"
63 b.graphics = mlist(..
64 ["graphics","orig","in_implicit","fake","theta","exprs","pin","pout","pein","peout","gr_i","flip","out_implicit"],..
65 [40,0],..
66 ["E";"E"],..
67 "fake",..
68 0,..
69 "2",..
70 [0;0],..
71 0,..
72 [],..
73 [],..
74 list(),..
75 %t,..
76 "E");
77
78
79 // Check that all the model items are freed
80 clear