From 319e4241ee237639c19f59471c2d4bc7ccb6c599 Mon Sep 17 00:00:00 2001 From: apn Date: Thu, 6 Sep 2012 14:24:05 +0400 Subject: [PATCH] 0023410: QA commands don't work properly in new testing system Comment adding command rename. Add QA test case. Adjusting bugs test group --- src/QADraw/QADraw.cxx | 3 +- tests/bugs/demo/CR23410 | 34 +++++++++++++++++++++ tests/bugs/demo/CR23416 | 17 +++++++++++ tests/bugs/end | 10 +++++-- tests/bugs/grids.list | 9 +++++- tests/bugs/iges/CR23377 | 6 ++++ tests/bugs/xde/CR23384 | 66 +++++++++++++++++++++++++++++++++++++++++ tests/bugs/xde/begin | 9 ++++++ 8 files changed, 149 insertions(+), 5 deletions(-) create mode 100755 tests/bugs/demo/CR23410 create mode 100755 tests/bugs/demo/CR23416 create mode 100755 tests/bugs/xde/CR23384 create mode 100755 tests/bugs/xde/begin diff --git a/src/QADraw/QADraw.cxx b/src/QADraw/QADraw.cxx index 6f63abfaa6..022a3ccd27 100755 --- a/src/QADraw/QADraw.cxx +++ b/src/QADraw/QADraw.cxx @@ -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("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); //#if defined(V2D) diff --git a/tests/bugs/demo/CR23410 b/tests/bugs/demo/CR23410 new file mode 100755 index 0000000000..2949ea2bcb --- /dev/null +++ b/tests/bugs/demo/CR23410 @@ -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 + + + + + diff --git a/tests/bugs/demo/CR23416 b/tests/bugs/demo/CR23416 new file mode 100755 index 0000000000..c5e89ce9a1 --- /dev/null +++ b/tests/bugs/demo/CR23416 @@ -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 + + diff --git a/tests/bugs/end b/tests/bugs/end index 82228b167e..70ed40c176 100755 --- a/tests/bugs/end +++ b/tests/bugs/end @@ -7,15 +7,19 @@ if { [isdraw result] } { xwd $imagedir/${test_image}.gif } if { [info exists 3dviewer] } { + vinit vclear vdisplay result vsetdispmode 1 vfit vdump $imagedir/${test_image}.gif } -} else { - puts "Error : The command can not be build." -} + if { [info exist only_xwd] } { + xwd $imagedir/${test_image}.gif + } +#} else { +# puts "Error : The command can not be build." +#} # to end a test script puts "TEST COMPLETED" diff --git a/tests/bugs/grids.list b/tests/bugs/grids.list index bd9ecb38af..21bd88e754 100755 --- a/tests/bugs/grids.list +++ b/tests/bugs/grids.list @@ -1,2 +1,9 @@ -001 iges +001 demo +002 iges +003 xde + + + + + diff --git a/tests/bugs/iges/CR23377 b/tests/bugs/iges/CR23377 index 9bddc76732..285ee11562 100755 --- a/tests/bugs/iges/CR23377 +++ b/tests/bugs/iges/CR23377 @@ -1,8 +1,13 @@ # Original bug : 23377 # Date : 12 Aug 2012 +set check_nb 7 igesbrep [locate_data_file OCC23377-Input.igs] result * 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" set 2dviewer 1 @@ -15,3 +20,4 @@ set 2dviewer 1 + diff --git a/tests/bugs/xde/CR23384 b/tests/bugs/xde/CR23384 new file mode 100755 index 0000000000..0894f3a972 --- /dev/null +++ b/tests/bugs/xde/CR23384 @@ -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!" +} + + + + + + + + + + + + diff --git a/tests/bugs/xde/begin b/tests/bugs/xde/begin new file mode 100755 index 0000000000..548d4d3146 --- /dev/null +++ b/tests/bugs/xde/begin @@ -0,0 +1,9 @@ +pload XDE + + + + + + + +