5 import Tests.Cube as TC
8 import Tests.Tetrahedron as TT
10 -- The list of HUnit tests.
11 test_suite = TestList (concat [grid_tests,
23 let qc_args = stdArgs { maxSuccess = 100,
28 putStrLn "\nGrid Tests\n"
30 putStrLn "\nCube Tests\n"
32 putStr "prop_all_volumes_positive... "
33 quickCheckWith qc_args prop_all_volumes_positive
35 -- putStr "prop_tetrahedron0_volumes_exact... "
36 -- quickCheckWith qc_args prop_tetrahedron0_volumes_exact
38 -- putStr "prop_tetrahedron1_volumes_exact... "
39 -- quickCheckWith qc_args prop_tetrahedron1_volumes_exact
41 -- putStr "prop_tetrahedron2_volumes_exact... "
42 -- quickCheckWith qc_args prop_tetrahedron2_volumes_exact
44 -- putStr "prop_tetrahedron3_volumes_exact... "
45 -- quickCheckWith qc_args prop_tetrahedron3_volumes_exact
47 -- putStr "prop_tetrahedron4_volumes_exact... "
48 -- quickCheckWith qc_args prop_tetrahedron4_volumes_exact
50 -- putStr "prop_tetrahedron4_volumes_exact... "
51 -- quickCheckWith qc_args prop_tetrahedron4_volumes_exact
53 -- putStr "prop_tetrahedron5_volumes_exact... "
54 -- quickCheckWith qc_args prop_tetrahedron5_volumes_exact
56 -- putStr "prop_tetrahedron6_volumes_exact... "
57 -- quickCheckWith qc_args prop_tetrahedron6_volumes_exact
59 -- putStr "prop_tetrahedron7_volumes_exact... "
60 -- quickCheckWith qc_args prop_tetrahedron7_volumes_exact
62 putStr "prop_tetrahedron0_volumes_positive... "
63 quickCheckWith qc_args prop_tetrahedron0_volumes_positive
65 putStr "prop_tetrahedron1_volumes_positive... "
66 quickCheckWith qc_args prop_tetrahedron1_volumes_positive
68 putStr "prop_tetrahedron2_volumes_positive... "
69 quickCheckWith qc_args prop_tetrahedron2_volumes_positive
71 putStr "prop_tetrahedron3_volumes_positive... "
72 quickCheckWith qc_args prop_tetrahedron3_volumes_positive
74 putStr "prop_tetrahedron4_volumes_positive... "
75 quickCheckWith qc_args prop_tetrahedron4_volumes_positive
77 putStr "prop_tetrahedron5_volumes_positive... "
78 quickCheckWith qc_args prop_tetrahedron5_volumes_positive
80 putStr "prop_tetrahedron6_volumes_positive... "
81 quickCheckWith qc_args prop_tetrahedron6_volumes_positive
83 putStr "prop_tetrahedron7_volumes_positive... "
84 quickCheckWith qc_args prop_tetrahedron7_volumes_positive
86 putStr "prop_tetrahedron8_volumes_positive... "
87 quickCheckWith qc_args prop_tetrahedron8_volumes_positive
89 putStr "prop_tetrahedron9_volumes_positive... "
90 quickCheckWith qc_args prop_tetrahedron9_volumes_positive
92 putStr "prop_tetrahedron10_volumes_positive... "
93 quickCheckWith qc_args prop_tetrahedron10_volumes_positive
95 putStr "prop_tetrahedron11_volumes_positive... "
96 quickCheckWith qc_args prop_tetrahedron11_volumes_positive
98 putStr "prop_tetrahedron12_volumes_positive... "
99 quickCheckWith qc_args prop_tetrahedron12_volumes_positive
101 putStr "prop_tetrahedron13_volumes_positive... "
102 quickCheckWith qc_args prop_tetrahedron13_volumes_positive
104 putStr "prop_tetrahedron14_volumes_positive... "
105 quickCheckWith qc_args prop_tetrahedron14_volumes_positive
107 putStr "prop_tetrahedron15_volumes_positive... "
108 quickCheckWith qc_args prop_tetrahedron15_volumes_positive
110 putStr "prop_tetrahedron16_volumes_positive... "
111 quickCheckWith qc_args prop_tetrahedron16_volumes_positive
113 putStr "prop_tetrahedron17_volumes_positive... "
114 quickCheckWith qc_args prop_tetrahedron17_volumes_positive
116 putStr "prop_tetrahedron18_volumes_positive... "
117 quickCheckWith qc_args prop_tetrahedron18_volumes_positive
119 putStr "prop_tetrahedron19_volumes_positive... "
120 quickCheckWith qc_args prop_tetrahedron19_volumes_positive
122 putStr "prop_tetrahedron20_volumes_positive... "
123 quickCheckWith qc_args prop_tetrahedron20_volumes_positive
125 putStr "prop_tetrahedron21_volumes_positive... "
126 quickCheckWith qc_args prop_tetrahedron21_volumes_positive
128 putStr "prop_tetrahedron22_volumes_positive... "
129 quickCheckWith qc_args prop_tetrahedron22_volumes_positive
131 putStr "prop_tetrahedron23_volumes_positive... "
132 quickCheckWith qc_args prop_tetrahedron23_volumes_positive
134 putStr "prop_v0_all_equal... "
135 quickCheckWith qc_args prop_v0_all_equal
137 -- putStrLn "\np. 78, (2.5)\n"
139 -- putStr "prop_cijk1_identity... "
140 -- quickCheckWith qc_args prop_cijk1_identity
143 -- putStrLn "\np. 79, (2.6)\n"
145 putStr "prop_c0120_identity1... "
146 quickCheckWith qc_args TC.prop_c0120_identity1
148 putStr "prop_c0210_identity1... "
149 quickCheckWith qc_args TC.prop_c0210_identity1
151 putStr "prop_c0300_identity1... "
152 quickCheckWith qc_args TC.prop_c0300_identity1
154 putStr "prop_c1110_identity... "
155 quickCheckWith qc_args TC.prop_c1110_identity
157 putStr "prop_c1200_identity1... "
158 quickCheckWith qc_args TC.prop_c1200_identity1
160 putStr "prop_c2100_identity1... "
161 quickCheckWith qc_args TC.prop_c2100_identity1
163 putStrLn "\np. 79, (2.7)\n"
165 putStr "prop_c0102_identity1... "
166 quickCheckWith qc_args TC.prop_c0102_identity1
168 putStr "prop_c0201_identity1... "
169 quickCheckWith qc_args TC.prop_c0201_identity1
171 putStr "prop_c0300_identity2... "
172 quickCheckWith qc_args TC.prop_c0300_identity2
174 putStr "prop_c1101_identity... "
175 quickCheckWith qc_args TC.prop_c1101_identity
177 putStr "prop_c1200_identity2... "
178 quickCheckWith qc_args TC.prop_c1200_identity2
180 putStr "prop_c2100_identity2... "
181 quickCheckWith qc_args TC.prop_c2100_identity2
183 putStrLn "\np. 79, (2.8)\n"
185 putStr "prop_t0_shares_edge_with_t6... "
186 quickCheckWith qc_args prop_t0_shares_edge_with_t6
188 putStr "prop_c3000_identity... "
189 quickCheckWith qc_args TC.prop_c3000_identity
191 -- putStr "prop_c2010_identity... "
192 -- quickCheckWith qc_args TC.prop_c2010_identity
194 -- putStr "prop_c2001_identity... "
195 -- quickCheckWith qc_args TC.prop_c2001_identity
197 -- putStr "prop_c1020_identity... "
198 -- quickCheckWith qc_args TC.prop_c1020_identity
200 -- putStr "prop_c1002_identity... "
201 -- quickCheckWith qc_args TC.prop_c1002_identity
203 -- putStr "prop_c1011_identity... "
204 -- quickCheckWith qc_args TC.prop_c1011_identity
206 -- putStrLn "\np. 80, (2.9)\n"
208 -- putStr "prop_c0120_identity2... "
209 -- quickCheckWith qc_args TF.prop_c0120_identity2
211 -- putStr "prop_c0102_identity2... "
212 -- quickCheckWith qc_args TF.prop_c0102_identity2
214 -- putStr "prop_c0111_identity... "
215 -- quickCheckWith qc_args TF.prop_c0111_identity
217 -- putStr "prop_c0210_identity2... "
218 -- quickCheckWith qc_args TF.prop_c0210_identity2
220 -- putStr "prop_c0201_identity2... "
221 -- quickCheckWith qc_args TF.prop_c0201_identity2
223 -- putStr "prop_c0300_identity3... "
224 -- quickCheckWith qc_args TF.prop_c0300_identity3
227 putStrLn "\nMisc Tests\n"
229 putStr "prop_factorial_greater... "
230 quickCheckWith qc_args prop_factorial_greater
232 putStrLn "\nTetrahedron Tests\n"
234 putStr "prop_b0_v0_always_unity... "
235 quickCheckWith qc_args prop_b0_v0_always_unity
237 putStr "prop_b0_v1_always_zero... "
238 quickCheckWith qc_args prop_b0_v1_always_zero
240 putStr "prop_b0_v2_always_zero... "
241 quickCheckWith qc_args prop_b0_v2_always_zero
243 putStr "prop_b0_v3_always_zero... "
244 quickCheckWith qc_args prop_b0_v3_always_zero
246 putStr "prop_b1_v1_always_unity... "
247 quickCheckWith qc_args prop_b1_v1_always_unity
249 putStr "prop_b1_v0_always_zero... "
250 quickCheckWith qc_args prop_b1_v0_always_zero
252 putStr "prop_b1_v2_always_zero... "
253 quickCheckWith qc_args prop_b1_v2_always_zero
255 putStr "prop_b1_v3_always_zero... "
256 quickCheckWith qc_args prop_b1_v3_always_zero
258 putStr "prop_b2_v2_always_unity... "
259 quickCheckWith qc_args prop_b2_v2_always_unity
261 putStr "prop_b2_v0_always_zero... "
262 quickCheckWith qc_args prop_b2_v0_always_zero
264 putStr "prop_b2_v1_always_zero... "
265 quickCheckWith qc_args prop_b2_v1_always_zero
267 putStr "prop_b2_v3_always_zero... "
268 quickCheckWith qc_args prop_b2_v3_always_zero
270 putStr "prop_b3_v3_always_unity... "
271 quickCheckWith qc_args prop_b3_v3_always_unity
273 putStr "prop_b3_v0_always_zero... "
274 quickCheckWith qc_args prop_b3_v0_always_zero
276 putStr "prop_b3_v1_always_zero... "
277 quickCheckWith qc_args prop_b3_v1_always_zero
279 putStr "prop_b3_v2_always_zero... "
280 quickCheckWith qc_args prop_b3_v2_always_zero
282 putStrLn "\np. 78, (2.4)\n"
284 putStr "prop_c3000_identity... "
285 quickCheckWith qc_args TT.prop_c3000_identity
287 putStr "prop_c2100_identity... "
288 quickCheckWith qc_args TT.prop_c2100_identity
290 putStr "prop_c1110_identity... "
291 quickCheckWith qc_args TT.prop_c1110_identity
294 putStrLn "\nCardinal Tests\n"
296 putStr "prop_ccwx_rotation_changes_direction... "
297 quickCheckWith qc_args prop_ccwx_rotation_changes_direction
299 putStr "prop_cwx_rotation_changes_direction... "
300 quickCheckWith qc_args prop_cwx_rotation_changes_direction
302 putStr "prop_ccwy_rotation_changes_direction... "
303 quickCheckWith qc_args prop_ccwy_rotation_changes_direction
305 putStr "prop_cwy_rotation_changes_direction... "
306 quickCheckWith qc_args prop_cwy_rotation_changes_direction
308 putStr "prop_ccwz_rotation_changes_direction... "
309 quickCheckWith qc_args prop_ccwz_rotation_changes_direction
311 putStr "prop_cwz_rotation_changes_direction... "
312 quickCheckWith qc_args prop_cwz_rotation_changes_direction
314 putStr "prop_ccwx_rotation_result_unique... "
315 quickCheckWith qc_args prop_ccwx_rotation_result_unique
317 putStr "prop_cwx_rotation_result_unique... "
318 quickCheckWith qc_args prop_cwx_rotation_result_unique
320 putStr "prop_ccwy_rotation_result_unique... "
321 quickCheckWith qc_args prop_ccwy_rotation_result_unique
323 putStr "prop_cwy_rotation_result_unique... "
324 quickCheckWith qc_args prop_cwy_rotation_result_unique
326 putStr "prop_ccwz_rotation_result_unique... "
327 quickCheckWith qc_args prop_ccwz_rotation_result_unique
329 putStr "prop_cwz_rotation_result_unique... "
330 quickCheckWith qc_args prop_cwz_rotation_result_unique
332 putStr "prop_four_cwx_is_identity... "
333 quickCheckWith qc_args prop_four_cwx_is_identity
335 putStr "prop_four_ccwx_is_identity... "
336 quickCheckWith qc_args prop_four_ccwx_is_identity
338 putStr "prop_four_cwy_is_identity... "
339 quickCheckWith qc_args prop_four_cwy_is_identity
341 putStr "prop_four_ccwy_is_identity... "
342 quickCheckWith qc_args prop_four_ccwy_is_identity
344 putStr "prop_four_cwz_is_identity... "
345 quickCheckWith qc_args prop_four_cwz_is_identity
347 putStr "prop_four_ccwz_is_identity... "
348 quickCheckWith qc_args prop_four_ccwz_is_identity