From 06da7b7e7046c71e34787f83a968a7e09121cfef Mon Sep 17 00:00:00 2001 From: szy Date: Fri, 1 Mar 2013 14:32:42 +0400 Subject: [PATCH] Adding new tests cases from chl grid --- tests/bugs/modalg_5/bug22747 | 33 +++++++++++++++++++++++++++++++ tests/bugs/moddata_3/buc60634 | 28 ++++++++++++++++++++++++++ tests/bugs/moddata_3/buc60811 | 19 ++++++++++++++++++ tests/bugs/moddata_3/bug162 | 21 ++++++++++++++++++++ tests/bugs/moddata_3/bug23023 | 29 +++++++++++++++++++++++++++ tests/bugs/moddata_3/bug30 | 18 +++++++++++++++++ tests/bugs/moddata_3/bug32 | 37 +++++++++++++++++++++++++++++++++++ tests/bugs/moddata_3/bug599 | 20 +++++++++++++++++++ tests/bugs/moddata_3/bug623 | 30 ++++++++++++++++++++++++++++ tests/bugs/step/bug2845 | 24 +++++++++++++++++++++++ tests/bugs/vis/bug328 | 34 ++++++++++++++++++++++++++++++++ 11 files changed, 293 insertions(+) create mode 100644 tests/bugs/modalg_5/bug22747 create mode 100644 tests/bugs/moddata_3/buc60634 create mode 100644 tests/bugs/moddata_3/buc60811 create mode 100644 tests/bugs/moddata_3/bug162 create mode 100644 tests/bugs/moddata_3/bug23023 create mode 100644 tests/bugs/moddata_3/bug30 create mode 100644 tests/bugs/moddata_3/bug32 create mode 100644 tests/bugs/moddata_3/bug599 create mode 100644 tests/bugs/moddata_3/bug623 create mode 100644 tests/bugs/step/bug2845 create mode 100644 tests/bugs/vis/bug328 diff --git a/tests/bugs/modalg_5/bug22747 b/tests/bugs/modalg_5/bug22747 new file mode 100644 index 0000000000..2b00987919 --- /dev/null +++ b/tests/bugs/modalg_5/bug22747 @@ -0,0 +1,33 @@ +puts "============" +puts "OCC22747" +puts "============" +puts "" +########################################################################### +# Progress indicator in sewing algorithm +########################################################################### + +set BugNumber OCC22747 + +pload XSDRAW + +restore [locate_data_file OCC22765.brep] a +vinit +XProgress -t +set List1 [sewing result 0.1 a] +if { [string compare $List1 ""] != 0 } { + puts "Error: XProgress should not have any output in this mode" +} else { + puts "Mode -t works properly" +} + +puts "----------------------" +XProgress +t +set List2 [sewing result 0.1 a] +if { [regexp "Progress:" $List2] != 1 } { + puts "Error: XProgress should have output in this mode" +} else { + puts "Mode +t works properly" +} + +set 2dviewer 0 + diff --git a/tests/bugs/moddata_3/buc60634 b/tests/bugs/moddata_3/buc60634 new file mode 100644 index 0000000000..9572d0e209 --- /dev/null +++ b/tests/bugs/moddata_3/buc60634 @@ -0,0 +1,28 @@ +puts "Output with mistake is correct!" +puts "TODO BUC60634 ALL: An exception was caught" +puts "==================" +puts "BUC60634" +puts "==================" + +sphere s 10 +mkshell sh s +explode sh f + +decho off +catch {draft r sh 0 0 1 10 shape} first +catch {draft result sh_1 0 0 1 10 shape} second +decho on + +if { [regexp {Standard_ConstructionError:} $first] != 1 } { + puts "Faulty : not suitablle exception" +} else { + puts "Output is correct" +} + +if { [regexp {External} $second] != 1 } { + puts "Faulty : not suitablle exception" +} else { + puts "Output is correct" +} + + diff --git a/tests/bugs/moddata_3/buc60811 b/tests/bugs/moddata_3/buc60811 new file mode 100644 index 0000000000..ea558f1ef7 --- /dev/null +++ b/tests/bugs/moddata_3/buc60811 @@ -0,0 +1,19 @@ +puts "========================" +puts "BUC60811" +puts "========================" + +pload QAcommands + +vinit +decho off +set List [BUC60811] +decho on +if { [regexp "Error is 5" $List] != 1 } { + puts "Faulty: output is incorrect" +} else { + puts "OK: output is correct" +} + + + + diff --git a/tests/bugs/moddata_3/bug162 b/tests/bugs/moddata_3/bug162 new file mode 100644 index 0000000000..34815905ad --- /dev/null +++ b/tests/bugs/moddata_3/bug162 @@ -0,0 +1,21 @@ +puts "========" +puts "OCC162" +puts "========" + +pload QAcommands +pload XDE + +restore [locate_data_file OCC162.brep] s + +OCC162 s + +set i_max 5 +for {set i 1} {${i} <= ${i_max}} {incr i} { + OCC162 s + lappend listmem [expr [meminfo w] / 1024] + if { [checktrend $listmem 0 1 "Memory leak detected"] } { + puts "No memory leak, $i iterations" + break + } +} + diff --git a/tests/bugs/moddata_3/bug23023 b/tests/bugs/moddata_3/bug23023 new file mode 100644 index 0000000000..f8456b9f2c --- /dev/null +++ b/tests/bugs/moddata_3/bug23023 @@ -0,0 +1,29 @@ +puts "TODO ?OCC12345 ALL: An exception was caught" +puts "TODO ?OCC12345 ALL: \\*\\* Exception \\*\\*.*" +puts "TODO ?OCC12345 ALL: Faulty: VRML reader fails" +##puts "TODO ?OCC12345 ALL: TEST INCOMPLETE" + +puts "========================" +puts "OCC23023" +puts "========================" +puts "" +####################################################################### +# VRML reader fails on attempt to read an attached WRL file +####################################################################### + +set BugNumber OCC23023 +pload XDE + +set filepath [locate_data_file OCC23023-2056132060_2_tutnicht.wrl] +if [catch { set list [loadvrml result $filepath] } res] { + puts "Faulty: VRML reader fails" +} else { + puts "OK: VRML reader work properly" +} + + + + + + + diff --git a/tests/bugs/moddata_3/bug30 b/tests/bugs/moddata_3/bug30 new file mode 100644 index 0000000000..4487fbb41e --- /dev/null +++ b/tests/bugs/moddata_3/bug30 @@ -0,0 +1,18 @@ +puts "================" +puts "OCC30" +puts "================" +puts "" + +restore [locate_data_file OCC30.brep] a +puts [checkshape a] + +explode a e +explode a f +catch {chamf result a a_2 a_1 A 1 45} info +if { [regexp "No suitable edges to chamfer" $info] != 1 } { + puts "Error : Function chamfer works wrongly" +} else { + puts "OK: suitable message is given" +} + + diff --git a/tests/bugs/moddata_3/bug32 b/tests/bugs/moddata_3/bug32 new file mode 100644 index 0000000000..b4b8f02a39 --- /dev/null +++ b/tests/bugs/moddata_3/bug32 @@ -0,0 +1,37 @@ +puts "================" +puts "OCC32" +puts "================" +puts "" +####################################################### +## Standard_ConstructionError in Algo of the BRepFilletAPI_MakeChamfer +####################################################### + +restore [locate_data_file OCC31.brep] sh +checkshape sh + +explode sh f +explode sh_1 e + +if [catch {chamf res sh sh_6_1 sh_6 A 2 45 sh_6_8 sh_6 A 2 45} inf] { + if { [regexp "No suitable edges to chamfer" $inf] != 1 } { + puts "OK. Chamfer was not build. But suitable message was given" + } + renamevar res result +} else { + checkshape res + explode res f + explode res_1 e + #But before chamfer two edges (res_1_4, res_1_5) union should be to make one arc + catch {chamf result res res_1_4 res_1 5 5} info + + if { [regexp "No suitable edges to chamfer" $info] != 1 } { + puts "Warning. Chamfer was not build. But suitable message was given" + } else { + checkshape result + set square 10 + } +} +set 2dviewer 0 + + + diff --git a/tests/bugs/moddata_3/bug599 b/tests/bugs/moddata_3/bug599 new file mode 100644 index 0000000000..8f36827ddc --- /dev/null +++ b/tests/bugs/moddata_3/bug599 @@ -0,0 +1,20 @@ +puts "========================" +puts " OCC599" +puts "========================" +puts "" +######################################################### +## Result of BOPFUSE operation is unclosed shape inspite of source solids are valid +######################################################### + +restore [locate_data_file OCC600_1.brep] a +checkshape a +restore [locate_data_file OCC600_2.brep] b +checkshape b + +bop b a +bopfuse result + +set square 679784 +set 2dviewer 0 + + diff --git a/tests/bugs/moddata_3/bug623 b/tests/bugs/moddata_3/bug623 new file mode 100644 index 0000000000..dff6598c6c --- /dev/null +++ b/tests/bugs/moddata_3/bug623 @@ -0,0 +1,30 @@ +puts "================" +puts "OCC623" +puts "================" +puts "" +#################### +## InCorrect Data in PCurve +#################### + +##cpulimit 4000 + +pload XDE + +stepread [locate_data_file OCC623.step] a * + +dchrono h reset +dchrono h start +nurbsconvert result a_1 +dchrono h stop +set TimeList [dchrono h show] + +regexp {Elapsed time: +([-0-9.+eE]+)} $TimeList full ElapsedTime +puts "ElapsedTime = ${ElapsedTime}" + +fsameparameter result +checkshape result + +set square 32.1968 +set 2dviewer 0 + + diff --git a/tests/bugs/step/bug2845 b/tests/bugs/step/bug2845 new file mode 100644 index 0000000000..cb55ccfbc3 --- /dev/null +++ b/tests/bugs/step/bug2845 @@ -0,0 +1,24 @@ +puts "========" +puts "OCC2845" +puts "========" +puts "" +#################################################### +## Regression of work of selections for STEP translator. +#################################################### + +set BugNumber OCC2845 +set filepath [locate_data_file extref.stp] +if [catch { stepread $filepath a * } res] { + puts "Faulty ${BugNumber} : here is reading problem" +} else { + tpcompound result + set info [listtypes xst-transferrable-roots] + if {$info == ""} { + puts "Faulty ${BugNumber}" + } else { + puts "OK ${BugNumber}" + } +} + +set 2dviewer 0 + diff --git a/tests/bugs/vis/bug328 b/tests/bugs/vis/bug328 new file mode 100644 index 0000000000..3a235b9373 --- /dev/null +++ b/tests/bugs/vis/bug328 @@ -0,0 +1,34 @@ +puts "========" +puts "OCC328" +puts "========" + +vinit +set dx 10 +set dy 10 +set dz 10 + +set x1 30 +set y1 307 + +set x2 30 +set y2 107 + +box b ${dx} ${dy} ${dz} +vdisplay b +vfit + +vselmode 2 1 +set info [OCC328 b VERTEX] +if { [regexp "VERTEX" $info] != 1 } { + puts "Faulty: Incorrect selection mode" +} + +vselect ${x1} ${y1} +vselect ${x2} ${y2} 1 + +checkcolor ${x1} ${y1} 0.8 0.8 0.8 +checkcolor ${x2} ${y2} 0.8 0.8 0.8 +set only_screen 1 + + +