From 49c093ae1c65d8d6d0029c202f79f509e20f6515 Mon Sep 17 00:00:00 2001 From: ski Date: Mon, 20 Aug 2012 13:33:29 +0400 Subject: [PATCH] 0023371: Expression which check of change of square/volume/length in end files doesn't work properly Modified END files Corrected tests cases due to modification of END files --- tests/blend/end | 4 ++-- tests/blend/tolblend_buildvol/A3 | 2 +- tests/blend/tolblend_buildvol/A7 | 2 +- tests/boolean/bfuse_complex/P8 | 2 +- tests/boolean/bopfuse_simple/ZP6 | 10 ++++++++++ tests/boolean/end | 2 +- tests/draft/angle/F9 | 2 +- tests/draft/angle/L4 | 1 + tests/draft/end | 4 ++-- tests/feat/end | 4 ++-- tests/feat/featprism/C4 | 2 +- tests/mkface/end | 6 +++--- tests/nproject/end | 2 +- tests/offset/end | 4 ++-- tests/pipe/end | 2 +- tests/thrusection/end | 2 +- 16 files changed, 31 insertions(+), 20 deletions(-) diff --git a/tests/blend/end b/tests/blend/end index 6413e60c11..16eadc7148 100644 --- a/tests/blend/end +++ b/tests/blend/end @@ -15,8 +15,8 @@ if { [isdraw result] } { puts "The expected square is $square" } #check of change of square is < 1% - if { ($square != 0 && [expr abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { - puts "Error : The square of reult shape is $m" + if { ($square != 0 && [expr 1.*abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { + puts "Error : The square of result shape is $m" } if { $m > 0 } { clear diff --git a/tests/blend/tolblend_buildvol/A3 b/tests/blend/tolblend_buildvol/A3 index 959cc67599..205d643b23 100644 --- a/tests/blend/tolblend_buildvol/A3 +++ b/tests/blend/tolblend_buildvol/A3 @@ -1,4 +1,4 @@ -puts "TODO OCC22817 Mandriva2010: Error : The square of reult shape is" +puts "TODO OCC22817 Mandriva2010: Error : The square of result shape is" ######################### # bug sewing # diff --git a/tests/blend/tolblend_buildvol/A7 b/tests/blend/tolblend_buildvol/A7 index 39feb2b8c1..d86ebcb044 100644 --- a/tests/blend/tolblend_buildvol/A7 +++ b/tests/blend/tolblend_buildvol/A7 @@ -1,4 +1,4 @@ -puts "TODO OCC22817 Mandriva2010: Error : The square of reult shape is" +puts "TODO OCC22817 Mandriva2010: Error : The square of result shape is" ######################### # bug sewing # diff --git a/tests/boolean/bfuse_complex/P8 b/tests/boolean/bfuse_complex/P8 index a8f130efb1..10c15c363b 100644 --- a/tests/boolean/bfuse_complex/P8 +++ b/tests/boolean/bfuse_complex/P8 @@ -1,6 +1,6 @@ ## cts21139 puts "TODO #22911 ALL: Faulty shapes in variables faulty_1 to faulty_" - +puts "TODO OCC22911 ALL: Error : The square of result shape is" restore [locate_data_file shape.brep] a restore [locate_data_file tool_1.brep] b diff --git a/tests/boolean/bopfuse_simple/ZP6 b/tests/boolean/bopfuse_simple/ZP6 index 691679600b..603c5ac511 100644 --- a/tests/boolean/bopfuse_simple/ZP6 +++ b/tests/boolean/bopfuse_simple/ZP6 @@ -14,6 +14,16 @@ if {[string compare $os "Debian50-64"] != 0 && [string compare $os "Debian60-64" puts "TODO ${inst}#22911 ${os}: Faulty shapes in variables faulty_1 to faulty_" } +if { [string compare $os "CentOS55-64"] == 0 + || [string compare $os "Debian40"] == 0 + || [string compare $os "Debian40-64"] == 0 + || [string compare $os "Mandriva2008"] == 0 + || [string compare $os "Mandriva2008-64"] == 0 + || [string compare $os "SL51-64"] == 0 +} { + puts "TODO OCC22911 $os: Error : The square of result shape is" +} + ptorus a0 100 20 tcopy a0 a1 tcopy a0 a2 diff --git a/tests/boolean/end b/tests/boolean/end index 225d07d6cf..0ff1bc857a 100755 --- a/tests/boolean/end +++ b/tests/boolean/end @@ -28,7 +28,7 @@ if { [isdraw result] } { puts "The expected $prop is $mass" } #check of change of square is < 1% - if { ($mass != 0 && [expr abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } { + if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } { puts "Error : The $prop of result shape is $m" } diff --git a/tests/draft/angle/F9 b/tests/draft/angle/F9 index c228188269..a5e2b39c05 100644 --- a/tests/draft/angle/F9 +++ b/tests/draft/angle/F9 @@ -1,6 +1,6 @@ #E3---------------------------------------------- puts "TODO OCC22803 All:Faulty shapes in variables faulty_1 to faulty_2" -puts "TODO OCC22803 All:Error : The square of reult shape is" +puts "TODO OCC22803 All:Error : The square of result shape is" ptorus pt 25 24 90 plane p 20 20 10 0 0 1 diff --git a/tests/draft/angle/L4 b/tests/draft/angle/L4 index 515a3a5074..c44119771a 100644 --- a/tests/draft/angle/L4 +++ b/tests/draft/angle/L4 @@ -2,6 +2,7 @@ # Date : 23 Nov 98 puts "TODO OCC22803 All:Faulty shapes in variables faulty_1 to faulty_2" +puts "TODO ?OCC22803 ALL: Error : The square of result shape is" restore [locate_data_file cts20194_base.brep] base diff --git a/tests/draft/end b/tests/draft/end index 37b8817bda..2289e936af 100755 --- a/tests/draft/end +++ b/tests/draft/end @@ -12,8 +12,8 @@ if { [isdraw result] } { puts "The expected square is $square" } #check of change of square is < 1% - if { ($square != 0 && [expr abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { - puts "Error : The square of reult shape is $m" + if { ($square != 0 && [expr 1.*abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { + puts "Error : The square of result shape is $m" } if { [string compare $ch "This shape seems to be valid"] == 0 } { #check if tolerance is less 1. diff --git a/tests/feat/end b/tests/feat/end index 56f360740a..683fcadaa5 100755 --- a/tests/feat/end +++ b/tests/feat/end @@ -16,8 +16,8 @@ if { [isdraw result] } { puts "The expected square is $square" } #check of change of square is < 1% - if { ($square != 0 && [expr abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { - puts "Error : The square of reult shape is $m" + if { ($square != 0 && [expr 1.*abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { + puts "Error : The square of result shape is $m" } if { $m > 0 } { clear diff --git a/tests/feat/featprism/C4 b/tests/feat/featprism/C4 index 999edc18d5..0b500a78ce 100644 --- a/tests/feat/featprism/C4 +++ b/tests/feat/featprism/C4 @@ -6,7 +6,7 @@ nexplode cyl F puts "*" #puts "TODO OCC22810 All:Faulty .*" puts "TODO OCC22810 ALL:Faulty shapes in variables faulty_1 to faulty_3" -puts "TODO OCC22810 ALL:Error : The square of reult shape is" +puts "TODO OCC22810 ALL:Error : The square of result shape is" ttranslate cont 0 0 -100 # diff --git a/tests/mkface/end b/tests/mkface/end index 0406ba0e6c..1b9c6637aa 100755 --- a/tests/mkface/end +++ b/tests/mkface/end @@ -11,7 +11,7 @@ if { [isdraw result] } { regexp { *VERTEX +: +MAX=([-0-9.+eE]+)} $tolerance full maxv if { [info exists MaxFTol ] } { - if { $MaxFTol != 0 && $maxf > $MaxFTol && [expr abs($MaxFTol - $maxf)/$MaxFTol] > 0.01 } { + if { $MaxFTol != 0 && $maxf > $MaxFTol && [expr 1.*abs($MaxFTol - $maxf)/$MaxFTol] > 0.01 } { puts "Error : Result shape is WRONG. MAX tolerance of FACE should be equal $MaxFTol instead of $maxf" } elseif { $MaxFTol == 0 && $maxf != 0 } { puts "Error : Result shape is WRONG." @@ -21,7 +21,7 @@ if { [isdraw result] } { } if { [info exists MaxETol ] } { - if { $MaxETol != 0 && $maxe > $MaxETol && [expr abs($MaxETol - $maxe)/$MaxETol] > 0.01 } { + if { $MaxETol != 0 && $maxe > $MaxETol && [expr 1.*abs($MaxETol - $maxe)/$MaxETol] > 0.01 } { puts "Error : Result shape is WRONG. MAX tolerance of EDGE should be equal $MaxETol instead of $maxe" } elseif { $MaxETol == 0 && $maxe != 0 } { puts "Error : Result shape is WRONG." @@ -31,7 +31,7 @@ if { [isdraw result] } { } if { [info exists MaxVTol ] } { - if { $MaxVTol != 0 && $maxv > $MaxVTol && [expr abs($MaxVTol - $maxv)/$MaxVTol] > 0.01 } { + if { $MaxVTol != 0 && $maxv > $MaxVTol && [expr 1.*abs($MaxVTol - $maxv)/$MaxVTol] > 0.01 } { puts "Error : Result shape is WRONG. MAX tolerance of VERTEX should be equal $MaxVTol instead of $maxv" } elseif { $MaxVTol == 0 && $maxv != 0 } { puts "Error : Result shape is WRONG." diff --git a/tests/nproject/end b/tests/nproject/end index d679d0a8e5..092dc38a2f 100755 --- a/tests/nproject/end +++ b/tests/nproject/end @@ -16,7 +16,7 @@ if { [isdraw result] } { puts "The expected $prop is $mass" } #check of change of length is < 1% - if { ($mass != 0 && [expr abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } { + if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } { puts "Error : The $prop of result shape is $m" } } else { diff --git a/tests/offset/end b/tests/offset/end index e954c548fa..476f2f18be 100644 --- a/tests/offset/end +++ b/tests/offset/end @@ -64,7 +64,7 @@ if { [isdraw result] && $mist == 0} { if { [string compare $length "empty"] != 0 } { puts "The expected length is $length" #check of change of length is < 1% - if { ($length != 0 && [expr abs($length - $m)/$length] > 0.01) || ($length == 0 && $m != 0) } { + if { ($length != 0 && [expr 1.*abs($length - $m)/$length] > 0.01) || ($length == 0 && $m != 0) } { puts "Error : The length of result shape is $m" } } else { @@ -128,7 +128,7 @@ if { [isdraw result] && $mist == 0} { puts "The expected volume is $volume" } #check of change of volume is < 1% - if { ($volume > 0 && [expr abs($volume - $m)/$volume] > 0.01) || ($volume == 0 && $m != 0 && $sm != $m) } { + if { ($volume > 0 && [expr 1.*abs($volume - $m)/$volume] > 0.01) || ($volume == 0 && $m != 0 && $sm != $m) } { puts "Error : The volume of result shape is $m" } } diff --git a/tests/pipe/end b/tests/pipe/end index 93e650b891..6695c566ae 100644 --- a/tests/pipe/end +++ b/tests/pipe/end @@ -11,7 +11,7 @@ if { [isdraw result] } { puts "The expected square is $square" } #check of change of square is < 1% - if { ($square != 0 && [expr abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { + if { ($square != 0 && [expr 1.*abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { puts "Error : The square of result shape is $m" } if { $m > 0 } { diff --git a/tests/thrusection/end b/tests/thrusection/end index b2369025f5..143e18c50c 100755 --- a/tests/thrusection/end +++ b/tests/thrusection/end @@ -15,7 +15,7 @@ if { [isdraw result] } { puts "The expected $prop is $mass" } #check of change of square is < 1% - if { ($mass != 0 && [expr abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } { + if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } { puts "Error : The $prop of result shape is $m" } } else { -- 2.20.1