]> gitweb.michael.orlitzky.com - spline3.git/blob - test/TestSuite.hs
Add a ton of new tests based on pages 79 and 80 of Sorokina and Zeilfelder.
[spline3.git] / test / TestSuite.hs
1 import Test.HUnit
2 import Test.QuickCheck
3
4 import Tests.Face as TF
5 import Tests.Misc
6 import Tests.Tetrahedron as TT
7
8 -- The list of HUnit tests.
9 test_suite = TestList (concat [misc_tests,
10 tetrahedron_tests])
11
12 main :: IO ()
13 main = do
14 putStrLn "HUnit"
15 putStrLn "-----"
16 runTestTT test_suite
17 putStrLn ""
18 putStrLn "QuickCheck"
19 putStrLn "----------"
20 let qc_args = stdArgs { maxSuccess = 100,
21 maxDiscard = 500,
22 maxSize = 100 }
23
24 putStr "prop_all_volumes_positive... "
25 quickCheckWith qc_args prop_all_volumes_positive
26
27 putStr "prop_factorial_greater... "
28 quickCheckWith qc_args prop_factorial_greater
29
30 putStr "prop_b0_v0_always_unity... "
31 quickCheckWith qc_args prop_b0_v0_always_unity
32
33 putStr "prop_b0_v1_always_zero... "
34 quickCheckWith qc_args prop_b0_v1_always_zero
35
36 putStr "prop_b0_v2_always_zero... "
37 quickCheckWith qc_args prop_b0_v2_always_zero
38
39 putStr "prop_b0_v3_always_zero... "
40 quickCheckWith qc_args prop_b0_v3_always_zero
41
42 putStr "prop_b1_v1_always_unity... "
43 quickCheckWith qc_args prop_b1_v1_always_unity
44
45 putStr "prop_b1_v0_always_zero... "
46 quickCheckWith qc_args prop_b1_v0_always_zero
47
48 putStr "prop_b1_v2_always_zero... "
49 quickCheckWith qc_args prop_b1_v2_always_zero
50
51 putStr "prop_b1_v3_always_zero... "
52 quickCheckWith qc_args prop_b1_v3_always_zero
53
54 putStr "prop_b2_v2_always_unity... "
55 quickCheckWith qc_args prop_b2_v2_always_unity
56
57 putStr "prop_b2_v0_always_zero... "
58 quickCheckWith qc_args prop_b2_v0_always_zero
59
60 putStr "prop_b2_v1_always_zero... "
61 quickCheckWith qc_args prop_b2_v1_always_zero
62
63 putStr "prop_b2_v3_always_zero... "
64 quickCheckWith qc_args prop_b2_v3_always_zero
65
66 putStr "prop_b3_v3_always_unity... "
67 quickCheckWith qc_args prop_b3_v3_always_unity
68
69 putStr "prop_b3_v0_always_zero... "
70 quickCheckWith qc_args prop_b3_v0_always_zero
71
72 putStr "prop_b3_v1_always_zero... "
73 quickCheckWith qc_args prop_b3_v1_always_zero
74
75 putStr "prop_b3_v2_always_zero... "
76 quickCheckWith qc_args prop_b3_v2_always_zero
77
78 putStr "prop_c3000_identity... "
79 quickCheckWith qc_args TT.prop_c3000_identity
80
81 putStr "prop_c2100_identity... "
82 quickCheckWith qc_args TT.prop_c2100_identity
83
84 putStr "prop_c1110_identity... "
85 quickCheckWith qc_args TT.prop_c1110_identity
86
87 putStrLn "\np. 79, (2.6)\n"
88
89 putStr "prop_c0120_identity1... "
90 quickCheckWith qc_args TF.prop_c0120_identity1
91
92 putStr "prop_c0210_identity1... "
93 quickCheckWith qc_args TF.prop_c0210_identity1
94
95 putStr "prop_c0300_identity1... "
96 quickCheckWith qc_args TF.prop_c0300_identity1
97
98 putStr "prop_c1110_identity... "
99 quickCheckWith qc_args TF.prop_c1110_identity
100
101 putStr "prop_c1200_identity1... "
102 quickCheckWith qc_args prop_c1200_identity1
103
104 putStr "prop_c2100_identity1... "
105 quickCheckWith qc_args TF.prop_c2100_identity1
106
107 putStrLn "\np. 79, (2.7)\n"
108
109 putStr "prop_c0102_identity1... "
110 quickCheckWith qc_args TF.prop_c0102_identity1
111
112 putStr "prop_c0201_identity1... "
113 quickCheckWith qc_args TF.prop_c0201_identity1
114
115 putStr "prop_c0300_identity2... "
116 quickCheckWith qc_args TF.prop_c0300_identity2
117
118 putStr "prop_c1101_identity... "
119 quickCheckWith qc_args TF.prop_c1101_identity
120
121 putStr "prop_c1200_identity2... "
122 quickCheckWith qc_args TF.prop_c1200_identity2
123
124 putStr "prop_c2100_identity2... "
125 quickCheckWith qc_args TF.prop_c2100_identity2
126
127 putStrLn "\np. 79, (2.8)\n"
128
129 putStr "prop_c3000_identity... "
130 quickCheckWith qc_args TF.prop_c3000_identity
131
132 putStr "prop_c2010_identity... "
133 quickCheckWith qc_args TF.prop_c2010_identity
134
135 putStr "prop_c2001_identity... "
136 quickCheckWith qc_args TF.prop_c2001_identity
137
138 putStr "prop_c1020_identity... "
139 quickCheckWith qc_args TF.prop_c1020_identity
140
141 putStr "prop_c1002_identity... "
142 quickCheckWith qc_args TF.prop_c1002_identity
143
144 putStr "prop_c1011_identity... "
145 quickCheckWith qc_args TF.prop_c1011_identity
146
147 putStrLn "\np. 80, (2.9)\n"
148
149 putStr "prop_c0120_identity2... "
150 quickCheckWith qc_args TF.prop_c0120_identity2
151
152 putStr "prop_c0102_identity2... "
153 quickCheckWith qc_args TF.prop_c0102_identity2
154
155 putStr "prop_c0111_identity... "
156 quickCheckWith qc_args TF.prop_c0111_identity
157
158 putStr "prop_c0210_identity2... "
159 quickCheckWith qc_args TF.prop_c0210_identity2
160
161 putStr "prop_c0201_identity2... "
162 quickCheckWith qc_args TF.prop_c0201_identity2
163
164 putStr "prop_c0300_identity3... "
165 quickCheckWith qc_args TF.prop_c0300_identity3
166
167 return ()