module Tests.Face where import Test.QuickCheck import Cube (Cube(grid)) import Face (tetrahedrons) import Grid (Grid(h)) import Tetrahedron (volume) -- QuickCheck Tests. prop_all_volumes_nonnegative :: Cube -> Property prop_all_volumes_nonnegative c = (delta > 0) ==> (null negative_volumes) where delta = h (grid c) ts = tetrahedrons c volumes = map volume ts negative_volumes = filter (< 0) volumes