607a96d4 |
1 | set aTestName "caf001-C3" |
2 | puts $aTestName |
3 | |
4 | set QA_DUP 0 |
5 | |
6 | # Add an attribute to a data framework |
7 | set aFrom1 1 |
8 | set aTo1 2 |
9 | set aSetAttr11 3. |
10 | set aSetAttr12 4. |
11 | set aLabel 0:2 |
12 | set isDelta 0 |
13 | SetRealArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12} |
14 | |
15 | # Close/Open the transaction |
16 | NewCommand D |
17 | |
18 | # Save the document |
19 | set aFile $WorkDirectory/${aTestName}.${FileSuffix} |
20 | |
21 | SaveToFile D $aFile |
22 | |
23 | # Restore the document |
24 | Close D |
25 | Open ${aFile} DD |
26 | |
27 | # Get a value of the attribute |
28 | |
29 | set IsDone [catch {set aGetAttr3 [GetRealArray DD ${aLabel}]} aResult] |
30 | if { ${IsDone} != 0 } { |
31 | puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" |
32 | } else { |
33 | set aLen3 [llength ${aGetAttr3}] |
34 | if { ${aLen3} != [expr ${aTo1} - ${aFrom1} + 1] } { |
35 | puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" |
36 | } |
37 | set aGetAttr41 [lindex ${aGetAttr3} 0] |
38 | if { ${aSetAttr11} != ${aGetAttr41} } { |
39 | puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" |
40 | } |
41 | set aGetAttr42 [lindex ${aGetAttr3} 1] |
42 | if { ${aSetAttr12} != ${aGetAttr42} } { |
43 | puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" |
44 | } |
45 | } |