Adding test cases from chl grid
[occt.git] / tests / bugs / caf / bug73_2
1 puts "==========="
2 puts "OCC73"
3 puts "BUC61050"
4 puts "==========="
5
6 pload QAcommands
7
8 NewDocument D MDTV-Standard
9 UndoLimit D 10
10
11 # Close/Open transaction
12 NewCommand D
13
14 # Set NamedShape attribute
15 box aBox1 100 200 300
16 set aLabel 0:2
17 SetShape D ${aLabel} aBox1
18
19 # Initialize 3D viewer
20 AISInitViewer D
21
22 # Add AISPresentation attribute with parameter NS
23 AISSet D ${aLabel} NS
24
25 # Display presentation of NamedShape in the viewer
26 AISDisplay D ${aLabel}
27
28 # Get a selection mode of the shape
29 set SelectionMode0 [OCC73_SelectionMode D ${aLabel}]
30
31 # Set a selection mode of the shape as 1
32 set SelectionMode 1
33 OCC73_SelectionMode D ${aLabel} ${SelectionMode}
34
35 # Get a selection mode of the shape
36 set SelectionMode1 [OCC73_SelectionMode D ${aLabel}]
37
38 # Close/Open transaction
39 NewCommand D
40
41 # Undo
42 Undo D
43
44 # Redo
45 Redo D
46
47 # Get a selection mode of the shape
48 set SelectionMode2 [OCC73_SelectionMode D ${aLabel}]
49
50 puts "SelectionMode0 = ${SelectionMode0}"
51 puts "SelectionMode1 = ${SelectionMode1}"
52 puts "SelectionMode  = ${SelectionMode}"
53 puts "SelectionMode2 = ${SelectionMode2}"
54
55 if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode} || ${SelectionMode1} != ${SelectionMode2}} then {
56         puts "OCC73: Error"
57 } else {
58         puts "OCC73: OK"
59 }