0029116: [Regression] OCAF attributes insertion order is violated again
[occt.git] / tests / caf / basic / B8
1 #INTERFACE CAF
2 # Basic attributes
3 #
4 # Testing order of attributes on Undo/Redo
5 #
6 # Testing command:   SetInteger
7 # Testing command:   GetReal
8 # Testing command:   Undo and Redo
9 #
10
11 puts "caf001-B8"
12
13 NewCommand D
14 SetInteger D 0:1 123
15 SetReal D 0:1 123.321
16 NewCommand D
17 CheckLabel D 0:1
18
19 set res1 [CheckLabel D 0:1]
20 set indexReal1 [lsearch ${res1} TDataStd_Real]
21 set indexInt1  [lsearch ${res1} TDataStd_Integer]
22 if { ${indexReal1} != 11} {
23     puts "Error: Wrong position 1 of TDataStd_Real attribute."
24 }
25 if { ${indexInt1} != 5} {
26     puts "Error: Wrong position 1 of TDataStd_Integer attribute."
27 }
28
29 Undo D
30 Redo D
31 CheckLabel D 0:1
32
33 set res2 [CheckLabel D 0:1]
34 set indexReal2 [lsearch ${res2} TDataStd_Real]
35 set indexInt2  [lsearch ${res2} TDataStd_Integer]
36 if { ${indexReal1} != ${indexReal2}} {
37     puts "Error: Wrong position 2 of TDataStd_Real attribute."
38 }
39 if { ${indexInt1} != ${indexInt2}} {
40     puts "Error: Wrong position 2 of TDataStd_Integer attribute."
41 }