import Cardinal (cardinal_tests, cardinal_properties)
import FunctionValues (function_values_tests, function_values_properties)
+import Grid (grid_tests, slow_tests)
import Misc (misc_tests, misc_properties)
import Tests.Cube as TC
-import Tests.Grid
-import Tests.Tetrahedron as TT
+import Tetrahedron (tetrahedron_tests, tetrahedron_properties)
main :: IO ()
main = do
tc = testCase
-
-grid_tests :: Test.Framework.Test
-grid_tests =
- testGroup "Grid Tests" [
- trilinear_c0_t0_tests,
- tc "tetrahedra collision test isn't too sensitive"
- test_tetrahedra_collision_sensitivity,
- tc "trilinear reproduced" test_trilinear_reproduced,
- tc "zeros reproduced" test_zeros_reproduced ]
-
-
-tetrahedron_tests :: Test.Framework.Test
-tetrahedron_tests =
- testGroup "Tetrahedron Tests" [
- tetrahedron1_geometry_tests,
- tetrahedron2_geometry_tests,
- containment_tests ]
-
-- | Defined so that my test names fit on one line.
tp :: Test.QuickCheck.Testable a => Test.Framework.TestName -> a -> Test.Framework.Test
tp = testProperty
-p78_24_properties :: Test.Framework.Test
-p78_24_properties =
- testGroup "p. 78, Section (2.4) Properties" [
- tp "c3000 identity" TT.prop_c3000_identity,
- tp "c2100 identity" TT.prop_c2100_identity,
- tp "c1110 identity" TT.prop_c1110_identity]
p78_25_properties :: Test.Framework.Test
p78_25_properties =
cube_properties :: Test.Framework.Test
cube_properties =
testGroup "Cube Properties" [
- tp "front/back tetrahedra are disjoint" prop_front_back_tetrahedra_disjoint,
- tp "top/down tetrahedra are disjoint" prop_top_down_tetrahedra_disjoint,
- tp "left/right tetrahedra are disjoint" prop_left_right_tetrahedra_disjoint,
+ tp "opposite octant tetrahedra are disjoint (1)"
+ prop_opposite_octant_tetrahedra_disjoint1,
+ tp "opposite octant tetrahedra are disjoint (2)"
+ prop_opposite_octant_tetrahedra_disjoint2,
+ tp "opposite octant tetrahedra are disjoint (3)"
+ prop_opposite_octant_tetrahedra_disjoint3,
+ tp "opposite octant tetrahedra are disjoint (4)"
+ prop_opposite_octant_tetrahedra_disjoint4,
+ tp "opposite octant tetrahedra are disjoint (5)"
+ prop_opposite_octant_tetrahedra_disjoint5,
+ tp "opposite octant tetrahedra are disjoint (6)"
+ prop_opposite_octant_tetrahedra_disjoint6,
tp "all volumes positive" prop_all_volumes_positive,
tp "all volumes exact" prop_all_volumes_exact,
tp "v0 all equal" prop_v0_all_equal,
tp "c-tilde_2100 correct" prop_c_tilde_2100_correct ]
-tetrahedron_properties :: Test.Framework.Test
-tetrahedron_properties =
- testGroup "Tetrahedron Properties" [
- tp "b0_v0_always_unity" prop_b0_v0_always_unity,
- tp "b0_v1_always_zero" prop_b0_v1_always_zero,
- tp "b0_v2_always_zero" prop_b0_v2_always_zero,
- tp "b0_v3_always_zero" prop_b0_v3_always_zero,
- tp "b1_v1_always_unity" prop_b1_v1_always_unity,
- tp "b1_v0_always_zero" prop_b1_v0_always_zero,
- tp "b1_v2_always_zero" prop_b1_v2_always_zero,
- tp "b1_v3_always_zero" prop_b1_v3_always_zero,
- tp "b2_v2_always_unity" prop_b2_v2_always_unity,
- tp "b2_v0_always_zero" prop_b2_v0_always_zero,
- tp "b2_v1_always_zero" prop_b2_v1_always_zero,
- tp "b2_v3_always_zero" prop_b2_v3_always_zero,
- tp "b3_v3_always_unity" prop_b3_v3_always_unity,
- tp "b3_v0_always_zero" prop_b3_v0_always_zero,
- tp "b3_v1_always_zero" prop_b3_v1_always_zero,
- tp "b3_v2_always_zero" prop_b3_v2_always_zero,
- tp "swapping_vertices_doesnt_affect_coefficients1"
- $ prop_swapping_vertices_doesnt_affect_coefficients1,
- tp "swapping_vertices_doesnt_affect_coefficients2"
- $ prop_swapping_vertices_doesnt_affect_coefficients2,
- tp "swapping_vertices_doesnt_affect_coefficients3"
- $ prop_swapping_vertices_doesnt_affect_coefficients3,
- tp "swapping_vertices_doesnt_affect_coefficients4"
- $ prop_swapping_vertices_doesnt_affect_coefficients4 ]
-
-
--- Do the slow tests last so we can stop paying attention.
-slow_tests :: Test.Framework.Test
-slow_tests =
- testGroup "Slow Tests" [
- tp "cube indices within bounds" prop_cube_indices_never_go_out_of_bounds,
- tc "trilinear9x9x9 reproduced" test_trilinear9x9x9_reproduced ]
-
-
tests :: [Test.Framework.Test]
tests = [ cardinal_tests,
function_values_tests,
misc_properties,
cardinal_properties,
edge_incidence_tests,
- p78_24_properties,
-- p78_25_properties,
p79_26_properties,
p79_27_properties,