]> gitweb.michael.orlitzky.com - spline3.git/blob - test/TestSuite.hs
Add a blank line to the test output.
[spline3.git] / test / TestSuite.hs
1 import Test.HUnit
2 import Test.QuickCheck
3
4 import Tests.Cardinal
5 import Tests.Cube as TC
6 import Tests.FunctionValues
7 import Tests.Grid
8 import Tests.Misc
9 import Tests.Tetrahedron as TT
10
11 -- The list of HUnit tests.
12 test_suite = TestList (concat [cardinal_tests,
13 function_values_tests,
14 grid_tests,
15 misc_tests,
16 tetrahedron_tests])
17
18 main :: IO ()
19 main = do
20 putStrLn "HUnit"
21 putStrLn "-----"
22 runTestTT test_suite
23 putStrLn ""
24 putStrLn "QuickCheck"
25 putStrLn "----------"
26 let qc_args = stdArgs { maxSuccess = 100,
27 maxDiscard = 500,
28 maxSize = 100 }
29
30
31 putStrLn "\nGrid Tests\n"
32
33 putStrLn "\nCube Tests\n"
34
35 putStr "prop_all_volumes_positive... "
36 quickCheckWith qc_args prop_all_volumes_positive
37
38 putStr "prop_tetrahedron0_volumes_exact... "
39 quickCheckWith qc_args prop_tetrahedron0_volumes_exact
40
41 putStr "prop_tetrahedron1_volumes_exact... "
42 quickCheckWith qc_args prop_tetrahedron1_volumes_exact
43
44 putStr "prop_tetrahedron2_volumes_exact... "
45 quickCheckWith qc_args prop_tetrahedron2_volumes_exact
46
47 putStr "prop_tetrahedron3_volumes_exact... "
48 quickCheckWith qc_args prop_tetrahedron3_volumes_exact
49
50 putStr "prop_tetrahedron4_volumes_exact... "
51 quickCheckWith qc_args prop_tetrahedron4_volumes_exact
52
53 putStr "prop_tetrahedron4_volumes_exact... "
54 quickCheckWith qc_args prop_tetrahedron4_volumes_exact
55
56 putStr "prop_tetrahedron5_volumes_exact... "
57 quickCheckWith qc_args prop_tetrahedron5_volumes_exact
58
59 putStr "prop_tetrahedron6_volumes_exact... "
60 quickCheckWith qc_args prop_tetrahedron6_volumes_exact
61
62 putStr "prop_tetrahedron7_volumes_exact... "
63 quickCheckWith qc_args prop_tetrahedron7_volumes_exact
64
65 putStr "prop_tetrahedron8_volumes_exact... "
66 quickCheckWith qc_args prop_tetrahedron8_volumes_exact
67
68 putStr "prop_tetrahedron9_volumes_exact... "
69 quickCheckWith qc_args prop_tetrahedron9_volumes_exact
70
71 putStr "prop_tetrahedron10_volumes_exact... "
72 quickCheckWith qc_args prop_tetrahedron10_volumes_exact
73
74 putStr "prop_tetrahedron11_volumes_exact... "
75 quickCheckWith qc_args prop_tetrahedron11_volumes_exact
76
77 putStr "prop_tetrahedron12_volumes_exact... "
78 quickCheckWith qc_args prop_tetrahedron12_volumes_exact
79
80 putStr "prop_tetrahedron13_volumes_exact... "
81 quickCheckWith qc_args prop_tetrahedron13_volumes_exact
82
83 putStr "prop_tetrahedron14_volumes_exact... "
84 quickCheckWith qc_args prop_tetrahedron14_volumes_exact
85
86 putStr "prop_tetrahedron15_volumes_exact... "
87 quickCheckWith qc_args prop_tetrahedron15_volumes_exact
88
89 putStr "prop_tetrahedron16_volumes_exact... "
90 quickCheckWith qc_args prop_tetrahedron16_volumes_exact
91
92 putStr "prop_tetrahedron17_volumes_exact... "
93 quickCheckWith qc_args prop_tetrahedron17_volumes_exact
94
95 putStr "prop_tetrahedron18_volumes_exact... "
96 quickCheckWith qc_args prop_tetrahedron18_volumes_exact
97
98 putStr "prop_tetrahedron19_volumes_exact... "
99 quickCheckWith qc_args prop_tetrahedron19_volumes_exact
100
101 putStr "prop_tetrahedron20_volumes_exact... "
102 quickCheckWith qc_args prop_tetrahedron20_volumes_exact
103
104 putStr "prop_tetrahedron21_volumes_exact... "
105 quickCheckWith qc_args prop_tetrahedron21_volumes_exact
106
107 putStr "prop_tetrahedron22_volumes_exact... "
108 quickCheckWith qc_args prop_tetrahedron22_volumes_exact
109
110 putStr "prop_tetrahedron23_volumes_exact... "
111 quickCheckWith qc_args prop_tetrahedron23_volumes_exact
112
113 putStr "prop_tetrahedron0_volumes_positive... "
114 quickCheckWith qc_args prop_tetrahedron0_volumes_positive
115
116 putStr "prop_tetrahedron1_volumes_positive... "
117 quickCheckWith qc_args prop_tetrahedron1_volumes_positive
118
119 putStr "prop_tetrahedron2_volumes_positive... "
120 quickCheckWith qc_args prop_tetrahedron2_volumes_positive
121
122 putStr "prop_tetrahedron3_volumes_positive... "
123 quickCheckWith qc_args prop_tetrahedron3_volumes_positive
124
125 putStr "prop_tetrahedron4_volumes_positive... "
126 quickCheckWith qc_args prop_tetrahedron4_volumes_positive
127
128 putStr "prop_tetrahedron5_volumes_positive... "
129 quickCheckWith qc_args prop_tetrahedron5_volumes_positive
130
131 putStr "prop_tetrahedron6_volumes_positive... "
132 quickCheckWith qc_args prop_tetrahedron6_volumes_positive
133
134 putStr "prop_tetrahedron7_volumes_positive... "
135 quickCheckWith qc_args prop_tetrahedron7_volumes_positive
136
137 putStr "prop_tetrahedron8_volumes_positive... "
138 quickCheckWith qc_args prop_tetrahedron8_volumes_positive
139
140 putStr "prop_tetrahedron9_volumes_positive... "
141 quickCheckWith qc_args prop_tetrahedron9_volumes_positive
142
143 putStr "prop_tetrahedron10_volumes_positive... "
144 quickCheckWith qc_args prop_tetrahedron10_volumes_positive
145
146 putStr "prop_tetrahedron11_volumes_positive... "
147 quickCheckWith qc_args prop_tetrahedron11_volumes_positive
148
149 putStr "prop_tetrahedron12_volumes_positive... "
150 quickCheckWith qc_args prop_tetrahedron12_volumes_positive
151
152 putStr "prop_tetrahedron13_volumes_positive... "
153 quickCheckWith qc_args prop_tetrahedron13_volumes_positive
154
155 putStr "prop_tetrahedron14_volumes_positive... "
156 quickCheckWith qc_args prop_tetrahedron14_volumes_positive
157
158 putStr "prop_tetrahedron15_volumes_positive... "
159 quickCheckWith qc_args prop_tetrahedron15_volumes_positive
160
161 putStr "prop_tetrahedron16_volumes_positive... "
162 quickCheckWith qc_args prop_tetrahedron16_volumes_positive
163
164 putStr "prop_tetrahedron17_volumes_positive... "
165 quickCheckWith qc_args prop_tetrahedron17_volumes_positive
166
167 putStr "prop_tetrahedron18_volumes_positive... "
168 quickCheckWith qc_args prop_tetrahedron18_volumes_positive
169
170 putStr "prop_tetrahedron19_volumes_positive... "
171 quickCheckWith qc_args prop_tetrahedron19_volumes_positive
172
173 putStr "prop_tetrahedron20_volumes_positive... "
174 quickCheckWith qc_args prop_tetrahedron20_volumes_positive
175
176 putStr "prop_tetrahedron21_volumes_positive... "
177 quickCheckWith qc_args prop_tetrahedron21_volumes_positive
178
179 putStr "prop_tetrahedron22_volumes_positive... "
180 quickCheckWith qc_args prop_tetrahedron22_volumes_positive
181
182 putStr "prop_tetrahedron23_volumes_positive... "
183 quickCheckWith qc_args prop_tetrahedron23_volumes_positive
184
185 putStr "prop_v0_all_equal... "
186 quickCheckWith qc_args prop_v0_all_equal
187
188 -- putStrLn "\np. 78, (2.5)\n"
189
190 -- putStr "prop_cijk1_identity... "
191 -- quickCheckWith qc_args prop_cijk1_identity
192
193
194 putStrLn "\np. 79, (2.6)\n"
195
196 putStr "prop_c0120_identity1... "
197 quickCheckWith qc_args TC.prop_c0120_identity1
198
199 putStr "prop_c0120_identity2... "
200 quickCheckWith qc_args TC.prop_c0120_identity2
201
202 putStr "prop_c0120_identity3... "
203 quickCheckWith qc_args TC.prop_c0120_identity3
204
205 -- putStr "prop_c0120_identity4... "
206 -- quickCheckWith qc_args TC.prop_c0120_identity4
207
208 -- putStr "prop_c0120_identity5... "
209 -- quickCheckWith qc_args TC.prop_c0120_identity5
210
211 -- putStr "prop_c0120_identity6... "
212 -- quickCheckWith qc_args TC.prop_c0120_identity6
213
214 putStr "prop_c0210_identity1... "
215 quickCheckWith qc_args TC.prop_c0210_identity1
216
217 putStr "prop_c0300_identity1... "
218 quickCheckWith qc_args TC.prop_c0300_identity1
219
220 putStr "prop_c1110_identity... "
221 quickCheckWith qc_args TC.prop_c1110_identity
222
223 putStr "prop_c1200_identity1... "
224 quickCheckWith qc_args TC.prop_c1200_identity1
225
226 putStr "prop_c2100_identity1... "
227 quickCheckWith qc_args TC.prop_c2100_identity1
228
229 putStrLn "\np. 79, (2.7)\n"
230
231 putStr "prop_c0102_identity1... "
232 quickCheckWith qc_args TC.prop_c0102_identity1
233
234 putStr "prop_c0201_identity1... "
235 quickCheckWith qc_args TC.prop_c0201_identity1
236
237 putStr "prop_c0300_identity2... "
238 quickCheckWith qc_args TC.prop_c0300_identity2
239
240 putStr "prop_c1101_identity... "
241 quickCheckWith qc_args TC.prop_c1101_identity
242
243 putStr "prop_c1200_identity2... "
244 quickCheckWith qc_args TC.prop_c1200_identity2
245
246 putStr "prop_c2100_identity2... "
247 quickCheckWith qc_args TC.prop_c2100_identity2
248
249 putStrLn "\np. 79, (2.8)\n"
250
251 putStr "prop_c3000_identity... "
252 quickCheckWith qc_args TC.prop_c3000_identity
253
254 putStr "prop_c2010_identity... "
255 quickCheckWith qc_args TC.prop_c2010_identity
256
257 putStr "prop_c2001_identity... "
258 quickCheckWith qc_args TC.prop_c2001_identity
259
260 putStr "prop_c1020_identity... "
261 quickCheckWith qc_args TC.prop_c1020_identity
262
263 putStr "prop_c1002_identity... "
264 quickCheckWith qc_args TC.prop_c1002_identity
265
266 putStr "prop_c1011_identity... "
267 quickCheckWith qc_args TC.prop_c1011_identity
268
269 putStr "\n"
270
271 -- putStrLn "\np. 80, (2.9)\n"
272
273 -- putStr "prop_c0120_identity2... "
274 -- quickCheckWith qc_args TF.prop_c0120_identity2
275
276 -- putStr "prop_c0102_identity2... "
277 -- quickCheckWith qc_args TF.prop_c0102_identity2
278
279 -- putStr "prop_c0111_identity... "
280 -- quickCheckWith qc_args TF.prop_c0111_identity
281
282 -- putStr "prop_c0210_identity2... "
283 -- quickCheckWith qc_args TF.prop_c0210_identity2
284
285 -- putStr "prop_c0201_identity2... "
286 -- quickCheckWith qc_args TF.prop_c0201_identity2
287
288 -- putStr "prop_c0300_identity3... "
289 -- quickCheckWith qc_args TF.prop_c0300_identity3
290
291 putStr "prop_interior_values_all_identical... "
292 quickCheckWith qc_args prop_interior_values_all_identical
293
294 putStr "prop_c_tilde_2100_rotation_correct... "
295 quickCheckWith qc_args prop_c_tilde_2100_rotation_correct
296
297 putStr "prop_x_rotation_doesnt_affect_front... "
298 quickCheckWith qc_args prop_x_rotation_doesnt_affect_front
299
300 putStr "prop_x_rotation_doesnt_affect_back... "
301 quickCheckWith qc_args prop_x_rotation_doesnt_affect_back
302
303 putStr "prop_y_rotation_doesnt_affect_left... "
304 quickCheckWith qc_args prop_y_rotation_doesnt_affect_left
305
306 putStr "prop_y_rotation_doesnt_affect_right... "
307 quickCheckWith qc_args prop_y_rotation_doesnt_affect_right
308
309 putStr "prop_z_rotation_doesnt_affect_top... "
310 quickCheckWith qc_args prop_z_rotation_doesnt_affect_top
311
312 putStr "prop_z_rotation_doesnt_affect_down... "
313 quickCheckWith qc_args prop_z_rotation_doesnt_affect_down
314
315 putStr "prop_c_tilde_2100_correct... "
316 quickCheckWith qc_args prop_c_tilde_2100_correct
317
318
319 putStrLn "\nEdge Incidence Tests\n"
320
321 putStr "prop_t0_shares_edge_with_t6... "
322 quickCheckWith qc_args prop_t0_shares_edge_with_t6
323
324 putStr "prop_t0_shares_edge_with_t1... "
325 quickCheckWith qc_args prop_t0_shares_edge_with_t1
326
327 putStr "prop_t0_shares_edge_with_t3... "
328 quickCheckWith qc_args prop_t0_shares_edge_with_t3
329
330 putStr "prop_t1_shares_edge_with_t2... "
331 quickCheckWith qc_args prop_t1_shares_edge_with_t2
332
333 putStr "prop_t1_shares_edge_with_t19... "
334 quickCheckWith qc_args prop_t1_shares_edge_with_t19
335
336 putStr "prop_t2_shares_edge_with_t3... "
337 quickCheckWith qc_args prop_t2_shares_edge_with_t3
338
339 putStr "prop_t2_shares_edge_with_t12... "
340 quickCheckWith qc_args prop_t2_shares_edge_with_t12
341
342 putStr "prop_t3_shares_edge_with_t21... "
343 quickCheckWith qc_args prop_t3_shares_edge_with_t21
344
345 putStr "prop_t4_shares_edge_with_t5... "
346 quickCheckWith qc_args prop_t4_shares_edge_with_t5
347
348 putStr "prop_t4_shares_edge_with_t7... "
349 quickCheckWith qc_args prop_t4_shares_edge_with_t7
350
351 putStr "prop_t4_shares_edge_with_t10... "
352 quickCheckWith qc_args prop_t4_shares_edge_with_t10
353
354 putStr "prop_t5_shares_edge_with_t6... "
355 quickCheckWith qc_args prop_t5_shares_edge_with_t6
356
357 putStr "prop_t5_shares_edge_with_t16... "
358 quickCheckWith qc_args prop_t5_shares_edge_with_t16
359
360 putStr "prop_t6_shares_edge_with_t7... "
361 quickCheckWith qc_args prop_t6_shares_edge_with_t7
362
363 putStr "prop_t7_shares_edge_with_t20... "
364 quickCheckWith qc_args prop_t7_shares_edge_with_t20
365
366 putStrLn "\nMisc Tests\n"
367
368 putStr "prop_factorial_greater... "
369 quickCheckWith qc_args prop_factorial_greater
370
371 putStrLn "\nTetrahedron Tests\n"
372
373 putStr "prop_b0_v0_always_unity... "
374 quickCheckWith qc_args prop_b0_v0_always_unity
375
376 putStr "prop_b0_v1_always_zero... "
377 quickCheckWith qc_args prop_b0_v1_always_zero
378
379 putStr "prop_b0_v2_always_zero... "
380 quickCheckWith qc_args prop_b0_v2_always_zero
381
382 putStr "prop_b0_v3_always_zero... "
383 quickCheckWith qc_args prop_b0_v3_always_zero
384
385 putStr "prop_b1_v1_always_unity... "
386 quickCheckWith qc_args prop_b1_v1_always_unity
387
388 putStr "prop_b1_v0_always_zero... "
389 quickCheckWith qc_args prop_b1_v0_always_zero
390
391 putStr "prop_b1_v2_always_zero... "
392 quickCheckWith qc_args prop_b1_v2_always_zero
393
394 putStr "prop_b1_v3_always_zero... "
395 quickCheckWith qc_args prop_b1_v3_always_zero
396
397 putStr "prop_b2_v2_always_unity... "
398 quickCheckWith qc_args prop_b2_v2_always_unity
399
400 putStr "prop_b2_v0_always_zero... "
401 quickCheckWith qc_args prop_b2_v0_always_zero
402
403 putStr "prop_b2_v1_always_zero... "
404 quickCheckWith qc_args prop_b2_v1_always_zero
405
406 putStr "prop_b2_v3_always_zero... "
407 quickCheckWith qc_args prop_b2_v3_always_zero
408
409 putStr "prop_b3_v3_always_unity... "
410 quickCheckWith qc_args prop_b3_v3_always_unity
411
412 putStr "prop_b3_v0_always_zero... "
413 quickCheckWith qc_args prop_b3_v0_always_zero
414
415 putStr "prop_b3_v1_always_zero... "
416 quickCheckWith qc_args prop_b3_v1_always_zero
417
418 putStr "prop_b3_v2_always_zero... "
419 quickCheckWith qc_args prop_b3_v2_always_zero
420
421 putStr "prop_swapping_vertices_doesnt_affect_coefficients1... "
422 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients1
423
424 putStr "prop_swapping_vertices_doesnt_affect_coefficients2... "
425 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients2
426
427 putStr "prop_swapping_vertices_doesnt_affect_coefficients3... "
428 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients3
429
430 putStr "prop_swapping_vertices_doesnt_affect_coefficients4... "
431 quickCheckWith qc_args prop_swapping_vertices_doesnt_affect_coefficients4
432
433 putStrLn "\np. 78, (2.4)\n"
434
435 putStr "prop_c3000_identity... "
436 quickCheckWith qc_args TT.prop_c3000_identity
437
438 putStr "prop_c2100_identity... "
439 quickCheckWith qc_args TT.prop_c2100_identity
440
441 putStr "prop_c1110_identity... "
442 quickCheckWith qc_args TT.prop_c1110_identity
443
444 putStrLn "\nCardinal Tests\n"
445
446 putStr "prop_ccwx_rotation_changes_direction... "
447 quickCheckWith qc_args prop_ccwx_rotation_changes_direction
448
449 putStr "prop_cwx_rotation_changes_direction... "
450 quickCheckWith qc_args prop_cwx_rotation_changes_direction
451
452 putStr "prop_ccwy_rotation_changes_direction... "
453 quickCheckWith qc_args prop_ccwy_rotation_changes_direction
454
455 putStr "prop_cwy_rotation_changes_direction... "
456 quickCheckWith qc_args prop_cwy_rotation_changes_direction
457
458 putStr "prop_ccwz_rotation_changes_direction... "
459 quickCheckWith qc_args prop_ccwz_rotation_changes_direction
460
461 putStr "prop_cwz_rotation_changes_direction... "
462 quickCheckWith qc_args prop_cwz_rotation_changes_direction
463
464 putStr "prop_ccwx_rotation_result_unique... "
465 quickCheckWith qc_args prop_ccwx_rotation_result_unique
466
467 putStr "prop_cwx_rotation_result_unique... "
468 quickCheckWith qc_args prop_cwx_rotation_result_unique
469
470 putStr "prop_ccwy_rotation_result_unique... "
471 quickCheckWith qc_args prop_ccwy_rotation_result_unique
472
473 putStr "prop_cwy_rotation_result_unique... "
474 quickCheckWith qc_args prop_cwy_rotation_result_unique
475
476 putStr "prop_ccwz_rotation_result_unique... "
477 quickCheckWith qc_args prop_ccwz_rotation_result_unique
478
479 putStr "prop_cwz_rotation_result_unique... "
480 quickCheckWith qc_args prop_cwz_rotation_result_unique
481
482 putStr "prop_four_cwx_is_identity... "
483 quickCheckWith qc_args prop_four_cwx_is_identity
484
485 putStr "prop_four_ccwx_is_identity... "
486 quickCheckWith qc_args prop_four_ccwx_is_identity
487
488 putStr "prop_four_cwy_is_identity... "
489 quickCheckWith qc_args prop_four_cwy_is_identity
490
491 putStr "prop_four_ccwy_is_identity... "
492 quickCheckWith qc_args prop_four_ccwy_is_identity
493
494 putStr "prop_four_cwz_is_identity... "
495 quickCheckWith qc_args prop_four_cwz_is_identity
496
497 putStr "prop_four_ccwz_is_identity... "
498 quickCheckWith qc_args prop_four_ccwz_is_identity
499
500 return ()