5 import Tests.Cube as TC
6 import Tests.FunctionValues
9 import Tests.Tetrahedron as TT
11 -- The list of HUnit tests.
12 test_suite = TestList (concat [cardinal_tests,
13 function_values_tests,
26 let qc_args = stdArgs { maxSuccess = 100,
31 putStrLn "\nGrid Tests\n"
33 putStrLn "\nCube Tests\n"
35 putStr "prop_all_volumes_positive... "
36 quickCheckWith qc_args prop_all_volumes_positive
38 putStr "prop_tetrahedron0_volumes_exact... "
39 quickCheckWith qc_args prop_tetrahedron0_volumes_exact
41 putStr "prop_tetrahedron1_volumes_exact... "
42 quickCheckWith qc_args prop_tetrahedron1_volumes_exact
44 putStr "prop_tetrahedron2_volumes_exact... "
45 quickCheckWith qc_args prop_tetrahedron2_volumes_exact
47 putStr "prop_tetrahedron3_volumes_exact... "
48 quickCheckWith qc_args prop_tetrahedron3_volumes_exact
50 putStr "prop_tetrahedron4_volumes_exact... "
51 quickCheckWith qc_args prop_tetrahedron4_volumes_exact
53 putStr "prop_tetrahedron4_volumes_exact... "
54 quickCheckWith qc_args prop_tetrahedron4_volumes_exact
56 putStr "prop_tetrahedron5_volumes_exact... "
57 quickCheckWith qc_args prop_tetrahedron5_volumes_exact
59 putStr "prop_tetrahedron6_volumes_exact... "
60 quickCheckWith qc_args prop_tetrahedron6_volumes_exact
62 putStr "prop_tetrahedron7_volumes_exact... "
63 quickCheckWith qc_args prop_tetrahedron7_volumes_exact
65 putStr "prop_tetrahedron8_volumes_exact... "
66 quickCheckWith qc_args prop_tetrahedron8_volumes_exact
68 putStr "prop_tetrahedron9_volumes_exact... "
69 quickCheckWith qc_args prop_tetrahedron9_volumes_exact
71 putStr "prop_tetrahedron10_volumes_exact... "
72 quickCheckWith qc_args prop_tetrahedron10_volumes_exact
74 putStr "prop_tetrahedron11_volumes_exact... "
75 quickCheckWith qc_args prop_tetrahedron11_volumes_exact
77 putStr "prop_tetrahedron12_volumes_exact... "
78 quickCheckWith qc_args prop_tetrahedron12_volumes_exact
80 putStr "prop_tetrahedron13_volumes_exact... "
81 quickCheckWith qc_args prop_tetrahedron13_volumes_exact
83 putStr "prop_tetrahedron14_volumes_exact... "
84 quickCheckWith qc_args prop_tetrahedron14_volumes_exact
86 putStr "prop_tetrahedron15_volumes_exact... "
87 quickCheckWith qc_args prop_tetrahedron15_volumes_exact
89 putStr "prop_tetrahedron16_volumes_exact... "
90 quickCheckWith qc_args prop_tetrahedron16_volumes_exact
92 putStr "prop_tetrahedron17_volumes_exact... "
93 quickCheckWith qc_args prop_tetrahedron17_volumes_exact
95 putStr "prop_tetrahedron18_volumes_exact... "
96 quickCheckWith qc_args prop_tetrahedron18_volumes_exact
98 putStr "prop_tetrahedron19_volumes_exact... "
99 quickCheckWith qc_args prop_tetrahedron19_volumes_exact
101 putStr "prop_tetrahedron20_volumes_exact... "
102 quickCheckWith qc_args prop_tetrahedron20_volumes_exact
104 putStr "prop_tetrahedron21_volumes_exact... "
105 quickCheckWith qc_args prop_tetrahedron21_volumes_exact
107 putStr "prop_tetrahedron22_volumes_exact... "
108 quickCheckWith qc_args prop_tetrahedron22_volumes_exact
110 putStr "prop_tetrahedron23_volumes_exact... "
111 quickCheckWith qc_args prop_tetrahedron23_volumes_exact
113 putStr "prop_tetrahedron0_volumes_positive... "
114 quickCheckWith qc_args prop_tetrahedron0_volumes_positive
116 putStr "prop_tetrahedron1_volumes_positive... "
117 quickCheckWith qc_args prop_tetrahedron1_volumes_positive
119 putStr "prop_tetrahedron2_volumes_positive... "
120 quickCheckWith qc_args prop_tetrahedron2_volumes_positive
122 putStr "prop_tetrahedron3_volumes_positive... "
123 quickCheckWith qc_args prop_tetrahedron3_volumes_positive
125 putStr "prop_tetrahedron4_volumes_positive... "
126 quickCheckWith qc_args prop_tetrahedron4_volumes_positive
128 putStr "prop_tetrahedron5_volumes_positive... "
129 quickCheckWith qc_args prop_tetrahedron5_volumes_positive
131 putStr "prop_tetrahedron6_volumes_positive... "
132 quickCheckWith qc_args prop_tetrahedron6_volumes_positive
134 putStr "prop_tetrahedron7_volumes_positive... "
135 quickCheckWith qc_args prop_tetrahedron7_volumes_positive
137 putStr "prop_tetrahedron8_volumes_positive... "
138 quickCheckWith qc_args prop_tetrahedron8_volumes_positive
140 putStr "prop_tetrahedron9_volumes_positive... "
141 quickCheckWith qc_args prop_tetrahedron9_volumes_positive
143 putStr "prop_tetrahedron10_volumes_positive... "
144 quickCheckWith qc_args prop_tetrahedron10_volumes_positive
146 putStr "prop_tetrahedron11_volumes_positive... "
147 quickCheckWith qc_args prop_tetrahedron11_volumes_positive
149 putStr "prop_tetrahedron12_volumes_positive... "
150 quickCheckWith qc_args prop_tetrahedron12_volumes_positive
152 putStr "prop_tetrahedron13_volumes_positive... "
153 quickCheckWith qc_args prop_tetrahedron13_volumes_positive
155 putStr "prop_tetrahedron14_volumes_positive... "
156 quickCheckWith qc_args prop_tetrahedron14_volumes_positive
158 putStr "prop_tetrahedron15_volumes_positive... "
159 quickCheckWith qc_args prop_tetrahedron15_volumes_positive
161 putStr "prop_tetrahedron16_volumes_positive... "
162 quickCheckWith qc_args prop_tetrahedron16_volumes_positive
164 putStr "prop_tetrahedron17_volumes_positive... "
165 quickCheckWith qc_args prop_tetrahedron17_volumes_positive
167 putStr "prop_tetrahedron18_volumes_positive... "
168 quickCheckWith qc_args prop_tetrahedron18_volumes_positive
170 putStr "prop_tetrahedron19_volumes_positive... "
171 quickCheckWith qc_args prop_tetrahedron19_volumes_positive
173 putStr "prop_tetrahedron20_volumes_positive... "
174 quickCheckWith qc_args prop_tetrahedron20_volumes_positive
176 putStr "prop_tetrahedron21_volumes_positive... "
177 quickCheckWith qc_args prop_tetrahedron21_volumes_positive
179 putStr "prop_tetrahedron22_volumes_positive... "
180 quickCheckWith qc_args prop_tetrahedron22_volumes_positive
182 putStr "prop_tetrahedron23_volumes_positive... "
183 quickCheckWith qc_args prop_tetrahedron23_volumes_positive
185 putStr "prop_v0_all_equal... "
186 quickCheckWith qc_args prop_v0_all_equal
188 -- putStrLn "\np. 78, (2.5)\n"
190 -- putStr "prop_cijk1_identity... "
191 -- quickCheckWith qc_args prop_cijk1_identity
194 putStrLn "\np. 79, (2.6)\n"
196 putStr "prop_c0120_identity1... "
197 quickCheckWith qc_args TC.prop_c0120_identity1
199 putStr "prop_c0120_identity2... "
200 quickCheckWith qc_args TC.prop_c0120_identity2
202 putStr "prop_c0120_identity3... "
203 quickCheckWith qc_args TC.prop_c0120_identity3
205 putStr "prop_c0120_identity4... "
206 quickCheckWith qc_args TC.prop_c0120_identity4
208 putStr "prop_c0120_identity5... "
209 quickCheckWith qc_args TC.prop_c0120_identity5
211 putStr "prop_c0120_identity6... "
212 quickCheckWith qc_args TC.prop_c0120_identity6
214 putStr "prop_c0210_identity1... "
215 quickCheckWith qc_args TC.prop_c0210_identity1
217 putStr "prop_c0300_identity1... "
218 quickCheckWith qc_args TC.prop_c0300_identity1
220 putStr "prop_c1110_identity... "
221 quickCheckWith qc_args TC.prop_c1110_identity
223 putStr "prop_c1200_identity1... "
224 quickCheckWith qc_args TC.prop_c1200_identity1
226 putStr "prop_c2100_identity1... "
227 quickCheckWith qc_args TC.prop_c2100_identity1
229 putStrLn "\np. 79, (2.7)\n"
231 putStr "prop_c0102_identity1... "
232 quickCheckWith qc_args TC.prop_c0102_identity1
234 putStr "prop_c0201_identity1... "
235 quickCheckWith qc_args TC.prop_c0201_identity1
237 putStr "prop_c0300_identity2... "
238 quickCheckWith qc_args TC.prop_c0300_identity2
240 putStr "prop_c1101_identity... "
241 quickCheckWith qc_args TC.prop_c1101_identity
243 putStr "prop_c1200_identity2... "
244 quickCheckWith qc_args TC.prop_c1200_identity2
246 putStr "prop_c2100_identity2... "
247 quickCheckWith qc_args TC.prop_c2100_identity2
249 putStrLn "\np. 79, (2.8)\n"
251 putStr "prop_c3000_identity... "
252 quickCheckWith qc_args TC.prop_c3000_identity
254 putStr "prop_c2010_identity... "
255 quickCheckWith qc_args TC.prop_c2010_identity
257 putStr "prop_c2001_identity... "
258 quickCheckWith qc_args TC.prop_c2001_identity
260 putStr "prop_c1020_identity... "
261 quickCheckWith qc_args TC.prop_c1020_identity
263 putStr "prop_c1002_identity... "
264 quickCheckWith qc_args TC.prop_c1002_identity
266 putStr "prop_c1011_identity... "
267 quickCheckWith qc_args TC.prop_c1011_identity
269 putStrLn "\np. 80, (2.9)\n"
271 -- putStr "prop_c0120_identity2... "
272 -- quickCheckWith qc_args TF.prop_c0120_identity2
274 -- putStr "prop_c0102_identity2... "
275 -- quickCheckWith qc_args TF.prop_c0102_identity2
277 -- putStr "prop_c0111_identity... "
278 -- quickCheckWith qc_args TF.prop_c0111_identity
280 -- putStr "prop_c0210_identity2... "
281 -- quickCheckWith qc_args TF.prop_c0210_identity2
283 -- putStr "prop_c0201_identity2... "
284 -- quickCheckWith qc_args TF.prop_c0201_identity2
286 -- putStr "prop_c0300_identity3... "
287 -- quickCheckWith qc_args TF.prop_c0300_identity3
289 putStrLn "prop_interior_values_all_identical... "
290 quickCheckWith qc_args prop_interior_values_all_identical
292 putStrLn "prop_c_tilde_2100_rotation_correct... "
293 quickCheckWith qc_args prop_c_tilde_2100_rotation_correct
295 putStrLn "prop_x_rotation_doesnt_affect_front... "
296 quickCheckWith qc_args prop_x_rotation_doesnt_affect_front
298 putStrLn "prop_x_rotation_doesnt_affect_back... "
299 quickCheckWith qc_args prop_x_rotation_doesnt_affect_back
301 putStrLn "prop_y_rotation_doesnt_affect_left... "
302 quickCheckWith qc_args prop_y_rotation_doesnt_affect_left
304 putStrLn "prop_y_rotation_doesnt_affect_right... "
305 quickCheckWith qc_args prop_y_rotation_doesnt_affect_right
307 putStrLn "prop_z_rotation_doesnt_affect_top... "
308 quickCheckWith qc_args prop_z_rotation_doesnt_affect_top
310 putStrLn "prop_z_rotation_doesnt_affect_down... "
311 quickCheckWith qc_args prop_z_rotation_doesnt_affect_down
313 putStrLn "prop_c_tilde_2100_correct... "
314 quickCheckWith qc_args prop_c_tilde_2100_correct
317 putStrLn "\nEdge Incidence Tests\n"
319 putStr "prop_t0_shares_edge_with_t6... "
320 quickCheckWith qc_args prop_t0_shares_edge_with_t6
322 putStr "prop_t0_shares_edge_with_t1... "
323 quickCheckWith qc_args prop_t0_shares_edge_with_t1
325 putStr "prop_t0_shares_edge_with_t3... "
326 quickCheckWith qc_args prop_t0_shares_edge_with_t3
328 putStr "prop_t1_shares_edge_with_t2... "
329 quickCheckWith qc_args prop_t1_shares_edge_with_t2
331 putStr "prop_t1_shares_edge_with_t19... "
332 quickCheckWith qc_args prop_t1_shares_edge_with_t19
334 putStr "prop_t2_shares_edge_with_t3... "
335 quickCheckWith qc_args prop_t2_shares_edge_with_t3
337 putStr "prop_t2_shares_edge_with_t12... "
338 quickCheckWith qc_args prop_t2_shares_edge_with_t12
340 putStr "prop_t3_shares_edge_with_t21... "
341 quickCheckWith qc_args prop_t3_shares_edge_with_t21
343 putStr "prop_t4_shares_edge_with_t5... "
344 quickCheckWith qc_args prop_t4_shares_edge_with_t5
346 putStr "prop_t4_shares_edge_with_t7... "
347 quickCheckWith qc_args prop_t4_shares_edge_with_t7
349 putStr "prop_t4_shares_edge_with_t10... "
350 quickCheckWith qc_args prop_t4_shares_edge_with_t10
352 putStr "prop_t5_shares_edge_with_t6... "
353 quickCheckWith qc_args prop_t5_shares_edge_with_t6
355 putStr "prop_t5_shares_edge_with_t16... "
356 quickCheckWith qc_args prop_t5_shares_edge_with_t16
358 putStr "prop_t6_shares_edge_with_t7... "
359 quickCheckWith qc_args prop_t6_shares_edge_with_t7
361 putStr "prop_t7_shares_edge_with_t20... "
362 quickCheckWith qc_args prop_t7_shares_edge_with_t20
364 putStrLn "\nMisc Tests\n"
366 putStr "prop_factorial_greater... "
367 quickCheckWith qc_args prop_factorial_greater
369 putStrLn "\nTetrahedron Tests\n"
371 putStr "prop_b0_v0_always_unity... "
372 quickCheckWith qc_args prop_b0_v0_always_unity
374 putStr "prop_b0_v1_always_zero... "
375 quickCheckWith qc_args prop_b0_v1_always_zero
377 putStr "prop_b0_v2_always_zero... "
378 quickCheckWith qc_args prop_b0_v2_always_zero
380 putStr "prop_b0_v3_always_zero... "
381 quickCheckWith qc_args prop_b0_v3_always_zero
383 putStr "prop_b1_v1_always_unity... "
384 quickCheckWith qc_args prop_b1_v1_always_unity
386 putStr "prop_b1_v0_always_zero... "
387 quickCheckWith qc_args prop_b1_v0_always_zero
389 putStr "prop_b1_v2_always_zero... "
390 quickCheckWith qc_args prop_b1_v2_always_zero
392 putStr "prop_b1_v3_always_zero... "
393 quickCheckWith qc_args prop_b1_v3_always_zero
395 putStr "prop_b2_v2_always_unity... "
396 quickCheckWith qc_args prop_b2_v2_always_unity
398 putStr "prop_b2_v0_always_zero... "
399 quickCheckWith qc_args prop_b2_v0_always_zero
401 putStr "prop_b2_v1_always_zero... "
402 quickCheckWith qc_args prop_b2_v1_always_zero
404 putStr "prop_b2_v3_always_zero... "
405 quickCheckWith qc_args prop_b2_v3_always_zero
407 putStr "prop_b3_v3_always_unity... "
408 quickCheckWith qc_args prop_b3_v3_always_unity
410 putStr "prop_b3_v0_always_zero... "
411 quickCheckWith qc_args prop_b3_v0_always_zero
413 putStr "prop_b3_v1_always_zero... "
414 quickCheckWith qc_args prop_b3_v1_always_zero
416 putStr "prop_b3_v2_always_zero... "
417 quickCheckWith qc_args prop_b3_v2_always_zero
419 putStrLn "\np. 78, (2.4)\n"
421 putStr "prop_c3000_identity... "
422 quickCheckWith qc_args TT.prop_c3000_identity
424 putStr "prop_c2100_identity... "
425 quickCheckWith qc_args TT.prop_c2100_identity
427 putStr "prop_c1110_identity... "
428 quickCheckWith qc_args TT.prop_c1110_identity
431 putStrLn "\nCardinal Tests\n"
433 putStr "prop_ccwx_rotation_changes_direction... "
434 quickCheckWith qc_args prop_ccwx_rotation_changes_direction
436 putStr "prop_cwx_rotation_changes_direction... "
437 quickCheckWith qc_args prop_cwx_rotation_changes_direction
439 putStr "prop_ccwy_rotation_changes_direction... "
440 quickCheckWith qc_args prop_ccwy_rotation_changes_direction
442 putStr "prop_cwy_rotation_changes_direction... "
443 quickCheckWith qc_args prop_cwy_rotation_changes_direction
445 putStr "prop_ccwz_rotation_changes_direction... "
446 quickCheckWith qc_args prop_ccwz_rotation_changes_direction
448 putStr "prop_cwz_rotation_changes_direction... "
449 quickCheckWith qc_args prop_cwz_rotation_changes_direction
451 putStr "prop_ccwx_rotation_result_unique... "
452 quickCheckWith qc_args prop_ccwx_rotation_result_unique
454 putStr "prop_cwx_rotation_result_unique... "
455 quickCheckWith qc_args prop_cwx_rotation_result_unique
457 putStr "prop_ccwy_rotation_result_unique... "
458 quickCheckWith qc_args prop_ccwy_rotation_result_unique
460 putStr "prop_cwy_rotation_result_unique... "
461 quickCheckWith qc_args prop_cwy_rotation_result_unique
463 putStr "prop_ccwz_rotation_result_unique... "
464 quickCheckWith qc_args prop_ccwz_rotation_result_unique
466 putStr "prop_cwz_rotation_result_unique... "
467 quickCheckWith qc_args prop_cwz_rotation_result_unique
469 putStr "prop_four_cwx_is_identity... "
470 quickCheckWith qc_args prop_four_cwx_is_identity
472 putStr "prop_four_ccwx_is_identity... "
473 quickCheckWith qc_args prop_four_ccwx_is_identity
475 putStr "prop_four_cwy_is_identity... "
476 quickCheckWith qc_args prop_four_cwy_is_identity
478 putStr "prop_four_ccwy_is_identity... "
479 quickCheckWith qc_args prop_four_ccwy_is_identity
481 putStr "prop_four_cwz_is_identity... "
482 quickCheckWith qc_args prop_four_cwz_is_identity
484 putStr "prop_four_ccwz_is_identity... "
485 quickCheckWith qc_args prop_four_ccwz_is_identity