]> gitweb.michael.orlitzky.com - spline3.git/blob - src/Tests/Face.hs
Rename the spline project to spline3.
[spline3.git] / src / Tests / Face.hs
1 module Tests.Face
2 where
3
4 import Test.QuickCheck
5
6 import Cube (Cube(grid))
7 import Face (tetrahedrons)
8 import Grid (Grid(h))
9 import Tetrahedron (volume)
10
11 -- QuickCheck Tests.
12 prop_all_volumes_nonnegative :: Cube -> Property
13 prop_all_volumes_nonnegative c =
14 (delta > 0) ==> (null negative_volumes)
15 where
16 delta = h (grid c)
17 ts = tetrahedrons c
18 volumes = map volume ts
19 negative_volumes = filter (< 0) volumes