1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
vtn 400933675f 0023087: Upgrade of the OCCT test system
Integration of new occt testing system
2012-07-13 11:42:23 +04:00

70 lines
1.4 KiB
Plaintext
Executable File

#INTERFACE CAF
# Basic attributes
# TDataStd_IntegerArray
#
# Testing attribute: TDataStd_IntegerArray
#
# Testing command: SetIntArray
# Testing command: GetIntArray
#
puts "caf001-D2"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 3
set aSetAttr12 4
set aLabel 0:2
set isDelta 0
SetIntArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Set a new value of the attribute
set aFrom2 1
set aTo2 2
set aSetAttr21 33
set aSetAttr22 44
SetIntArray D ${aLabel} ${isDelta} ${aFrom2} ${aTo2} ${aSetAttr21} ${aSetAttr22}
# Close/Open the transaction
NewCommand D
# Undo
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage2 "Set a value of TDataStd_IntegerArray attribute: Error"
set aGetAttr2 [GetIntArray D ${aLabel}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage2}
### return
}
set aGetAttr31 [lindex ${aGetAttr2} 0]
if { ${aSetAttr11} != ${aGetAttr31} } {
set IsGood 0
puts "aGetAttr31=${aGetAttr31}"
puts ${aMessage2}
### return
}
set aGetAttr32 [lindex ${aGetAttr2} 1]
if { ${aSetAttr12} != ${aGetAttr32} } {
set IsGood 0
puts "aGetAttr32=${aGetAttr32}"
puts ${aMessage2}
### return
}
if { ${IsGood} == 0} {
puts "Set TDataStd_IntegerArray attribute: Error"
} else {
puts "Set TDataStd_IntegerArray attribute: OK"
}