1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-08 18:40:55 +03:00
abv 6d3685029f 0026622: Tests - Avoid using dlog and decho commands in test scripts
Added possibility to define patterns that must be present in the test log, so that test is considered OK only if all these patterns are found.
New REQUIRED statement is introduced for that, documented in dox/dev_guides/tests/tests.md.

Removed all uses of decho and dlog commands, added REQUIRED where necessary.
Command xdistcs is modified to output to Tcl instead of cout, and extended to report errors and warnings if distances are greater than tolerance (directly, instead of complex post-processing on Tcl level).

DEBUG mode for TODOs was removed (we should have no deviations in Debug mode).

Corrected indentation in DrawResources/TestCommands.tcl

HTML log will now highlight TODO statement causing IMPROVEMENT status, or REQUIRED statement causing FAIL, by corresponding color.
2015-10-15 11:43:54 +03:00

42 lines
1.2 KiB
Plaintext
Executable File

puts "TODO OCC12345 ALL: Faulty OCC592 : Checkshape BRepCheck_Analyzer does not detect faulty shape"
puts "========================"
puts " OCC592 "
puts "========================"
puts ""
###################################
##BRepCheck_Analyzer does not detect faulty shape
#####################################
restore [locate_data_file OCC592.brep] ff114
explode ff114 e
mkcurve cc ff114_8
cvalue cc 0.95 x y z
vertex vv x y z
mksurface gs ff114
mkface ff gs
donl ff114 vv
trim trcc cc
set aa [distmini dd vv ff]
puts "******* Result *******"
regexp {([-0-9.+eE]+)$} [dump dd_val] full dis1
puts "distance between the point on curve and the surface is $dis1"
set tolerance [maxtolerance ff114_8]
regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance
puts "the tolerance of the edge is $MaxEdgeTolerance"
puts "the tolerance is less than distance between point and surface"
puts "BUT"
set che [checkshape ff114]
if { [regexp {Faulty} $che] != 1 } {
puts "Faulty OCC592 : Checkshape BRepCheck_Analyzer does not detect faulty shape"
} else {
puts "OCC592 OK: Checkshape (BRepCheck_Analyzer) detects bad shape"
}
set 2dviewer 0