File: end

package info (click to toggle)
oce 0.15-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 302,472 kB
  • ctags: 210,903
  • sloc: cpp: 1,165,052; ansic: 75,256; sh: 11,901; tcl: 4,488; python: 2,867; makefile: 337; perl: 37; csh: 12
file content (45 lines) | stat: -rwxr-xr-x 1,299 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
if { [isdraw result] } {
   regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m

   #check if result is valid
   set ch [checkshape result]
   puts $ch
   if { $m == 0 } {
       puts "Error : The skin is not valid. The area is 0."
   }

   if { $square > 0 } {
      puts "The expected area is $square"
   }
   #check of change of square is < 1%
   if { ($square != 0 && [expr 1.*abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } {
      puts "Error : The area of the resulting shape is $m"
   }
   if { [string compare $ch "This shape seems to be valid"] == 0 } {
      #check if tolerance is less 1.
      set tol 10.
      if { [regexp {Face +:.+Max +([-0-9.+eE]+)} [maxtolerance result] full tol]  == 0 } {
         #Avoiding maxtolerance bug on Windows
         if { [array get Draw_Groups "Shape Healing"] == "" } {
            pload XSDRAW
         }
         regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full tol
      }
      if { $tol > 1. } {
         puts "Error: The tolerance of the resulting shape is too big ($tol)."
      }
   }

   if { $m > 0 } {
      clear
      smallview
      donly result
      fit
      xwd $imagedir/${test_image}.png
   }
} else {
   puts "Error : The skin cannot be built."
}

# to end a test script
puts "TEST COMPLETED"