61c421bf |
1 | puts "================" |
2 | puts "OCC2932" |
3 | puts "================" |
4 | puts "" |
5 | ####################################################################################### |
6 | # Create Attribute Delta depending on actual change of the attribute |
7 | ####################################################################################### |
8 | # Case 8 (TDataStd_IntegerArray) |
9 | ####################################################################################### |
10 | |
11 | # Create a new document and set UndoLimit |
e837410d |
12 | NewDocument D BinOcaf |
61c421bf |
13 | UndoLimit D 100 |
14 | |
15 | # Create a label and set attributes |
16 | NewCommand D |
17 | set Label 0:2 |
18 | |
19 | ############################################ |
20 | set From 1 |
21 | set To 2 |
22 | set IntegerArray1 3 |
23 | set IntegerArray2 4 |
24 | set isDelta 0 |
25 | ############################################ |
26 | |
27 | set Real1 300. |
28 | set Real2 400. |
29 | set modified_attribute TDataStd_Real |
30 | |
31 | ############################################ |
32 | # Set TDataStd_IntegerArray |
33 | SetIntArray D ${Label} ${isDelta} ${From} ${To} ${IntegerArray1} ${IntegerArray2} |
34 | ############################################ |
35 | |
36 | SetReal D ${Label} ${Real1} |
37 | set list [DumpCommand D] |
38 | |
39 | # Open a transaction |
40 | NewCommand D |
41 | set list [DumpCommand D] |
42 | |
43 | ############################################ |
44 | # Set old value for TDataStd_IntegerArray |
45 | SetIntArray D ${Label} ${isDelta} ${From} ${To} ${IntegerArray1} ${IntegerArray2} |
46 | ############################################ |
47 | |
48 | # Set new value for TDataStd_Real |
49 | SetReal D ${Label} ${Real2} |
50 | set list [DumpCommand D] |
51 | |
52 | # Open a transaction |
53 | NewCommand D |
54 | set list [DumpCommand D] |
55 | |
56 | # Checking |
57 | set ll [llength ${list}] |
58 | set good_length 17 |
59 | puts "length = ${ll}" |
60 | puts "good_length = ${good_length}" |
61 | |
62 | if { ${ll} != ${good_length} } { |
63 | puts "OCC2932 Error (case 1)" |
64 | } else { |
65 | set name_attribute [lindex ${list} [expr ${good_length} - 1]] |
66 | puts "name_attribute = ${name_attribute}" |
67 | puts "modified_attribute = ${modified_attribute}" |
68 | if {[string compare ${name_attribute} ${modified_attribute}] == 0} { |
69 | puts "OCC2932 OK" |
70 | } else { |
71 | puts "OCC2932 Error (case 2)" |
72 | } |
73 | } |