0029814: Modeling Data - add method TopoDS_Shape::NbChildren() for simple check of...
[occt.git] / tests / caf / basic / B8
CommitLineData
095e90a2 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
11puts "caf001-B8"
12
13NewCommand D
14SetInteger D 0:1 123
15SetReal D 0:1 123.321
16NewCommand D
17CheckLabel D 0:1
18
19set res1 [CheckLabel D 0:1]
20set indexReal1 [lsearch ${res1} TDataStd_Real]
21set indexInt1 [lsearch ${res1} TDataStd_Integer]
22if { ${indexReal1} != 5} {
23 puts "Error: Wrong position 1 of TDataStd_Real attribute."
24}
25if { ${indexInt1} != 11} {
26 puts "Error: Wrong position 1 of TDataStd_Integer attribute."
27}
28
29Undo D
30Redo D
31CheckLabel D 0:1
32
33set res2 [CheckLabel D 0:1]
34set indexReal2 [lsearch ${res2} TDataStd_Real]
35set indexInt2 [lsearch ${res2} TDataStd_Integer]
36if { ${indexReal1} != ${indexReal2}} {
37 puts "Error: Wrong position 2 of TDataStd_Real attribute."
38}
39if { ${indexInt1} != ${indexInt2}} {
40 puts "Error: Wrong position 2 of TDataStd_Integer attribute."
41}