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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
puts "================"
puts "OCC2932"
puts "================"
puts ""
#######################################################################################
# Create Attribute Delta depending on actual change of the attribute
#######################################################################################
# Case 14 (TDataStd_RealArray)
#######################################################################################
# Create a new document and set UndoLimit
NewDocument D MDTV-Standard
UndoLimit D 100
# Create a label and set attributes
NewCommand D
set Label 0:2
############################################
set From 1
set To 2
set RealArray1 3.
set RealArray2 4.
############################################
set Real1 300.
set Real2 400.
set modified_attribute TDataStd_Real
############################################
# Set TDataStd_RealArray
SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
############################################
SetReal D ${Label} ${Real1}
set list [DumpCommand D]
# Open a transaction
NewCommand D
set list [DumpCommand D]
############################################
# Set old value for TDataStd_RealArray
SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
############################################
# Set new value for TDataStd_Real
SetReal D ${Label} ${Real2}
set list [DumpCommand D]
# Open a transaction
NewCommand D
set list [DumpCommand D]
# Checking
set ll [llength ${list}]
set good_length 17
puts "length = ${ll}"
puts "good_length = ${good_length}"
if { ${ll} != ${good_length} } {
puts "OCC2932 Error (case 1)"
} else {
set name_attribute [lindex ${list} [expr ${good_length} - 1]]
puts "name_attribute = ${name_attribute}"
puts "modified_attribute = ${modified_attribute}"
if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
puts "OCC2932 OK"
} else {
puts "OCC2932 Error (case 2)"
}
}
|