61c421bf |
1 | puts "TODO OCC12345 ALL: OCC1395 Error : There is not the integer attribute on the label 0:2" |
2 | puts "TODO OCC12345 ALL: OCC1395 Error" |
3 | |
4 | puts "================" |
5 | puts "OCC1395" |
6 | puts "================" |
7 | puts "" |
8 | ####################################################################################### |
9 | # Wrong behaviour of Undo Redo and SetUndoLimit methods in TDocStd_Document |
10 | ####################################################################################### |
11 | # Case 1 (Undo) |
12 | ####################################################################################### |
13 | |
14 | set IsGood 1 |
15 | |
16 | # Create a new document and set UndoLimit |
e837410d |
17 | NewDocument D BinOcaf |
61c421bf |
18 | UndoLimit D 100 |
19 | |
20 | # Create a label |
21 | set aLabel 0:2 |
22 | Label D ${aLabel} |
23 | |
24 | # Open a transaction |
25 | OpenTran D |
26 | |
27 | # Set integer attribute |
28 | set anInteger 5 |
29 | SetInteger D ${aLabel} ${anInteger} |
30 | |
31 | # Commit transaction |
32 | CommitTran D 1 |
33 | |
34 | # Undo |
35 | DFUndo D 1 |
36 | |
37 | # Check integer attributes |
38 | if [catch { set Integer [GetInteger D ${aLabel}] } message] { |
39 | set IsGood 0 |
40 | puts "OCC1395 Error : There is not the integer attribute on the label ${aLabel}" |
41 | } else { |
42 | puts "OCC1395 OK : There is the integer attribute on the label ${aLabel}" |
43 | } |
44 | |
45 | # Set real attribute |
46 | set aReal 8.8 |
47 | SetReal D ${aLabel} ${aReal} |
48 | |
49 | # Undo |
50 | DFUndo D 1 |
51 | |
52 | # Check real attributes |
53 | if [catch { set Real [GetReal D ${aLabel}] } message] { |
54 | set IsGood 0 |
55 | puts "OCC1395 Error : There is not the real attribute on the label ${aLabel}" |
56 | } else { |
57 | puts "OCC1395 OK : There is the real attribute on the label ${aLabel}" |
58 | } |
59 | |
60 | if { ${IsGood} == 1 } { |
61 | puts "OCC1395 OK" |
62 | } else { |
63 | puts "OCC1395 Error" |
64 | } |