From: Michael Orlitzky Date: Sun, 1 May 2011 01:35:44 +0000 (-0400) Subject: Add a test for p. 78, (2.5). X-Git-Tag: 0.0.1~355 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=57c28cdd36989e49e59f556a5d7569768ea5ebb3;p=spline3.git Add a test for p. 78, (2.5). --- diff --git a/src/Tests/Face.hs b/src/Tests/Face.hs index f9de1e7..2de6060 100644 --- a/src/Tests/Face.hs +++ b/src/Tests/Face.hs @@ -31,6 +31,22 @@ prop_all_volumes_positive c = nonpositive_volumes = filter (<= 0) volumes +-- | Given in Sorokina and Zeilfelder, p. 78. +prop_cijk1_identity :: Cube -> Bool +prop_cijk1_identity cube = + and [ c t0' i j k 1 ~= (c t1' (i+1) j k 0) * ((b0 t0') (v3 t1')) + + (c t1' i (j+1) k 0) * ((b1 t0') (v3 t1')) + + (c t1' i j (k+1) 0) * ((b2 t0') (v3 t1')) + + (c t1' i j k 1) * ((b3 t0') (v3 t1')) | i <- [0..2], + j <- [0..2], + k <- [0..2], + i + j + k == 2] + where + t0 = tetrahedron0 (face0 cube) + t1 = tetrahedron1 (face0 cube) + t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0) + t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1) + -- | Given in Sorokina and Zeilfelder, p. 79. prop_c0120_identity1 :: Cube -> Bool prop_c0120_identity1 cube = diff --git a/test/TestSuite.hs b/test/TestSuite.hs index cd39f57..8402f16 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -75,6 +75,8 @@ main = do putStr "prop_b3_v2_always_zero... " quickCheckWith qc_args prop_b3_v2_always_zero + putStrLn "\np. 78, (2.4)\n" + putStr "prop_c3000_identity... " quickCheckWith qc_args TT.prop_c3000_identity @@ -84,6 +86,10 @@ main = do putStr "prop_c1110_identity... " quickCheckWith qc_args TT.prop_c1110_identity + putStrLn "\np. 78, (2.5)\n" + + putStr "prop_cijk1_identity... " + quickCheckWith qc_args prop_cijk1_identity putStrLn "\np. 79, (2.6)\n" putStr "prop_c0120_identity1... "