Corrections for tests after integration of 2012-12-07
[occt.git] / tests / bugs / caf / bug2932_2
CommitLineData
a87752f3 1puts "================"
2puts "OCC2932"
3puts "================"
4puts ""
5#######################################################################################
6# Create Attribute Delta depending on actual change of the attribute
7#######################################################################################
8# Case 14 (TDataStd_RealArray)
9#######################################################################################
10
11# Create a new document and set UndoLimit
12NewDocument D MDTV-Standard
13UndoLimit D 100
14
15# Create a label and set attributes
16NewCommand D
17set Label 0:2
18
19############################################
20set From 1
21set To 2
22set RealArray1 3.
23set RealArray2 4.
24############################################
25
26set Real1 300.
27set Real2 400.
28set modified_attribute TDataStd_Real
29
30############################################
31# Set TDataStd_RealArray
32SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
33############################################
34
35SetReal D ${Label} ${Real1}
36set list [DumpCommand D]
37
38# Open a transaction
39NewCommand D
40set list [DumpCommand D]
41
42############################################
43# Set old value for TDataStd_RealArray
44SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
45############################################
46
47# Set new value for TDataStd_Real
48SetReal D ${Label} ${Real2}
49set list [DumpCommand D]
50
51# Open a transaction
52NewCommand D
53set list [DumpCommand D]
54
55# Checking
56set length [llength ${list}]
57set good_length 17
58puts "length = ${length}"
59puts "good_length = ${good_length}"
60
61if { ${length} != ${good_length} } {
62 puts "OCC2932 Error (case 1)"
63} else {
64 set name_attribute [lindex ${list} [expr ${good_length} - 1]]
65 puts "name_attribute = ${name_attribute}"
66 puts "modified_attribute = ${modified_attribute}"
67 if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
68 puts "OCC2932 OK"
69 } else {
70 puts "OCC2932 Error (case 2)"
71 }
72}