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
271 -- putStrLn "\np. 80, (2.9)\n"
273 -- putStr "prop_c0120_identity2... "
274 -- quickCheckWith qc_args TF.prop_c0120_identity2
276 -- putStr "prop_c0102_identity2... "
277 -- quickCheckWith qc_args TF.prop_c0102_identity2
279 -- putStr "prop_c0111_identity... "
280 -- quickCheckWith qc_args TF.prop_c0111_identity
282 -- putStr "prop_c0210_identity2... "
283 -- quickCheckWith qc_args TF.prop_c0210_identity2
285 -- putStr "prop_c0201_identity2... "
286 -- quickCheckWith qc_args TF.prop_c0201_identity2
288 -- putStr "prop_c0300_identity3... "
289 -- quickCheckWith qc_args TF.prop_c0300_identity3
291 putStr "prop_interior_values_all_identical... "
292 quickCheckWith qc_args prop_interior_values_all_identical
294 putStr "prop_c_tilde_2100_rotation_correct... "
295 quickCheckWith qc_args prop_c_tilde_2100_rotation_correct
297 putStr "prop_x_rotation_doesnt_affect_front... "
298 quickCheckWith qc_args prop_x_rotation_doesnt_affect_front
300 putStr "prop_x_rotation_doesnt_affect_back... "
301 quickCheckWith qc_args prop_x_rotation_doesnt_affect_back
303 putStr "prop_y_rotation_doesnt_affect_left... "
304 quickCheckWith qc_args prop_y_rotation_doesnt_affect_left
306 putStr "prop_y_rotation_doesnt_affect_right... "
307 quickCheckWith qc_args prop_y_rotation_doesnt_affect_right
309 putStr "prop_z_rotation_doesnt_affect_top... "
310 quickCheckWith qc_args prop_z_rotation_doesnt_affect_top
312 putStr "prop_z_rotation_doesnt_affect_down... "
313 quickCheckWith qc_args prop_z_rotation_doesnt_affect_down
315 putStr "prop_c_tilde_2100_correct... "
316 quickCheckWith qc_args prop_c_tilde_2100_correct
319 putStrLn "\nEdge Incidence Tests\n"
321 putStr "prop_t0_shares_edge_with_t6... "
322 quickCheckWith qc_args prop_t0_shares_edge_with_t6
324 putStr "prop_t0_shares_edge_with_t1... "
325 quickCheckWith qc_args prop_t0_shares_edge_with_t1
327 putStr "prop_t0_shares_edge_with_t3... "
328 quickCheckWith qc_args prop_t0_shares_edge_with_t3
330 putStr "prop_t1_shares_edge_with_t2... "
331 quickCheckWith qc_args prop_t1_shares_edge_with_t2
333 putStr "prop_t1_shares_edge_with_t19... "
334 quickCheckWith qc_args prop_t1_shares_edge_with_t19
336 putStr "prop_t2_shares_edge_with_t3... "
337 quickCheckWith qc_args prop_t2_shares_edge_with_t3
339 putStr "prop_t2_shares_edge_with_t12... "
340 quickCheckWith qc_args prop_t2_shares_edge_with_t12
342 putStr "prop_t3_shares_edge_with_t21... "
343 quickCheckWith qc_args prop_t3_shares_edge_with_t21
345 putStr "prop_t4_shares_edge_with_t5... "
346 quickCheckWith qc_args prop_t4_shares_edge_with_t5
348 putStr "prop_t4_shares_edge_with_t7... "
349 quickCheckWith qc_args prop_t4_shares_edge_with_t7
351 putStr "prop_t4_shares_edge_with_t10... "
352 quickCheckWith qc_args prop_t4_shares_edge_with_t10
354 putStr "prop_t5_shares_edge_with_t6... "
355 quickCheckWith qc_args prop_t5_shares_edge_with_t6
357 putStr "prop_t5_shares_edge_with_t16... "
358 quickCheckWith qc_args prop_t5_shares_edge_with_t16
360 putStr "prop_t6_shares_edge_with_t7... "
361 quickCheckWith qc_args prop_t6_shares_edge_with_t7
363 putStr "prop_t7_shares_edge_with_t20... "
364 quickCheckWith qc_args prop_t7_shares_edge_with_t20
366 putStrLn "\nMisc Tests\n"
368 putStr "prop_factorial_greater... "
369 quickCheckWith qc_args prop_factorial_greater
371 putStrLn "\nTetrahedron Tests\n"
373 putStr "prop_b0_v0_always_unity... "
374 quickCheckWith qc_args prop_b0_v0_always_unity
376 putStr "prop_b0_v1_always_zero... "
377 quickCheckWith qc_args prop_b0_v1_always_zero
379 putStr "prop_b0_v2_always_zero... "
380 quickCheckWith qc_args prop_b0_v2_always_zero
382 putStr "prop_b0_v3_always_zero... "
383 quickCheckWith qc_args prop_b0_v3_always_zero
385 putStr "prop_b1_v1_always_unity... "
386 quickCheckWith qc_args prop_b1_v1_always_unity
388 putStr "prop_b1_v0_always_zero... "
389 quickCheckWith qc_args prop_b1_v0_always_zero
391 putStr "prop_b1_v2_always_zero... "
392 quickCheckWith qc_args prop_b1_v2_always_zero
394 putStr "prop_b1_v3_always_zero... "
395 quickCheckWith qc_args prop_b1_v3_always_zero
397 putStr "prop_b2_v2_always_unity... "
398 quickCheckWith qc_args prop_b2_v2_always_unity
400 putStr "prop_b2_v0_always_zero... "
401 quickCheckWith qc_args prop_b2_v0_always_zero
403 putStr "prop_b2_v1_always_zero... "
404 quickCheckWith qc_args prop_b2_v1_always_zero
406 putStr "prop_b2_v3_always_zero... "
407 quickCheckWith qc_args prop_b2_v3_always_zero
409 putStr "prop_b3_v3_always_unity... "
410 quickCheckWith qc_args prop_b3_v3_always_unity
412 putStr "prop_b3_v0_always_zero... "
413 quickCheckWith qc_args prop_b3_v0_always_zero
415 putStr "prop_b3_v1_always_zero... "
416 quickCheckWith qc_args prop_b3_v1_always_zero
418 putStr "prop_b3_v2_always_zero... "
419 quickCheckWith qc_args prop_b3_v2_always_zero
421 putStr "prop_swapping_vertices_doesnt_affect_coefficients1... "
422 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients1
424 putStr "prop_swapping_vertices_doesnt_affect_coefficients2... "
425 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients2
427 putStr "prop_swapping_vertices_doesnt_affect_coefficients3... "
428 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients3
430 putStr "prop_swapping_vertices_doesnt_affect_coefficients4... "
431 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients4
433 putStrLn "\np. 78, (2.4)\n"
435 putStr "prop_c3000_identity... "
436 quickCheckWith qc_args TT.prop_c3000_identity
438 putStr "prop_c2100_identity... "
439 quickCheckWith qc_args TT.prop_c2100_identity
441 putStr "prop_c1110_identity... "
442 quickCheckWith qc_args TT.prop_c1110_identity
444 putStrLn "\nCardinal Tests\n"
446 putStr "prop_ccwx_rotation_changes_direction... "
447 quickCheckWith qc_args prop_ccwx_rotation_changes_direction
449 putStr "prop_cwx_rotation_changes_direction... "
450 quickCheckWith qc_args prop_cwx_rotation_changes_direction
452 putStr "prop_ccwy_rotation_changes_direction... "
453 quickCheckWith qc_args prop_ccwy_rotation_changes_direction
455 putStr "prop_cwy_rotation_changes_direction... "
456 quickCheckWith qc_args prop_cwy_rotation_changes_direction
458 putStr "prop_ccwz_rotation_changes_direction... "
459 quickCheckWith qc_args prop_ccwz_rotation_changes_direction
461 putStr "prop_cwz_rotation_changes_direction... "
462 quickCheckWith qc_args prop_cwz_rotation_changes_direction
464 putStr "prop_ccwx_rotation_result_unique... "
465 quickCheckWith qc_args prop_ccwx_rotation_result_unique
467 putStr "prop_cwx_rotation_result_unique... "
468 quickCheckWith qc_args prop_cwx_rotation_result_unique
470 putStr "prop_ccwy_rotation_result_unique... "
471 quickCheckWith qc_args prop_ccwy_rotation_result_unique
473 putStr "prop_cwy_rotation_result_unique... "
474 quickCheckWith qc_args prop_cwy_rotation_result_unique
476 putStr "prop_ccwz_rotation_result_unique... "
477 quickCheckWith qc_args prop_ccwz_rotation_result_unique
479 putStr "prop_cwz_rotation_result_unique... "
480 quickCheckWith qc_args prop_cwz_rotation_result_unique
482 putStr "prop_four_cwx_is_identity... "
483 quickCheckWith qc_args prop_four_cwx_is_identity
485 putStr "prop_four_ccwx_is_identity... "
486 quickCheckWith qc_args prop_four_ccwx_is_identity
488 putStr "prop_four_cwy_is_identity... "
489 quickCheckWith qc_args prop_four_cwy_is_identity
491 putStr "prop_four_ccwy_is_identity... "
492 quickCheckWith qc_args prop_four_ccwy_is_identity
494 putStr "prop_four_cwz_is_identity... "
495 quickCheckWith qc_args prop_four_cwz_is_identity
497 putStr "prop_four_ccwz_is_identity... "
498 quickCheckWith qc_args prop_four_ccwz_is_identity