1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
occt/tests/bugs/vis/bug319
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

55 lines
1.3 KiB
Plaintext
Executable File

puts "========"
puts "OCC319"
puts "========"
puts ""
######################################################
# Wrong shading on a shape
######################################################
cpulimit 3500
restore [locate_data_file OCC319.brep] result
tclean result
vinit
vdisplay result
vsetdispmode result 1
vfit
set scale 16.5593321780929
set proj_X 0.207536488771439
set proj_Y -0.233648166060448
set proj_Z 0.949914216995239
set up_X -0.857990384101868
set up_Y 0.422952175140381
set up_Z 0.291485607624054
set at_X -1.78904829452738
set at_Y 1.90614280957802
set at_Z 6.47028180612483
vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z}
set info [trinfo result]
regexp { +([-0-9.+eE]+) +triangles} $info full tri
regexp { +([-0-9.+eE]+) +nodes} $info full nod
if { $tri == 0 || $nod == 0 } {
puts "Faulty OCC319: here is shading problem"
}
regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full sq
set good_square 8623.6
set square_percent [expr abs(${sq} - ${good_square}) / double(${good_square}) * 100.]
set percent_max 0.1
puts "good_square = ${good_square}"
puts "square = ${sq}"
puts "square_percent = ${square_percent}"
if {${square_percent} > ${percent_max}} {
puts "OCC319 Faulty : here is square problem"
}
set only_screen 1