0024696: Lower performance of the new Edge/Edge intersection algorithm
[occt.git] / tests / caf / bugs / C2
CommitLineData
40093367 1#INTERFACE CAF
2puts "================"
3puts "OCC6493"
4puts "================"
5puts ""
6######################################################
7# No binary persistence for TDataStd_ExtStringArray attribute
8######################################################
9
10# Basic attributes
11#
12# Testing attribute: TDataStd_ExtStringArray
13#
14# Testing command: SetExtStringArray
15# Testing command: GetExtStringArray
16#
17
18# ANALOG: puts "caf001-M3"
19set QA_DUP 0
20
21# Create a new document and set UndoLimit
22NewDocument Doc BinOcaf
23UndoLimit Doc 100
24
25# Open a transaction
26NewCommand Doc
27
28# Add an attribute to a data framework
29set aFrom1 1
30set aTo1 2
31set aSetAttr11 "TDataStd"
32set aSetAttr12 "ExtStringArray"
33set aLabel 0:2
34set isDelta 0
35SetExtStringArray Doc ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12}
36
37# Close/Open the transaction
38NewCommand Doc
39
40# Save the document
8418c617 41set aFile ${imagedir}/OCC6493-[file tail [info script]].cbf
40093367 42file delete ${aFile}
43catch {SaveAs Doc ${aFile}}
44if { ![file exists ${aFile}] } {
45 puts "There is not ${aFile} file; SaveAs command: Error"
46 puts "OCC6493: ERROR (case 1)"
47}
48#catch {exec chmod 777 ${aFile}}
49
50# Restore the document
51Close Doc
52catch {Open ${aFile} DDoc}
53
54# Get a value of the attribute
55set aGetAttr3 ""
56set aMessage3 "Get a value of TDataStd_ExtStringArray attribute from restoring document: Error"
57set IsDone [catch {set aGetAttr3 [GetExtStringArray DDoc ${aLabel}]} aResult]
58if { ${IsDone} != 0 } {
59 puts ${aMessage3}
60 puts "OCC6493: ERROR (case 2)"
61}
62set aLen3 [llength ${aGetAttr3}]
63if { ${aLen3} != [expr ${aTo1} - ${aFrom1} + 1] } {
64 puts "aLen3=${aLen3}"
65 puts ${aMessage3}
66 puts "OCC6493: ERROR (case 3)"
67}
68set aGetAttr41 [lindex ${aGetAttr3} 0]
69if { ${aSetAttr11} != ${aGetAttr41} } {
70 puts "aGetAttr41=${aGetAttr41}"
71 puts ${aMessage3}
72 puts "OCC6493: ERROR (case 4)"
73}
74set aGetAttr42 [lindex ${aGetAttr3} 1]
75if { ${aSetAttr12} != ${aGetAttr42} } {
76 puts "aGetAttr42=${aGetAttr42}"
77 puts ${aMessage3}
78 puts "OCC6493: ERROR (case 5)"
79} else {
80 puts "Get a value of TDataStd_ExtStringArray attribute from restoring document: OK"
81 puts "OCC6493: OK"
82}