1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0027970: Improvement of standard attributes usability - containers.

This commit is contained in:
szy
2017-05-11 17:37:44 +03:00
committed by bugmaster
parent b18a83d4a7
commit 5a1271c8b4
111 changed files with 6038 additions and 1223 deletions

View File

@@ -29,7 +29,7 @@ set modified_attribute TDataStd_Real
############################################
# Set TDataStd_RealArray
SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
SetRealArray D ${Label} 0 ${From} ${To} ${RealArray1} ${RealArray2}
############################################
SetReal D ${Label} ${Real1}
@@ -41,7 +41,7 @@ set list [DumpCommand D]
############################################
# Set old value for TDataStd_RealArray
SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
SetRealArray D ${Label} 0 ${From} ${To} ${RealArray1} ${RealArray2}
############################################
# Set new value for TDataStd_Real

79
tests/caf/basic/C4 Normal file
View File

@@ -0,0 +1,79 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_RealArray
#
# Testing attribute: User defined (additional GUID) TDataStd_RealArray
#
# Testing command: SetRealArray, GetRealArray
#
puts "caf001-C4"
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
set aGuid1 "12e94511-6dbc-11d4-b9c8-0060b0ee281b"
SetRealArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetRealArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_RealArray attribute: Error"
set aGetAttr1 [GetRealArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetRealArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_RealArray attribute: Error"
} else {
puts "Add TDataStd_RealArray attribute: OK"
}

88
tests/caf/basic/C5 Normal file
View File

@@ -0,0 +1,88 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_RealArray
#
# Testing attribute: User defined (additional GUID) TDataStd_RealArray
#
# Testing command: SetRealArray
# Testing command: GetRealArray
#
puts "caf001-C5"
set QA_DUP 0
# Add an attributes to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 3.
set aSetAttr12 4.
set aLabel 0:2
set isDelta 0
set aGuid1 "12e94511-6dbc-11d4-b9c8-0060b0ee281b"
SetRealArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetRealArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-C5.cbf
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_RealArray attribute: Error"
set aGetAttr1 [GetRealArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetRealArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_RealArray attribute: Error"
} else {
puts "Add TDataStd_RealArray attribute: OK"
}

89
tests/caf/basic/C6 Normal file
View File

@@ -0,0 +1,89 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_RealArray
#
# Testing attribute: User defined (additional GUID) TDataStd_RealArray
#
# Testing command: SetRealArray
# Testing command: GetRealArray
#
puts "caf001-C6"
set QA_DUP 0
# Add an attributes to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 3.
set aSetAttr12 4.
set aLabel 0:2
set isDelta 0
set aGuid1 "12e94511-6dbc-11d4-b9c8-0060b0ee281b"
SetRealArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetRealArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-C6.xml
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_RealArray attribute: Error"
set aGetAttr1 [GetRealArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetRealArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_RealArray attribute: Error"
} else {
puts "Add TDataStd_RealArray attribute: OK"
}

66
tests/caf/basic/D4 Normal file
View File

@@ -0,0 +1,66 @@
#INTERFACE CAF
# Basic attributes
#
# Testing attribute: TDataStd_IntegerArray
#
# Testing command: SetIntArray
# Testing command: GetIntArray
#
puts "caf001-D1"
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
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_IntegerArray attribute: Error"
set aGetAttr1 [GetIntArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
### return
}
set aGetAttr21 [lindex ${aGetAttr1} 0]
if { ${aSetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
### return
}
set aGetAttr22 [lindex ${aGetAttr1} 1]
if { ${aSetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
### return
}
if { ${IsGood} == 0} {
puts "Add TDataStd_IntegerArray attribute: Error"
} else {
puts "Add TDataStd_IntegerArray attribute: OK"
}

80
tests/caf/basic/D5 Normal file
View File

@@ -0,0 +1,80 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_IntegerArray
#
# Testing attribute: User defined (additional GUID) TDataStd_IntegerArray
#
# Testing command: SetIntArray
# Testing command: GetIntArray
#
puts "caf001-D5"
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
set aGuid1 "12e94511-6dbc-11d4-b9c8-0060b0ee281b"
SetIntArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetIntArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_IntegerArray attribute: Error"
set aGetAttr1 [GetIntArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetIntArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_IntegerArray attribute: Error"
} else {
puts "Add TDataStd_IntegerArray attribute: OK"
}

89
tests/caf/basic/D6 Normal file
View File

@@ -0,0 +1,89 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_IntegerArray
#
# Testing attribute: User defined (additional GUID) TDataStd_IntegerArray
#
# Testing command: SetIntArray
# Testing command: GetIntArray
#
puts "caf001-D6"
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
set aGuid1 "12e94511-6dbc-11d4-b9c8-0060b0ee281b"
SetIntArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetIntArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-D6.cbf
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_IntegerArray attribute: Error"
set aGetAttr1 [GetIntArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetIntArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_IntegerArray attribute: Error"
} else {
puts "Add TDataStd_IntegerArray attribute: OK"
}

90
tests/caf/basic/D7 Normal file
View File

@@ -0,0 +1,90 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_RealArray
#
# Testing attribute: User defined (additional GUID) TDataStd_IntegerArray
#
# Testing command: SetIntArray
# Testing command: GetIntArray
#
puts "caf001-D7"
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
set aGuid1 "12e94511-6dbc-11d4-b9c8-0060b0ee281b"
SetIntArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetIntArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-D7.xml
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_IntegerArray attribute: Error"
set aGetAttr1 [GetIntArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetIntArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_IntegerArray attribute: Error"
} else {
puts "Add TDataStd_IntegerArray attribute: OK"
}

80
tests/caf/basic/M5 Normal file
View File

@@ -0,0 +1,80 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ExtStringArray
#
# Testing attribute: User defined (additional GUID) TDataStd_ExtStringArray
#
# Testing command: SetExtStringArray
# Testing command: GetExtStringArray
#
puts "caf001-M5"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 aaaaa
set aSetAttr12 bbbbbbb
set aLabel 0:2
set isDelta 0
set aGuid1 "12e94515-6dbc-11d4-b9c8-0060b0ee281b"
SetExtStringArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetExtStringArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ExtStringArray attribute: Error"
set aGetAttr1 [GetExtStringArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetExtStringArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ExtStringArray attribute: Error"
} else {
puts "Add TDataStd_ExtStringArray attribute: OK"
}

89
tests/caf/basic/M6 Normal file
View File

@@ -0,0 +1,89 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ExtStringArray
#
# Testing attribute: User defined (additional GUID) TDataStd_IntegerArray
#
# Testing command: SetExtStringArray
# Testing command: GetExtStringArray
#
puts "caf001-M6"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 xxxxxxxx
set aSetAttr12 yyyyyyy
set aLabel 0:2
set isDelta 0
set aGuid1 "12e94515-6dbc-11d4-b9c8-0060b0ee281b"
SetExtStringArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetExtStringArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-M6.cbf
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ExtStringArray attribute: Error"
set aGetAttr1 [GetExtStringArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetExtStringArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ExtStringArray attribute: Error"
} else {
puts "Add TDataStd_ExtStringArray attribute: OK"
}

90
tests/caf/basic/M7 Normal file
View File

@@ -0,0 +1,90 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ExtStringArray
#
# Testing attribute: User defined (additional GUID) TDataStd_ExtStringArray
#
# Testing command: SetExtStringArray
# Testing command: GetExtStringArray
#
puts "caf001-M7"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 xxxxx
set aSetAttr12 zzzzzzz
set aLabel 0:2
set isDelta 0
set aGuid1 "12e94515-6dbc-11d4-b9c8-0060b0ee281b"
SetExtStringArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetExtStringArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-M7.xml
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ExtStringArray attribute: Error"
set aGetAttr1 [GetExtStringArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetExtStringArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ExtStringArray attribute: Error"
} else {
puts "Add TDataStd_ExtStringArray attribute: OK"
}

80
tests/caf/basic/O5 Normal file
View File

@@ -0,0 +1,80 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_BooleanArray
#
# Testing attribute: User defined (additional GUID) TDataStd_BooleanArray
#
# Testing command: SetBooleanArray
# Testing command: GetBooleanArray
#
puts "caf001-O5"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 0
set aSetAttr12 1
set aLabel 0:2
set aGuid1 "12e94516-6dbc-11d4-b9c8-0060b0ee281b"
SetBooleanArray D ${aLabel} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetBooleanArray D ${aLabel} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_BooleanArray attribute: Error"
set aGetAttr1 [GetBooleanArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetBooleanArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_BooleanArray attribute: Error"
} else {
puts "Add TDataStd_BooleanArray attribute: OK"
}

89
tests/caf/basic/O6 Normal file
View File

@@ -0,0 +1,89 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_BooleanArray
#
# Testing attribute: User defined (additional GUID) TDataStd_BooleanArray
#
# Testing command: SetBooleanArray
# Testing command: GetBooleanArray
#
puts "caf001-O6"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 0
set aSetAttr12 1
set aLabel 0:2
set aGuid1 "12e94516-6dbc-11d4-b9c8-0060b0ee281b"
SetBooleanArray D ${aLabel} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetBooleanArray D ${aLabel} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-O6.cbf
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_BooleanArray attribute: Error"
set aGetAttr1 [GetBooleanArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetBooleanArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_BooleanArray attribute: Error"
} else {
puts "Add TDataStd_BooleanArray attribute: OK"
}

90
tests/caf/basic/O7 Normal file
View File

@@ -0,0 +1,90 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_BooleanArray
#
# Testing attribute: User defined (additional GUID) TDataStd_BooleanArray
#
# Testing command: SetBooleanArray
# Testing command: GetBooleanArray
#
puts "caf001-O7"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 0
set aSetAttr12 1
set aLabel 0:2
set aGuid1 "12e94516-6dbc-11d4-b9c8-0060b0ee281b"
SetBooleanArray D ${aLabel} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetBooleanArray D ${aLabel} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-O7.xml
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_BooleanArray attribute: Error"
set aGetAttr1 [GetBooleanArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetBooleanArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_BooleanArray attribute: Error"
} else {
puts "Add TDataStd_BooleanArray attribute: OK"
}

80
tests/caf/basic/P5 Normal file
View File

@@ -0,0 +1,80 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ByteArray
#
# Testing attribute: User defined (additional GUID) TDataStd_ByteArray
#
# Testing command: SetByteArray
# Testing command: GetByteArray
#
puts "caf001-P5"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 10
set aSetAttr12 12
set aLabel 0:2
set isDelta 0
set aGuid1 "12e94517-6dbc-11d4-b9c8-0060b0ee281b"
SetByteArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetByteArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ByteArray attribute: Error"
set aGetAttr1 [GetByteArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetByteArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ByteArray attribute: Error"
} else {
puts "Add TDataStd_ByteArray attribute: OK"
}

89
tests/caf/basic/P6 Normal file
View File

@@ -0,0 +1,89 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ByteArray
#
# Testing attribute: User defined (additional GUID) TDataStd_ByteArray
#
# Testing command: SetByteArray
# Testing command: GetByteArray
#
puts "caf001-P6"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 10
set aSetAttr12 12
set aLabel 0:2
set isDelta 0
set aGuid1 "12e94517-6dbc-11d4-b9c8-0060b0ee281b"
SetByteArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetByteArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-P6.cbf
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ByteArray attribute: Error"
set aGetAttr1 [GetByteArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetByteArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ByteArray attribute: Error"
} else {
puts "Add TDataStd_ByteArray attribute: OK"
}

90
tests/caf/basic/P7 Normal file
View File

@@ -0,0 +1,90 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ByteArray
#
# Testing attribute: User defined (additional GUID) TDataStd_ByteArray
#
# Testing command: SetByteArray
# Testing command: GetByteArray
#
puts "caf001-P7"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 10
set aSetAttr12 12
set aLabel 0:2
set isDelta 0
set aGuid1 "12e94517-6dbc-11d4-b9c8-0060b0ee281b"
SetByteArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetByteArray D ${aLabel} ${isDelta} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-P7.xml
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ByteArray attribute: Error"
set aGetAttr1 [GetByteArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetByteArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ByteArray attribute: Error"
} else {
puts "Add TDataStd_ByteArray attribute: OK"
}

80
tests/caf/basic/Q5 Normal file
View File

@@ -0,0 +1,80 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ReferenceArray
#
# Testing attribute: User defined (additional GUID) TDataStd_ReferenceArray
#
# Testing command: SetRefArray
# Testing command: GetRefArray
#
puts "caf001-Q5"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 0:3
set aSetAttr12 0:4
set aLabel 0:2
set aGuid1 "12e94518-6dbc-11d4-b9c8-0060b0ee281b"
SetRefArray D ${aLabel} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetRefArray D ${aLabel} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ReferenceArray attribute: Error"
set aGetAttr1 [GetRefArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetRefArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ReferenceArray attribute: Error"
} else {
puts "Add TDataStd_ReferenceArray attribute: OK"
}

89
tests/caf/basic/Q6 Normal file
View File

@@ -0,0 +1,89 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ReferenceArray
#
# Testing attribute: User defined (additional GUID) TDataStd_ReferenceArray
#
# Testing command: SetRefArray
# Testing command: GetRefArray
#
puts "caf001-Q6"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 0:3
set aSetAttr12 0:4
set aLabel 0:2
set aGuid1 "12e94518-6dbc-11d4-b9c8-0060b0ee281b"
SetRefArray D ${aLabel} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetRefArray D ${aLabel} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-Q6.cbf
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ReferenceArray attribute: Error"
set aGetAttr1 [GetRefArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetRefArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ReferenceArray attribute: Error"
} else {
puts "Add TDataStd_ReferenceArray attribute: OK"
}

90
tests/caf/basic/Q7 Normal file
View File

@@ -0,0 +1,90 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ReferenceArray
#
# Testing attribute: User defined (additional GUID) TDataStd_ReferenceArray
#
# Testing command: SetRefArray
# Testing command: GetRefArray
#
puts "caf001-Q7"
set QA_DUP 0
# Add an attribute to a data framework
set aFrom1 1
set aTo1 2
set aSetAttr11 0:3
set aSetAttr12 0:4
set aLabel 0:2
set aGuid1 "12e94518-6dbc-11d4-b9c8-0060b0ee281b"
SetRefArray D ${aLabel} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
SetRefArray D ${aLabel} -g ${aGuid1} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-Q7.xml
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_BooleanArray attribute: Error"
set aGetAttr1 [GetRefArray D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetRefArray D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen1=${aLen1}"
puts ${aMessage1}
}
if { ${aLen2} != [expr ${aTo1} - ${aFrom1} + 1] } {
set IsGood 0
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ReferenceArray attribute: Error"
} else {
puts "Add TDataStd_ReferenceArray attribute: OK"
}

74
tests/caf/basic/R5 Normal file
View File

@@ -0,0 +1,74 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_RealList
#
# Testing attribute: User defined (additional GUID) TDataStd_RealList
#
# Testing command: SetRealList
# Testing command: GetRealList
#
puts "caf001-R5"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr11 3.
set aSetAttr12 4.
set aLabel 0:2
set aGuid1 "12e94521-6dbc-11d4-b9c8-0060b0ee281b"
SetRealList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetRealList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_RealList attribute: Error"
set aGetAttr1 [GetRealList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetRealList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_RealList attribute: Error"
} else {
puts "Add TDataStd_RealList attribute: OK"
}

82
tests/caf/basic/R6 Normal file
View File

@@ -0,0 +1,82 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_RealList
#
# Testing attribute: User defined (additional GUID) TDataStd_RealList
#
# Testing command: SetRealList
# Testing command: GetRealList
#
puts "caf001-R6"
set QA_DUP 0
# Add an attributes to a data framework
set aSetAttr11 3.
set aSetAttr12 4.
set aLabel 0:2
set aGuid1 "12e94521-6dbc-11d4-b9c8-0060b0ee281b"
SetRealList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetRealList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-R6.cbf
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_RealList attribute: Error"
set aGetAttr1 [GetRealList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetRealList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_RealList attribute: Error"
} else {
puts "Add TDataStd_RealList attribute: OK"
}

83
tests/caf/basic/R7 Normal file
View File

@@ -0,0 +1,83 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_RealList
#
# Testing attribute: User defined (additional GUID) TDataStd_RealList
#
# Testing command: SetRealList
# Testing command: GetRealList
#
puts "caf001-R7"
set QA_DUP 0
# Add an attributes to a data framework
set aSetAttr11 3.
set aSetAttr12 4.
set aLabel 0:2
set aGuid1 "12e94521-6dbc-11d4-b9c8-0060b0ee281b"
SetRealList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetRealList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-R7.xml
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_RealList attribute: Error"
set aGetAttr1 [GetRealList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetRealList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_RealList attribute: Error"
} else {
puts "Add TDataStd_RealList attribute: OK"
}

74
tests/caf/basic/S5 Normal file
View File

@@ -0,0 +1,74 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_IntegerList
#
# Testing attribute: User defined (additional GUID) TDataStd_IntegerList
#
# Testing command: SetIntegerList
# Testing command: GetIntegerList
#
puts "caf001-S5"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr11 33
set aSetAttr12 44
set aLabel 0:2
set aGuid1 "12e94531-6dbc-11d4-b9c8-0060b0ee281b"
SetIntegerList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetIntegerList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_IntegerList attribute: Error"
set aGetAttr1 [GetIntegerList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetIntegerList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_IntegerList attribute: Error"
} else {
puts "Add TDataStd_IntegerList attribute: OK"
}

82
tests/caf/basic/S6 Normal file
View File

@@ -0,0 +1,82 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_IntegerList
#
# Testing attribute: User defined (additional GUID) TDataStd_IntegerList
#
# Testing command: SetIntegerList
# Testing command: GetIntegerList
#
puts "caf001-S6"
set QA_DUP 0
# Add an attributes to a data framework
set aSetAttr11 33
set aSetAttr12 44
set aLabel 0:2
set aGuid1 "12e94531-6dbc-11d4-b9c8-0060b0ee281b"
SetIntegerList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetIntegerList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-S6.cbf
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_IntegerList attribute: Error"
set aGetAttr1 [GetIntegerList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetIntegerList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_IntegerList attribute: Error"
} else {
puts "Add TDataStd_IntegerList attribute: OK"
}

83
tests/caf/basic/S7 Normal file
View File

@@ -0,0 +1,83 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_IntegerList
#
# Testing attribute: User defined (additional GUID) TDataStd_IntegerList
#
# Testing command: SetIntegerList
# Testing command: GetIntegerList
#
puts "caf001-S7"
set QA_DUP 0
# Add an attributes to a data framework
set aSetAttr11 33
set aSetAttr12 44
set aLabel 0:2
set aGuid1 "12e94531-6dbc-11d4-b9c8-0060b0ee281b"
SetIntegerList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetIntegerList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-S7.xml
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_IntegerList attribute: Error"
set aGetAttr1 [GetIntegerList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetIntegerList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_IntegerList attribute: Error"
} else {
puts "Add TDataStd_IntegerList attribute: OK"
}

74
tests/caf/basic/T5 Normal file
View File

@@ -0,0 +1,74 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ExtStringList
#
# Testing attribute: User defined (additional GUID) TDataStd_ExtStringList
#
# Testing command: SetExtStringList
# Testing command: GetExtStringList
#
puts "caf001-T5"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr11 aaaaa
set aSetAttr12 bbbbbb
set aLabel 0:2
set aGuid1 "12e94541-6dbc-11d4-b9c8-0060b0ee281b"
SetExtStringList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetExtStringList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ExtStringList attribute: Error"
set aGetAttr1 [GetExtStringList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetExtStringList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ExtStringList attribute: Error"
} else {
puts "Add TDataStd_ExtStringList attribute: OK"
}

82
tests/caf/basic/T6 Normal file
View File

@@ -0,0 +1,82 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ExtStringList
#
# Testing attribute: User defined (additional GUID) TDataStd_ExtStringList
#
# Testing command: SetExtStringList
# Testing command: GetExtStringList
#
puts "caf001-T6"
set QA_DUP 0
# Add an attributes to a data framework
set aSetAttr11 xxxx
set aSetAttr12 yyyyy
set aLabel 0:2
set aGuid1 "12e94541-6dbc-11d4-b9c8-0060b0ee281b"
SetExtStringList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetExtStringList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-T6.cbf
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ExtStringList attribute: Error"
set aGetAttr1 [GetExtStringList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetExtStringList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ExtStringList attribute: Error"
} else {
puts "Add TDataStd_ExtStringList attribute: OK"
}

83
tests/caf/basic/T7 Normal file
View File

@@ -0,0 +1,83 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ExtStringList
#
# Testing attribute: User defined (additional GUID) TDataStd_ExtStringList
#
# Testing command: SetExtStringList
# Testing command: GetExtStringList
#
puts "caf001-T7"
set QA_DUP 0
# Add an attributes to a data framework
set aSetAttr11 xxxx
set aSetAttr12 yyyyy
set aLabel 0:2
set aGuid1 "12e94541-6dbc-11d4-b9c8-0060b0ee281b"
SetExtStringList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetExtStringList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-T7.xml
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ExtStringList attribute: Error"
set aGetAttr1 [GetExtStringList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetExtStringList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ExtStringList attribute: Error"
} else {
puts "Add TDataStd_ExtStringList attribute: OK"
}

74
tests/caf/basic/U5 Normal file
View File

@@ -0,0 +1,74 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_BooleanList
#
# Testing attribute: User defined (additional GUID) TDataStd_BooleanList
#
# Testing command: SetBooleanList
# Testing command: GetBooleanList
#
puts "caf001-U5"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr11 0
set aSetAttr12 1
set aLabel 0:2
set aGuid1 "12e94551-6dbc-11d4-b9c8-0060b0ee281b"
SetBooleanList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetBooleanList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_BooleanList attribute: Error"
set aGetAttr1 [GetBooleanList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetBooleanList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_BooleanList attribute: Error"
} else {
puts "Add TDataStd_BooleanList attribute: OK"
}

82
tests/caf/basic/U6 Normal file
View File

@@ -0,0 +1,82 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_BooleanList
#
# Testing attribute: User defined (additional GUID) TDataStd_BooleanList
#
# Testing command: SetBooleanList
# Testing command: GetBooleanList
#
puts "caf001-U6"
set QA_DUP 0
# Add an attributes to a data framework
set aSetAttr11 0
set aSetAttr12 1
set aLabel 0:2
set aGuid1 "12e94551-6dbc-11d4-b9c8-0060b0ee281b"
SetBooleanList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetBooleanList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-U6.cbf
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_BooleanList attribute: Error"
set aGetAttr1 [GetBooleanList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetBooleanList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_BooleanList attribute: Error"
} else {
puts "Add TDataStd_BooleanList attribute: OK"
}

83
tests/caf/basic/U7 Normal file
View File

@@ -0,0 +1,83 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_BooleanList
#
# Testing attribute: User defined (additional GUID) TDataStd_BooleanList
#
# Testing command: SetBooleanList
# Testing command: GetBooleanList
#
puts "caf001-U7"
set QA_DUP 0
# Add an attributes to a data framework
set aSetAttr11 0
set aSetAttr12 1
set aLabel 0:2
set aGuid1 "12e94551-6dbc-11d4-b9c8-0060b0ee281b"
SetBooleanList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetBooleanList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-U7.xml
SaveAs D ${aFile};
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_BooleanList attribute: Error"
set aGetAttr1 [GetBooleanList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetBooleanList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_BooleanList attribute: Error"
} else {
puts "Add TDataStd_BooleanList attribute: OK"
}

74
tests/caf/basic/V5 Normal file
View File

@@ -0,0 +1,74 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ReferenceList
#
# Testing attribute: User defined (additional GUID) TDataStd_ReferenceList
#
# Testing command: SetReferenceList
# Testing command: GetReferenceList
#
puts "caf001-V5"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr11 0:3
set aSetAttr12 0:4
set aLabel 0:2
set aGuid1 "12e94561-6dbc-11d4-b9c8-0060b0ee281b"
SetReferenceList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetReferenceList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ReferenceList attribute: Error"
set aGetAttr1 [GetReferenceList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetReferenceList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ReferenceList attribute: Error"
} else {
puts "Add TDataStd_ReferenceList attribute: OK"
}

83
tests/caf/basic/V6 Normal file
View File

@@ -0,0 +1,83 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ReferenceList
#
# Testing attribute: User defined (additional GUID) TDataStd_ReferenceList
#
# Testing command: SetReferenceList
# Testing command: GetReferenceList
#
puts "caf001-V6"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr11 0:3
set aSetAttr12 0:4
set aLabel 0:2
set aGuid1 "12e94561-6dbc-11d4-b9c8-0060b0ee281b"
SetReferenceList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetReferenceList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
set aFile ${imagedir}/caf001-V6.cbf
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ReferenceList attribute: Error"
set aGetAttr1 [GetReferenceList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetReferenceList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ReferenceList attribute: Error"
} else {
puts "Add TDataStd_ReferenceList attribute: OK"
}

84
tests/caf/basic/V7 Normal file
View File

@@ -0,0 +1,84 @@
#INTERFACE CAF
# Basic attributes
# TDataStd_ReferenceList
#
# Testing attribute: User defined (additional GUID) TDataStd_ReferenceList
#
# Testing command: SetReferenceList
# Testing command: GetReferenceList
#
puts "caf001-V7"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr11 0:3
set aSetAttr12 0:4
set aLabel 0:2
set aGuid1 "12e94561-6dbc-11d4-b9c8-0060b0ee281b"
SetReferenceList D ${aLabel} ${aSetAttr11} ${aSetAttr12}
SetReferenceList D ${aLabel} -g ${aGuid1} ${aSetAttr11} ${aSetAttr12}
# Close/Open the transaction
NewCommand D
# Forget the attribute
ForgetAll D ${aLabel}
# Close/Open the transaction
NewCommand D
# Undo-Redo-Undo
Undo D
Redo D
Undo D
# Save Document
Format D XmlOcaf
set aFile ${imagedir}/caf001-V7.xml
SaveAs D ${aFile}
Close D
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ReferenceList attribute: Error"
set aGetAttr1 [GetReferenceList D ${aLabel}]
set aLen1 [llength ${aGetAttr1}]
set aGetAttr2 [GetReferenceList D ${aLabel} ${aGuid1}]
set aLen2 [llength ${aGetAttr2}]
if { ${aLen1} != ${aLen2}} {
set IsGood 0
puts "aLen1=${aLen1}"
puts "aLen2=${aLen2}"
puts ${aMessage1}
}
set aGetAttr11 [lindex ${aGetAttr1} 0]
set aGetAttr21 [lindex ${aGetAttr2} 0]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
puts ${aMessage1}
}
set aGetAttr12 [lindex ${aGetAttr1} 1]
set aGetAttr22 [lindex ${aGetAttr2} 1]
if { ${aGetAttr12} != ${aGetAttr22} } {
set IsGood 0
puts "aGetAttr12=${aGetAttr12}"
puts "aGetAttr22=${aGetAttr22}"
puts ${aMessage1}
}
if { ${IsGood} == 0} {
puts "Add TDataStd_ReferenceList attribute: Error"
} else {
puts "Add TDataStd_ReferenceList attribute: OK"
}

53
tests/caf/basic/W1 Normal file
View File

@@ -0,0 +1,53 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attributes
# BooleanArray, ByteArray, ExtStringArray, IntegerArray, RealArray, ReferenceArray
# BooleanList, ExtStringList, IntegerList, RealList, ReferenceList
#
# Testing command: Open, GetBooleanArray, GetByteArray, GetExtStringArray, GetIntArray, GetRealArray, GetRefArray.
# Testing command: GetBooleanList, GetExtStringArray, GetIntegerList, GetRealList, GetReferenceList
#
puts "caf001-W1"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {1 0 0 1 1}
set aLabel 0:1
set aFile [locate_data_file caf001_boolAr.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_BooleanArray attribute: Error"
set aGetAttr1 [GetBooleanArray D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_BooleanArray attribute: OK"
}

50
tests/caf/basic/W10 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute RealList
#
# Testing command: Open, GetRealList.
#
puts "caf001-W10"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {1.1 1.2 1.3 1.4 1.5}
set aLabel 0:1
set aFile [locate_data_file caf001_realList.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_RealList attribute: Error"
set aGetAttr1 [GetRealList D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_RealList attribute: OK"
}

50
tests/caf/basic/W11 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute ReferenceList
#
# Testing command: Open, GetReferenceList.
#
puts "caf001-W11"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {0:1:5 0:1:3 0:1:2 0:1:1 0:1:4}
set aLabel 0:1
set aFile [locate_data_file caf001_refList.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ReferenceList attribute: Error"
set aGetAttr1 [GetReferenceList D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_ReferenceList attribute: OK"
}

50
tests/caf/basic/W2 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute ByteArray
#
# Testing command: Open, GetByteArray
#
puts "caf001-W2"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {12 23 9}
set aLabel 0:1
set aFile [locate_data_file caf001_byteAr.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ByteArray attribute: Error"
set aGetAttr1 [GetByteArray D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_ByteArray attribute: OK"
}

50
tests/caf/basic/W3 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute ExtStringArray
#
# Testing command: Open, GetExtStringArray
#
puts "caf001-W3"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {aaaaaaaaa bbbbbbbbbb cccccccccccccc}
set aLabel 0:1
set aFile [locate_data_file caf001_extstrAr.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ExtStringArray attribute: Error"
set aGetAttr1 [GetExtStringArray D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_ExtStringArray attribute: OK"
}

50
tests/caf/basic/W4 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute IntegerArray
#
# Testing command: Open, GetIntArray
#
puts "caf001-W4"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {11 12 13 14 155}
set aLabel 0:1
set aFile [locate_data_file caf001_intAr.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_IntegerArray attribute: Error"
set aGetAttr1 [GetIntArray D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_IntegerArray attribute: OK"
}

50
tests/caf/basic/W5 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute RealArray
#
# Testing command: Open, GetRealArray.
#
puts "caf001-W5"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {1.1 1.2 1.3 1.4 1.5}
set aLabel 0:1
set aFile [locate_data_file caf001_realAr.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_RealArray attribute: Error"
set aGetAttr1 [GetRealArray D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_RealArray attribute: OK"
}

50
tests/caf/basic/W6 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute ReferenceArray
#
# Testing command: Open, GetRefArray.
#
puts "caf001-W6"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {0:1:3 0:1:5 0:1:1}
set aLabel 0:1
set aFile [locate_data_file caf001_refAr.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ReferenceArray attribute: Error"
set aGetAttr1 [GetRefArray D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_ReferenceArray attribute: OK"
}

50
tests/caf/basic/W7 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute BooleanList
#
# Testing command: Open, GetBooleanList
#
puts "caf001-W7"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {1 0 1 0 1}
set aLabel 0:1
set aFile [locate_data_file caf001_boolList.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_BooleanList attribute: Error"
set aGetAttr1 [GetBooleanList D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_BooleanList attribute: OK"
}

50
tests/caf/basic/W8 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute ExtStringList
#
# Testing command: Open, GetExtStringList.
#
puts "caf001-W8"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {aaaaaaaaaaaa1 bbbbbbb2 ccccccccc3}
set aLabel 0:1
set aFile [locate_data_file caf001_extstrList.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_ExtStringList attribute: Error"
set aGetAttr1 [GetExtStringList D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_ExtStringList attribute: OK"
}

50
tests/caf/basic/W9 Normal file
View File

@@ -0,0 +1,50 @@
#INTERFACE CAF
# Basic attributes
# Std documents
#
# Testing support of std format: reading standard attribute IntegerList
#
# Testing command: Open, GetIntegerList.
#
puts "caf001-W9"
set QA_DUP 0
# Add an attribute to a data framework
set aSetAttr1 {11 12 13 14 15}
set aLabel 0:1
set aFile [locate_data_file caf001_intList.std]
#Open a document
Open ${aFile} D
# Get a value of the attribute
set IsGood 1
set aMessage1 "Add TDataStd_IntegerList attribute: Error"
set aGetAttr1 [GetIntegerList D ${aLabel}]
set aLenRead [llength ${aGetAttr1}]
set aLenSet [llength ${aSetAttr1}]
if { ${aLenRead} != ${aLenSet} } {
set IsGood 0
puts "aLenRead=${aLenRead}"
puts ${aMessage1}
}
if { ${IsGood} == 0} return
for {set i 0} {$i < $aLenRead} {incr i} {
set aGetAttr11 [lindex ${aGetAttr1} $i]
set aGetAttr21 [lindex ${aSetAttr1} $i]
if { ${aGetAttr11} != ${aGetAttr21} } {
set IsGood 0;puts "i=${i}"
puts "aGetAttr11=${aGetAttr11}"
puts "aGetAttr21=${aGetAttr21}"
break
}
}
if { ${IsGood} == 0} {
puts ${aMessage1}
} else {
puts "Add TDataStd_IntegerList attribute: OK"
}

View File

@@ -42,7 +42,7 @@ SetRealArray DOC 0:1 0 1 5 1.12345678987654321 2.2 3.3 4.4 5.5
SetIntPackedMap DOC 0:1 0 1 10 100 1000 10000
# Set an array of boolean values.
SetBooleanArray DOC 0:1 0 1 5 0 0 0 1 1
SetBooleanArray DOC 0:1 1 5 0 0 0 1 1
# Set a list of integer values.
SetIntegerList DOC 0:1 1971 1972 1973 1974 1975