X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2FTestSuite.hs;h=657994bee4e14e4f70d5dccd9a5fed5b6aa1fb19;hb=ddc513c5d9051c57796a49df8be6294a0d0da0da;hp=ea5eb5e5367bfc4ce3020b7e44dda0815cb488cb;hpb=fc12cb4f59a423af3520aa19f8d23ce9b963e3f1;p=spline3.git diff --git a/test/TestSuite.hs b/test/TestSuite.hs index ea5eb5e..657994b 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -2,12 +2,13 @@ import Test.HUnit import Test.QuickCheck import Tests.Cardinal -import Tests.Face as TF +import Tests.Cube as TC +import Tests.Grid import Tests.Misc import Tests.Tetrahedron as TT -- The list of HUnit tests. -test_suite = TestList (concat [face_tests, +test_suite = TestList (concat [grid_tests, misc_tests, tetrahedron_tests]) @@ -23,134 +24,184 @@ main = do maxDiscard = 500, maxSize = 100 } - -- putStr "prop_all_volumes_positive... " - -- quickCheckWith qc_args prop_all_volumes_positive - -- putStr "prop_factorial_greater... " - -- quickCheckWith qc_args prop_factorial_greater + putStrLn "\nGrid Tests\n" - -- putStr "prop_b0_v0_always_unity... " - -- quickCheckWith qc_args prop_b0_v0_always_unity + putStrLn "\nCube Tests\n" - -- putStr "prop_b0_v1_always_zero... " - -- quickCheckWith qc_args prop_b0_v1_always_zero + putStr "prop_all_volumes_positive... " + quickCheckWith qc_args prop_all_volumes_positive - -- putStr "prop_b0_v2_always_zero... " - -- quickCheckWith qc_args prop_b0_v2_always_zero + -- putStr "prop_tetrahedron0_volumes_exact... " + -- quickCheckWith qc_args prop_tetrahedron0_volumes_exact - -- putStr "prop_b0_v3_always_zero... " - -- quickCheckWith qc_args prop_b0_v3_always_zero + -- putStr "prop_tetrahedron1_volumes_exact... " + -- quickCheckWith qc_args prop_tetrahedron1_volumes_exact - -- putStr "prop_b1_v1_always_unity... " - -- quickCheckWith qc_args prop_b1_v1_always_unity + -- putStr "prop_tetrahedron2_volumes_exact... " + -- quickCheckWith qc_args prop_tetrahedron2_volumes_exact - -- putStr "prop_b1_v0_always_zero... " - -- quickCheckWith qc_args prop_b1_v0_always_zero + -- putStr "prop_tetrahedron3_volumes_exact... " + -- quickCheckWith qc_args prop_tetrahedron3_volumes_exact - -- putStr "prop_b1_v2_always_zero... " - -- quickCheckWith qc_args prop_b1_v2_always_zero + -- putStr "prop_tetrahedron4_volumes_exact... " + -- quickCheckWith qc_args prop_tetrahedron4_volumes_exact - -- putStr "prop_b1_v3_always_zero... " - -- quickCheckWith qc_args prop_b1_v3_always_zero + -- putStr "prop_tetrahedron4_volumes_exact... " + -- quickCheckWith qc_args prop_tetrahedron4_volumes_exact - -- putStr "prop_b2_v2_always_unity... " - -- quickCheckWith qc_args prop_b2_v2_always_unity + -- putStr "prop_tetrahedron5_volumes_exact... " + -- quickCheckWith qc_args prop_tetrahedron5_volumes_exact - -- putStr "prop_b2_v0_always_zero... " - -- quickCheckWith qc_args prop_b2_v0_always_zero + -- putStr "prop_tetrahedron6_volumes_exact... " + -- quickCheckWith qc_args prop_tetrahedron6_volumes_exact - -- putStr "prop_b2_v1_always_zero... " - -- quickCheckWith qc_args prop_b2_v1_always_zero + -- putStr "prop_tetrahedron7_volumes_exact... " + -- quickCheckWith qc_args prop_tetrahedron7_volumes_exact - -- putStr "prop_b2_v3_always_zero... " - -- quickCheckWith qc_args prop_b2_v3_always_zero + putStr "prop_tetrahedron0_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron0_volumes_positive - -- putStr "prop_b3_v3_always_unity... " - -- quickCheckWith qc_args prop_b3_v3_always_unity + putStr "prop_tetrahedron1_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron1_volumes_positive - -- putStr "prop_b3_v0_always_zero... " - -- quickCheckWith qc_args prop_b3_v0_always_zero + putStr "prop_tetrahedron2_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron2_volumes_positive - -- putStr "prop_b3_v1_always_zero... " - -- quickCheckWith qc_args prop_b3_v1_always_zero + putStr "prop_tetrahedron3_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron3_volumes_positive - -- putStr "prop_b3_v2_always_zero... " - -- quickCheckWith qc_args prop_b3_v2_always_zero + putStr "prop_tetrahedron4_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron4_volumes_positive - -- putStrLn "\np. 78, (2.4)\n" + putStr "prop_tetrahedron5_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron5_volumes_positive - -- putStr "prop_c3000_identity... " - -- quickCheckWith qc_args TT.prop_c3000_identity + putStr "prop_tetrahedron6_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron6_volumes_positive - -- putStr "prop_c2100_identity... " - -- quickCheckWith qc_args TT.prop_c2100_identity + putStr "prop_tetrahedron7_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron7_volumes_positive - -- putStr "prop_c1110_identity... " - -- quickCheckWith qc_args TT.prop_c1110_identity + putStr "prop_tetrahedron8_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron8_volumes_positive + + putStr "prop_tetrahedron9_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron9_volumes_positive + + putStr "prop_tetrahedron10_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron10_volumes_positive + + putStr "prop_tetrahedron11_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron11_volumes_positive + + putStr "prop_tetrahedron12_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron12_volumes_positive + + putStr "prop_tetrahedron13_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron13_volumes_positive + + putStr "prop_tetrahedron14_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron14_volumes_positive + + putStr "prop_tetrahedron15_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron15_volumes_positive + + putStr "prop_tetrahedron16_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron16_volumes_positive + + putStr "prop_tetrahedron17_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron17_volumes_positive + + putStr "prop_tetrahedron18_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron18_volumes_positive + + putStr "prop_tetrahedron19_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron19_volumes_positive + + putStr "prop_tetrahedron20_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron20_volumes_positive + + putStr "prop_tetrahedron21_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron21_volumes_positive + + putStr "prop_tetrahedron22_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron22_volumes_positive + + putStr "prop_tetrahedron23_volumes_positive... " + quickCheckWith qc_args prop_tetrahedron23_volumes_positive + + putStr "prop_v0_all_equal... " + quickCheckWith qc_args prop_v0_all_equal -- 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... " - -- quickCheckWith qc_args TF.prop_c0120_identity1 + putStr "prop_c0120_identity1... " + quickCheckWith qc_args TC.prop_c0120_identity1 - -- putStr "prop_c0210_identity1... " - -- quickCheckWith qc_args TF.prop_c0210_identity1 + putStr "prop_c0210_identity1... " + quickCheckWith qc_args TC.prop_c0210_identity1 - -- putStr "prop_c0300_identity1... " - -- quickCheckWith qc_args TF.prop_c0300_identity1 + putStr "prop_c0300_identity1... " + quickCheckWith qc_args TC.prop_c0300_identity1 - -- putStr "prop_c1110_identity... " - -- quickCheckWith qc_args TF.prop_c1110_identity + putStr "prop_c1110_identity... " + quickCheckWith qc_args TC.prop_c1110_identity - -- putStr "prop_c1200_identity1... " - -- quickCheckWith qc_args prop_c1200_identity1 + putStr "prop_c1200_identity1... " + quickCheckWith qc_args TC.prop_c1200_identity1 - -- putStr "prop_c2100_identity1... " - -- quickCheckWith qc_args TF.prop_c2100_identity1 + putStr "prop_c2100_identity1... " + quickCheckWith qc_args TC.prop_c2100_identity1 - -- putStrLn "\np. 79, (2.7)\n" + putStrLn "\np. 79, (2.7)\n" - -- putStr "prop_c0102_identity1... " - -- quickCheckWith qc_args TF.prop_c0102_identity1 + putStr "prop_c0102_identity1... " + quickCheckWith qc_args TC.prop_c0102_identity1 - -- putStr "prop_c0201_identity1... " - -- quickCheckWith qc_args TF.prop_c0201_identity1 + putStr "prop_c0201_identity1... " + quickCheckWith qc_args TC.prop_c0201_identity1 - -- putStr "prop_c0300_identity2... " - -- quickCheckWith qc_args TF.prop_c0300_identity2 + putStr "prop_c0300_identity2... " + quickCheckWith qc_args TC.prop_c0300_identity2 - -- putStr "prop_c1101_identity... " - -- quickCheckWith qc_args TF.prop_c1101_identity + putStr "prop_c1101_identity... " + quickCheckWith qc_args TC.prop_c1101_identity - -- putStr "prop_c1200_identity2... " - -- quickCheckWith qc_args TF.prop_c1200_identity2 + putStr "prop_c1200_identity2... " + quickCheckWith qc_args TC.prop_c1200_identity2 - -- putStr "prop_c2100_identity2... " - -- quickCheckWith qc_args TF.prop_c2100_identity2 + putStr "prop_c2100_identity2... " + quickCheckWith qc_args TC.prop_c2100_identity2 - -- putStrLn "\np. 79, (2.8)\n" + putStrLn "\np. 79, (2.8)\n" - -- putStr "prop_c3000_identity... " - -- quickCheckWith qc_args TF.prop_c3000_identity + putStr "prop_t0_shares_edge_with_t6... " + quickCheckWith qc_args prop_t0_shares_edge_with_t6 + + putStr "prop_c3000_identity... " + quickCheckWith qc_args TC.prop_c3000_identity -- putStr "prop_c2010_identity... " - -- quickCheckWith qc_args TF.prop_c2010_identity + -- quickCheckWith qc_args TC.prop_c2010_identity -- putStr "prop_c2001_identity... " - -- quickCheckWith qc_args TF.prop_c2001_identity + -- quickCheckWith qc_args TC.prop_c2001_identity -- putStr "prop_c1020_identity... " - -- quickCheckWith qc_args TF.prop_c1020_identity + -- quickCheckWith qc_args TC.prop_c1020_identity -- putStr "prop_c1002_identity... " - -- quickCheckWith qc_args TF.prop_c1002_identity + -- quickCheckWith qc_args TC.prop_c1002_identity -- putStr "prop_c1011_identity... " - -- quickCheckWith qc_args TF.prop_c1011_identity + -- quickCheckWith qc_args TC.prop_c1011_identity -- putStrLn "\np. 80, (2.9)\n" @@ -172,10 +223,128 @@ main = do -- putStr "prop_c0300_identity3... " -- quickCheckWith qc_args TF.prop_c0300_identity3 + + putStrLn "\nMisc Tests\n" + + putStr "prop_factorial_greater... " + quickCheckWith qc_args prop_factorial_greater + + putStrLn "\nTetrahedron Tests\n" + + putStr "prop_b0_v0_always_unity... " + quickCheckWith qc_args prop_b0_v0_always_unity + + putStr "prop_b0_v1_always_zero... " + quickCheckWith qc_args prop_b0_v1_always_zero + + putStr "prop_b0_v2_always_zero... " + quickCheckWith qc_args prop_b0_v2_always_zero + + putStr "prop_b0_v3_always_zero... " + quickCheckWith qc_args prop_b0_v3_always_zero + + putStr "prop_b1_v1_always_unity... " + quickCheckWith qc_args prop_b1_v1_always_unity + + putStr "prop_b1_v0_always_zero... " + quickCheckWith qc_args prop_b1_v0_always_zero + + putStr "prop_b1_v2_always_zero... " + quickCheckWith qc_args prop_b1_v2_always_zero + + putStr "prop_b1_v3_always_zero... " + quickCheckWith qc_args prop_b1_v3_always_zero + + putStr "prop_b2_v2_always_unity... " + quickCheckWith qc_args prop_b2_v2_always_unity + + putStr "prop_b2_v0_always_zero... " + quickCheckWith qc_args prop_b2_v0_always_zero + + putStr "prop_b2_v1_always_zero... " + quickCheckWith qc_args prop_b2_v1_always_zero + + putStr "prop_b2_v3_always_zero... " + quickCheckWith qc_args prop_b2_v3_always_zero + + putStr "prop_b3_v3_always_unity... " + quickCheckWith qc_args prop_b3_v3_always_unity + + putStr "prop_b3_v0_always_zero... " + quickCheckWith qc_args prop_b3_v0_always_zero + + putStr "prop_b3_v1_always_zero... " + quickCheckWith qc_args prop_b3_v1_always_zero + + 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 + + putStr "prop_c2100_identity... " + quickCheckWith qc_args TT.prop_c2100_identity + + putStr "prop_c1110_identity... " + quickCheckWith qc_args TT.prop_c1110_identity + + + putStrLn "\nCardinal Tests\n" + putStr "prop_ccwx_rotation_changes_direction... " quickCheckWith qc_args prop_ccwx_rotation_changes_direction putStr "prop_cwx_rotation_changes_direction... " quickCheckWith qc_args prop_cwx_rotation_changes_direction + putStr "prop_ccwy_rotation_changes_direction... " + quickCheckWith qc_args prop_ccwy_rotation_changes_direction + + putStr "prop_cwy_rotation_changes_direction... " + quickCheckWith qc_args prop_cwy_rotation_changes_direction + + putStr "prop_ccwz_rotation_changes_direction... " + quickCheckWith qc_args prop_ccwz_rotation_changes_direction + + putStr "prop_cwz_rotation_changes_direction... " + quickCheckWith qc_args prop_cwz_rotation_changes_direction + + putStr "prop_ccwx_rotation_result_unique... " + quickCheckWith qc_args prop_ccwx_rotation_result_unique + + putStr "prop_cwx_rotation_result_unique... " + quickCheckWith qc_args prop_cwx_rotation_result_unique + + putStr "prop_ccwy_rotation_result_unique... " + quickCheckWith qc_args prop_ccwy_rotation_result_unique + + putStr "prop_cwy_rotation_result_unique... " + quickCheckWith qc_args prop_cwy_rotation_result_unique + + putStr "prop_ccwz_rotation_result_unique... " + quickCheckWith qc_args prop_ccwz_rotation_result_unique + + putStr "prop_cwz_rotation_result_unique... " + quickCheckWith qc_args prop_cwz_rotation_result_unique + + putStr "prop_four_cwx_is_identity... " + quickCheckWith qc_args prop_four_cwx_is_identity + + putStr "prop_four_ccwx_is_identity... " + quickCheckWith qc_args prop_four_ccwx_is_identity + + putStr "prop_four_cwy_is_identity... " + quickCheckWith qc_args prop_four_cwy_is_identity + + putStr "prop_four_ccwy_is_identity... " + quickCheckWith qc_args prop_four_ccwy_is_identity + + putStr "prop_four_cwz_is_identity... " + quickCheckWith qc_args prop_four_cwz_is_identity + + putStr "prop_four_ccwz_is_identity... " + quickCheckWith qc_args prop_four_ccwz_is_identity + return ()