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 putStr "prop_interior_values_all_identical... "
272 quickCheckWith qc_args prop_interior_values_all_identical
274 putStr "prop_c_tilde_2100_rotation_correct... "
275 quickCheckWith qc_args prop_c_tilde_2100_rotation_correct
277 putStr "prop_x_rotation_doesnt_affect_front... "
278 quickCheckWith qc_args prop_x_rotation_doesnt_affect_front
280 putStr "prop_x_rotation_doesnt_affect_back... "
281 quickCheckWith qc_args prop_x_rotation_doesnt_affect_back
283 putStr "prop_y_rotation_doesnt_affect_left... "
284 quickCheckWith qc_args prop_y_rotation_doesnt_affect_left
286 putStr "prop_y_rotation_doesnt_affect_right... "
287 quickCheckWith qc_args prop_y_rotation_doesnt_affect_right
289 putStr "prop_z_rotation_doesnt_affect_top... "
290 quickCheckWith qc_args prop_z_rotation_doesnt_affect_top
292 putStr "prop_z_rotation_doesnt_affect_down... "
293 quickCheckWith qc_args prop_z_rotation_doesnt_affect_down
295 putStr "prop_c_tilde_2100_correct... "
296 quickCheckWith qc_args prop_c_tilde_2100_correct
299 putStrLn "\nEdge Incidence Tests\n"
301 putStr "prop_t0_shares_edge_with_t6... "
302 quickCheckWith qc_args prop_t0_shares_edge_with_t6
304 putStr "prop_t0_shares_edge_with_t1... "
305 quickCheckWith qc_args prop_t0_shares_edge_with_t1
307 putStr "prop_t0_shares_edge_with_t3... "
308 quickCheckWith qc_args prop_t0_shares_edge_with_t3
310 putStr "prop_t1_shares_edge_with_t2... "
311 quickCheckWith qc_args prop_t1_shares_edge_with_t2
313 putStr "prop_t1_shares_edge_with_t19... "
314 quickCheckWith qc_args prop_t1_shares_edge_with_t19
316 putStr "prop_t2_shares_edge_with_t3... "
317 quickCheckWith qc_args prop_t2_shares_edge_with_t3
319 putStr "prop_t2_shares_edge_with_t12... "
320 quickCheckWith qc_args prop_t2_shares_edge_with_t12
322 putStr "prop_t3_shares_edge_with_t21... "
323 quickCheckWith qc_args prop_t3_shares_edge_with_t21
325 putStr "prop_t4_shares_edge_with_t5... "
326 quickCheckWith qc_args prop_t4_shares_edge_with_t5
328 putStr "prop_t4_shares_edge_with_t7... "
329 quickCheckWith qc_args prop_t4_shares_edge_with_t7
331 putStr "prop_t4_shares_edge_with_t10... "
332 quickCheckWith qc_args prop_t4_shares_edge_with_t10
334 putStr "prop_t5_shares_edge_with_t6... "
335 quickCheckWith qc_args prop_t5_shares_edge_with_t6
337 putStr "prop_t5_shares_edge_with_t16... "
338 quickCheckWith qc_args prop_t5_shares_edge_with_t16
340 putStr "prop_t6_shares_edge_with_t7... "
341 quickCheckWith qc_args prop_t6_shares_edge_with_t7
343 putStr "prop_t7_shares_edge_with_t20... "
344 quickCheckWith qc_args prop_t7_shares_edge_with_t20
346 putStrLn "\nMisc Tests\n"
348 putStr "prop_factorial_greater... "
349 quickCheckWith qc_args prop_factorial_greater
351 putStrLn "\nTetrahedron Tests\n"
353 putStr "prop_b0_v0_always_unity... "
354 quickCheckWith qc_args prop_b0_v0_always_unity
356 putStr "prop_b0_v1_always_zero... "
357 quickCheckWith qc_args prop_b0_v1_always_zero
359 putStr "prop_b0_v2_always_zero... "
360 quickCheckWith qc_args prop_b0_v2_always_zero
362 putStr "prop_b0_v3_always_zero... "
363 quickCheckWith qc_args prop_b0_v3_always_zero
365 putStr "prop_b1_v1_always_unity... "
366 quickCheckWith qc_args prop_b1_v1_always_unity
368 putStr "prop_b1_v0_always_zero... "
369 quickCheckWith qc_args prop_b1_v0_always_zero
371 putStr "prop_b1_v2_always_zero... "
372 quickCheckWith qc_args prop_b1_v2_always_zero
374 putStr "prop_b1_v3_always_zero... "
375 quickCheckWith qc_args prop_b1_v3_always_zero
377 putStr "prop_b2_v2_always_unity... "
378 quickCheckWith qc_args prop_b2_v2_always_unity
380 putStr "prop_b2_v0_always_zero... "
381 quickCheckWith qc_args prop_b2_v0_always_zero
383 putStr "prop_b2_v1_always_zero... "
384 quickCheckWith qc_args prop_b2_v1_always_zero
386 putStr "prop_b2_v3_always_zero... "
387 quickCheckWith qc_args prop_b2_v3_always_zero
389 putStr "prop_b3_v3_always_unity... "
390 quickCheckWith qc_args prop_b3_v3_always_unity
392 putStr "prop_b3_v0_always_zero... "
393 quickCheckWith qc_args prop_b3_v0_always_zero
395 putStr "prop_b3_v1_always_zero... "
396 quickCheckWith qc_args prop_b3_v1_always_zero
398 putStr "prop_b3_v2_always_zero... "
399 quickCheckWith qc_args prop_b3_v2_always_zero
401 putStr "prop_swapping_vertices_doesnt_affect_coefficients1... "
402 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients1
404 putStr "prop_swapping_vertices_doesnt_affect_coefficients2... "
405 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients2
407 putStr "prop_swapping_vertices_doesnt_affect_coefficients3... "
408 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients3
410 putStr "prop_swapping_vertices_doesnt_affect_coefficients4... "
411 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients4
413 putStrLn "\np. 78, (2.4)\n"
415 putStr "prop_c3000_identity... "
416 quickCheckWith qc_args TT.prop_c3000_identity
418 putStr "prop_c2100_identity... "
419 quickCheckWith qc_args TT.prop_c2100_identity
421 putStr "prop_c1110_identity... "
422 quickCheckWith qc_args TT.prop_c1110_identity
424 putStrLn "\nCardinal Tests\n"
426 putStr "prop_ccwx_rotation_changes_direction... "
427 quickCheckWith qc_args prop_ccwx_rotation_changes_direction
429 putStr "prop_cwx_rotation_changes_direction... "
430 quickCheckWith qc_args prop_cwx_rotation_changes_direction
432 putStr "prop_ccwy_rotation_changes_direction... "
433 quickCheckWith qc_args prop_ccwy_rotation_changes_direction
435 putStr "prop_cwy_rotation_changes_direction... "
436 quickCheckWith qc_args prop_cwy_rotation_changes_direction
438 putStr "prop_ccwz_rotation_changes_direction... "
439 quickCheckWith qc_args prop_ccwz_rotation_changes_direction
441 putStr "prop_cwz_rotation_changes_direction... "
442 quickCheckWith qc_args prop_cwz_rotation_changes_direction
444 putStr "prop_ccwx_rotation_result_unique... "
445 quickCheckWith qc_args prop_ccwx_rotation_result_unique
447 putStr "prop_cwx_rotation_result_unique... "
448 quickCheckWith qc_args prop_cwx_rotation_result_unique
450 putStr "prop_ccwy_rotation_result_unique... "
451 quickCheckWith qc_args prop_ccwy_rotation_result_unique
453 putStr "prop_cwy_rotation_result_unique... "
454 quickCheckWith qc_args prop_cwy_rotation_result_unique
456 putStr "prop_ccwz_rotation_result_unique... "
457 quickCheckWith qc_args prop_ccwz_rotation_result_unique
459 putStr "prop_cwz_rotation_result_unique... "
460 quickCheckWith qc_args prop_cwz_rotation_result_unique
462 putStr "prop_four_cwx_is_identity... "
463 quickCheckWith qc_args prop_four_cwx_is_identity
465 putStr "prop_four_ccwx_is_identity... "
466 quickCheckWith qc_args prop_four_ccwx_is_identity
468 putStr "prop_four_cwy_is_identity... "
469 quickCheckWith qc_args prop_four_cwy_is_identity
471 putStr "prop_four_ccwy_is_identity... "
472 quickCheckWith qc_args prop_four_ccwy_is_identity
474 putStr "prop_four_cwz_is_identity... "
475 quickCheckWith qc_args prop_four_cwz_is_identity
477 putStr "prop_four_ccwz_is_identity... "
478 quickCheckWith qc_args prop_four_ccwz_is_identity