1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-05 11:24:17 +03:00

0023410: QA commands don't work properly in new testing system

Comment adding command rename. Add QA test case.
Adjusting bugs test group
This commit is contained in:
apn 2012-09-06 14:24:05 +04:00
parent 33e721baa7
commit 319e4241ee
8 changed files with 149 additions and 5 deletions

View File

@ -2286,7 +2286,8 @@ void QADraw::CommonCommands(Draw_Interpretor& theCommands)
theCommands.Add("QAwzoom","QAwzoom view-id X1 Y1 X2 Y2; zoom on a window",__FILE__,QAwzoom,group); theCommands.Add("QAwzoom","QAwzoom view-id X1 Y1 X2 Y2; zoom on a window",__FILE__,QAwzoom,group);
theCommands.Add("QAGetCoordinatesWzoom","QAGetCoordinatesWzoom ; Get coordinates for zoom on a window",__FILE__,QAGetCoordinatesWzoom,group); theCommands.Add("QAGetCoordinatesWzoom","QAGetCoordinatesWzoom ; Get coordinates for zoom on a window",__FILE__,QAGetCoordinatesWzoom,group);
theCommands.Add("rename","rename name1 toname1 name2 toname2 ...",__FILE__,QArename,group); // adding commands "rename" leads to the fact that QA commands doesn't work properly OCC23410, use function "renamevar"
// theCommands.Add("rename","rename name1 toname1 name2 toname2 ...",__FILE__,QArename,group);
theCommands.Add ("QANbSelected", "QANbSelected", __FILE__, QANbSelected, group); theCommands.Add ("QANbSelected", "QANbSelected", __FILE__, QANbSelected, group);
//#if defined(V2D) //#if defined(V2D)

34
tests/bugs/demo/CR23410 Executable file
View File

@ -0,0 +1,34 @@
puts "============"
puts "CR23410"
puts "============"
puts ""
#######################################################################
# QA comamnds don't work properly in new testing system
#######################################################################
pload QAcommands
set R_check 0.45098000764846802
set G_check 1
set B_check 0.066666000000000003
set x1 128
set y1 235
box result 100 100 100
vdisplay result
vsetdispmode 1
vfit
vsetcolor result GREEN
set color [ QAGetPixelColor ${x1} ${y1} ]
regexp {RED +: +([-0-9.+eE]+)} $color full rd
regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
if { $rd != $R_check || $gr != $G_check || $bl != $B_check} {
puts "Error : color are not equal"
puts "Error : QA command QAGetPixelColor doesn't work properly"
}
set 3dviewer 1

17
tests/bugs/demo/CR23416 Executable file
View File

@ -0,0 +1,17 @@
puts "============"
puts "CR23416"
puts "============"
puts ""
#######################################################################
# Regression of current version in compare with occt-653: crash while visualizing the shape
#######################################################################
isos 2
smallview
if [catch { restore [locate_data_file CR23416-ProblemFace.brep] result } res] {
puts "Error : crashes during visualization"
}
fit
set only_xwd 1

View File

@ -7,15 +7,19 @@ if { [isdraw result] } {
xwd $imagedir/${test_image}.gif xwd $imagedir/${test_image}.gif
} }
if { [info exists 3dviewer] } { if { [info exists 3dviewer] } {
vinit
vclear vclear
vdisplay result vdisplay result
vsetdispmode 1 vsetdispmode 1
vfit vfit
vdump $imagedir/${test_image}.gif vdump $imagedir/${test_image}.gif
} }
} else { if { [info exist only_xwd] } {
puts "Error : The command can not be build." xwd $imagedir/${test_image}.gif
} }
#} else {
# puts "Error : The command can not be build."
#}
# to end a test script # to end a test script
puts "TEST COMPLETED" puts "TEST COMPLETED"

View File

@ -1,2 +1,9 @@
001 iges 001 demo
002 iges
003 xde

View File

@ -1,8 +1,13 @@
# Original bug : 23377 # Original bug : 23377
# Date : 12 Aug 2012 # Date : 12 Aug 2012
set check_nb 7
igesbrep [locate_data_file OCC23377-Input.igs] result * igesbrep [locate_data_file OCC23377-Input.igs] result *
regexp {Number of Rational BSpline surfaces +([-0-9.+eE]+)} [expshape result 1 1] full nb regexp {Number of Rational BSpline surfaces +([-0-9.+eE]+)} [expshape result 1 1] full nb
if { ${nb} != ${check_nb} } {
puts "Error : The Number of Rational BSpline surfaces is wrong!"
puts "Error : It's $nb indtead of $check_nb!"
}
puts "Number of Rational BSpline surfaces is $nb" puts "Number of Rational BSpline surfaces is $nb"
set 2dviewer 1 set 2dviewer 1
@ -15,3 +20,4 @@ set 2dviewer 1

66
tests/bugs/xde/CR23384 Executable file
View File

@ -0,0 +1,66 @@
# Original bug : 23384
# Date : 16 Aug 2012
if {[array get env os_type] != ""} {
set os $env(os_type)
}
XOpen [locate_data_file CR23384-doc_subshapes.dxc] doc
set info1 [XStat doc]
regexp {level N 0 +: +([-0-9.+eE]+)} $info1 full l0
regexp {level N 1 +: +([-0-9.+eE]+)} $info1 full l1
regexp {level N 2 +: +([-0-9.+eE]+)} $info1 full l2
regexp {level N 3 +: +([-0-9.+eE]+)} $info1 full l3
regexp {level N 4 +: +([-0-9.+eE]+)} $info1 full l4
regexp {level N 5 +: +([-0-9.+eE]+)} $info1 full l5
regexp {level N 6 +: +([-0-9.+eE]+)} $info1 full l6
regexp {Total number of labels for shapes in the document += +([-0-9.+eE]+)} $info1 full nb
regexp {Number of labels with name += +([-0-9.+eE]+)} $info1 full nbname
param write.stepcaf.subshapes.name 1
if { [string compare $os "windows"] == 0 } {
WriteStep doc C:/temp/doc_subshapes.stp
} else {
WriteStep doc /tmp/doc_subshapes.stp
}
param read.stepcaf.subshapes.name 1
if { [string compare $os "windows"] == 0 } {
ReadStep after_doc C:/temp/doc_subshapes.stp
} else {
ReadStep after_doc /tmp/doc_subshapes.stp
}
set info2 [XStat after_doc]
regexp {level N 0 +: +([-0-9.+eE]+)} $info2 full l0_1
regexp {level N 1 +: +([-0-9.+eE]+)} $info2 full l1_1
regexp {level N 2 +: +([-0-9.+eE]+)} $info2 full l2_1
regexp {level N 3 +: +([-0-9.+eE]+)} $info2 full l3_1
regexp {level N 4 +: +([-0-9.+eE]+)} $info2 full l4_1
regexp {level N 5 +: +([-0-9.+eE]+)} $info2 full l5_1
regexp {level N 6 +: +([-0-9.+eE]+)} $info2 full l6_1
regexp {Total number of labels for shapes in the document += +([-0-9.+eE]+)} $info2 full nb_1
regexp {Number of labels with name += +([-0-9.+eE]+)} $info2 full nbname_1
if { ${l0} != ${l0_1} ||
${l1} != ${l1_1} ||
${l2} != ${l2_1} ||
${l3} != ${l3_1} ||
${l4} != ${l4_1} ||
${l5} != ${l5_1} ||
${l6} != ${l6_1} ||
${nb} != ${nb_1} ||
${nbname} != ${nbname_1} } {
puts "Error : Document is read/written wrong!"
puts "Error : It's $nb indtead of $check_nb!"
}

9
tests/bugs/xde/begin Executable file
View File

@ -0,0 +1,9 @@
pload XDE