Adding test cases from chl grid
[occt.git] / tests / bugs / caf / bug1395_1
CommitLineData
61c421bf 1puts "TODO OCC12345 ALL: OCC1395 Error : There is not the integer attribute on the label 0:2"
2puts "TODO OCC12345 ALL: OCC1395 Error"
3
4puts "================"
5puts "OCC1395"
6puts "================"
7puts ""
8#######################################################################################
9# Wrong behaviour of Undo Redo and SetUndoLimit methods in TDocStd_Document
10#######################################################################################
11# Case 1 (Undo)
12#######################################################################################
13
14set IsGood 1
15
16# Create a new document and set UndoLimit
17NewDocument D MDTV-Standard
18UndoLimit D 100
19
20# Create a label
21set aLabel 0:2
22Label D ${aLabel}
23
24# Open a transaction
25OpenTran D
26
27# Set integer attribute
28set anInteger 5
29SetInteger D ${aLabel} ${anInteger}
30
31# Commit transaction
32CommitTran D 1
33
34# Undo
35DFUndo D 1
36
37# Check integer attributes
38if [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
46set aReal 8.8
47SetReal D ${aLabel} ${aReal}
48
49# Undo
50DFUndo D 1
51
52# Check real attributes
53if [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
60if { ${IsGood} == 1 } {
61 puts "OCC1395 OK"
62} else {
63 puts "OCC1395 Error"
64}