]> gitweb.michael.orlitzky.com - spline3.git/blob - test/TestSuite.hs
Add the prop_interior_values_all_identical test.
[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_tetrahedron0_volumes_positive... "
66 quickCheckWith qc_args prop_tetrahedron0_volumes_positive
67
68 putStr "prop_tetrahedron1_volumes_positive... "
69 quickCheckWith qc_args prop_tetrahedron1_volumes_positive
70
71 putStr "prop_tetrahedron2_volumes_positive... "
72 quickCheckWith qc_args prop_tetrahedron2_volumes_positive
73
74 putStr "prop_tetrahedron3_volumes_positive... "
75 quickCheckWith qc_args prop_tetrahedron3_volumes_positive
76
77 putStr "prop_tetrahedron4_volumes_positive... "
78 quickCheckWith qc_args prop_tetrahedron4_volumes_positive
79
80 putStr "prop_tetrahedron5_volumes_positive... "
81 quickCheckWith qc_args prop_tetrahedron5_volumes_positive
82
83 putStr "prop_tetrahedron6_volumes_positive... "
84 quickCheckWith qc_args prop_tetrahedron6_volumes_positive
85
86 putStr "prop_tetrahedron7_volumes_positive... "
87 quickCheckWith qc_args prop_tetrahedron7_volumes_positive
88
89 putStr "prop_tetrahedron8_volumes_positive... "
90 quickCheckWith qc_args prop_tetrahedron8_volumes_positive
91
92 putStr "prop_tetrahedron9_volumes_positive... "
93 quickCheckWith qc_args prop_tetrahedron9_volumes_positive
94
95 putStr "prop_tetrahedron10_volumes_positive... "
96 quickCheckWith qc_args prop_tetrahedron10_volumes_positive
97
98 putStr "prop_tetrahedron11_volumes_positive... "
99 quickCheckWith qc_args prop_tetrahedron11_volumes_positive
100
101 putStr "prop_tetrahedron12_volumes_positive... "
102 quickCheckWith qc_args prop_tetrahedron12_volumes_positive
103
104 putStr "prop_tetrahedron13_volumes_positive... "
105 quickCheckWith qc_args prop_tetrahedron13_volumes_positive
106
107 putStr "prop_tetrahedron14_volumes_positive... "
108 quickCheckWith qc_args prop_tetrahedron14_volumes_positive
109
110 putStr "prop_tetrahedron15_volumes_positive... "
111 quickCheckWith qc_args prop_tetrahedron15_volumes_positive
112
113 putStr "prop_tetrahedron16_volumes_positive... "
114 quickCheckWith qc_args prop_tetrahedron16_volumes_positive
115
116 putStr "prop_tetrahedron17_volumes_positive... "
117 quickCheckWith qc_args prop_tetrahedron17_volumes_positive
118
119 putStr "prop_tetrahedron18_volumes_positive... "
120 quickCheckWith qc_args prop_tetrahedron18_volumes_positive
121
122 putStr "prop_tetrahedron19_volumes_positive... "
123 quickCheckWith qc_args prop_tetrahedron19_volumes_positive
124
125 putStr "prop_tetrahedron20_volumes_positive... "
126 quickCheckWith qc_args prop_tetrahedron20_volumes_positive
127
128 putStr "prop_tetrahedron21_volumes_positive... "
129 quickCheckWith qc_args prop_tetrahedron21_volumes_positive
130
131 putStr "prop_tetrahedron22_volumes_positive... "
132 quickCheckWith qc_args prop_tetrahedron22_volumes_positive
133
134 putStr "prop_tetrahedron23_volumes_positive... "
135 quickCheckWith qc_args prop_tetrahedron23_volumes_positive
136
137 putStr "prop_v0_all_equal... "
138 quickCheckWith qc_args prop_v0_all_equal
139
140 -- putStrLn "\np. 78, (2.5)\n"
141
142 -- putStr "prop_cijk1_identity... "
143 -- quickCheckWith qc_args prop_cijk1_identity
144
145
146 -- putStrLn "\np. 79, (2.6)\n"
147
148 putStr "prop_c0120_identity1... "
149 quickCheckWith qc_args TC.prop_c0120_identity1
150
151 putStr "prop_c0120_identity2... "
152 quickCheckWith qc_args TC.prop_c0120_identity2
153
154 putStr "prop_c0120_identity3... "
155 quickCheckWith qc_args TC.prop_c0120_identity3
156
157 putStr "prop_c0120_identity4... "
158 quickCheckWith qc_args TC.prop_c0120_identity4
159
160 putStr "prop_c0120_identity5... "
161 quickCheckWith qc_args TC.prop_c0120_identity5
162
163 putStr "prop_c0120_identity6... "
164 quickCheckWith qc_args TC.prop_c0120_identity6
165
166 putStr "prop_c0210_identity1... "
167 quickCheckWith qc_args TC.prop_c0210_identity1
168
169 putStr "prop_c0300_identity1... "
170 quickCheckWith qc_args TC.prop_c0300_identity1
171
172 putStr "prop_c1110_identity... "
173 quickCheckWith qc_args TC.prop_c1110_identity
174
175 putStr "prop_c1200_identity1... "
176 quickCheckWith qc_args TC.prop_c1200_identity1
177
178 putStr "prop_c2100_identity1... "
179 quickCheckWith qc_args TC.prop_c2100_identity1
180
181 putStrLn "\np. 79, (2.7)\n"
182
183 putStr "prop_c0102_identity1... "
184 quickCheckWith qc_args TC.prop_c0102_identity1
185
186 putStr "prop_c0201_identity1... "
187 quickCheckWith qc_args TC.prop_c0201_identity1
188
189 putStr "prop_c0300_identity2... "
190 quickCheckWith qc_args TC.prop_c0300_identity2
191
192 putStr "prop_c1101_identity... "
193 quickCheckWith qc_args TC.prop_c1101_identity
194
195 putStr "prop_c1200_identity2... "
196 quickCheckWith qc_args TC.prop_c1200_identity2
197
198 putStr "prop_c2100_identity2... "
199 quickCheckWith qc_args TC.prop_c2100_identity2
200
201 putStrLn "\np. 79, (2.8)\n"
202
203 putStr "prop_c3000_identity... "
204 quickCheckWith qc_args TC.prop_c3000_identity
205
206 -- putStr "prop_c2010_identity... "
207 -- quickCheckWith qc_args TC.prop_c2010_identity
208
209 -- putStr "prop_c2001_identity... "
210 -- quickCheckWith qc_args TC.prop_c2001_identity
211
212 -- putStr "prop_c1020_identity... "
213 -- quickCheckWith qc_args TC.prop_c1020_identity
214
215 -- putStr "prop_c1002_identity... "
216 -- quickCheckWith qc_args TC.prop_c1002_identity
217
218 -- putStr "prop_c1011_identity... "
219 -- quickCheckWith qc_args TC.prop_c1011_identity
220
221 -- putStrLn "\np. 80, (2.9)\n"
222
223 -- putStr "prop_c0120_identity2... "
224 -- quickCheckWith qc_args TF.prop_c0120_identity2
225
226 -- putStr "prop_c0102_identity2... "
227 -- quickCheckWith qc_args TF.prop_c0102_identity2
228
229 -- putStr "prop_c0111_identity... "
230 -- quickCheckWith qc_args TF.prop_c0111_identity
231
232 -- putStr "prop_c0210_identity2... "
233 -- quickCheckWith qc_args TF.prop_c0210_identity2
234
235 -- putStr "prop_c0201_identity2... "
236 -- quickCheckWith qc_args TF.prop_c0201_identity2
237
238 -- putStr "prop_c0300_identity3... "
239 -- quickCheckWith qc_args TF.prop_c0300_identity3
240
241 putStrLn "prop_interior_values_all_identical... "
242 quickCheckWith qc_args prop_interior_values_all_identical
243
244 putStrLn "prop_c_tilde_2100_rotation_correct... "
245 quickCheckWith qc_args prop_c_tilde_2100_rotation_correct
246
247 putStrLn "prop_c_tilde_2100_correct... "
248 quickCheckWith qc_args prop_c_tilde_2100_correct
249
250
251 putStrLn "\nEdge Incidence Tests\n"
252
253 putStr "prop_t0_shares_edge_with_t6... "
254 quickCheckWith qc_args prop_t0_shares_edge_with_t6
255
256 putStr "prop_t0_shares_edge_with_t1... "
257 quickCheckWith qc_args prop_t0_shares_edge_with_t1
258
259 putStr "prop_t0_shares_edge_with_t3... "
260 quickCheckWith qc_args prop_t0_shares_edge_with_t3
261
262 putStr "prop_t1_shares_edge_with_t2... "
263 quickCheckWith qc_args prop_t1_shares_edge_with_t2
264
265 putStr "prop_t1_shares_edge_with_t19... "
266 quickCheckWith qc_args prop_t1_shares_edge_with_t19
267
268 putStr "prop_t2_shares_edge_with_t3... "
269 quickCheckWith qc_args prop_t2_shares_edge_with_t3
270
271 putStr "prop_t2_shares_edge_with_t12... "
272 quickCheckWith qc_args prop_t2_shares_edge_with_t12
273
274 putStr "prop_t3_shares_edge_with_t21... "
275 quickCheckWith qc_args prop_t3_shares_edge_with_t21
276
277 putStr "prop_t4_shares_edge_with_t5... "
278 quickCheckWith qc_args prop_t4_shares_edge_with_t5
279
280 putStr "prop_t4_shares_edge_with_t7... "
281 quickCheckWith qc_args prop_t4_shares_edge_with_t7
282
283 putStr "prop_t4_shares_edge_with_t10... "
284 quickCheckWith qc_args prop_t4_shares_edge_with_t10
285
286 putStr "prop_t5_shares_edge_with_t6... "
287 quickCheckWith qc_args prop_t5_shares_edge_with_t6
288
289 putStr "prop_t5_shares_edge_with_t16... "
290 quickCheckWith qc_args prop_t5_shares_edge_with_t16
291
292 putStr "prop_t6_shares_edge_with_t7... "
293 quickCheckWith qc_args prop_t6_shares_edge_with_t7
294
295 putStr "prop_t7_shares_edge_with_t20... "
296 quickCheckWith qc_args prop_t7_shares_edge_with_t20
297
298 putStrLn "\nMisc Tests\n"
299
300 putStr "prop_factorial_greater... "
301 quickCheckWith qc_args prop_factorial_greater
302
303 putStrLn "\nTetrahedron Tests\n"
304
305 putStr "prop_b0_v0_always_unity... "
306 quickCheckWith qc_args prop_b0_v0_always_unity
307
308 putStr "prop_b0_v1_always_zero... "
309 quickCheckWith qc_args prop_b0_v1_always_zero
310
311 putStr "prop_b0_v2_always_zero... "
312 quickCheckWith qc_args prop_b0_v2_always_zero
313
314 putStr "prop_b0_v3_always_zero... "
315 quickCheckWith qc_args prop_b0_v3_always_zero
316
317 putStr "prop_b1_v1_always_unity... "
318 quickCheckWith qc_args prop_b1_v1_always_unity
319
320 putStr "prop_b1_v0_always_zero... "
321 quickCheckWith qc_args prop_b1_v0_always_zero
322
323 putStr "prop_b1_v2_always_zero... "
324 quickCheckWith qc_args prop_b1_v2_always_zero
325
326 putStr "prop_b1_v3_always_zero... "
327 quickCheckWith qc_args prop_b1_v3_always_zero
328
329 putStr "prop_b2_v2_always_unity... "
330 quickCheckWith qc_args prop_b2_v2_always_unity
331
332 putStr "prop_b2_v0_always_zero... "
333 quickCheckWith qc_args prop_b2_v0_always_zero
334
335 putStr "prop_b2_v1_always_zero... "
336 quickCheckWith qc_args prop_b2_v1_always_zero
337
338 putStr "prop_b2_v3_always_zero... "
339 quickCheckWith qc_args prop_b2_v3_always_zero
340
341 putStr "prop_b3_v3_always_unity... "
342 quickCheckWith qc_args prop_b3_v3_always_unity
343
344 putStr "prop_b3_v0_always_zero... "
345 quickCheckWith qc_args prop_b3_v0_always_zero
346
347 putStr "prop_b3_v1_always_zero... "
348 quickCheckWith qc_args prop_b3_v1_always_zero
349
350 putStr "prop_b3_v2_always_zero... "
351 quickCheckWith qc_args prop_b3_v2_always_zero
352
353 putStrLn "\np. 78, (2.4)\n"
354
355 putStr "prop_c3000_identity... "
356 quickCheckWith qc_args TT.prop_c3000_identity
357
358 putStr "prop_c2100_identity... "
359 quickCheckWith qc_args TT.prop_c2100_identity
360
361 putStr "prop_c1110_identity... "
362 quickCheckWith qc_args TT.prop_c1110_identity
363
364
365 putStrLn "\nCardinal Tests\n"
366
367 putStr "prop_ccwx_rotation_changes_direction... "
368 quickCheckWith qc_args prop_ccwx_rotation_changes_direction
369
370 putStr "prop_cwx_rotation_changes_direction... "
371 quickCheckWith qc_args prop_cwx_rotation_changes_direction
372
373 putStr "prop_ccwy_rotation_changes_direction... "
374 quickCheckWith qc_args prop_ccwy_rotation_changes_direction
375
376 putStr "prop_cwy_rotation_changes_direction... "
377 quickCheckWith qc_args prop_cwy_rotation_changes_direction
378
379 putStr "prop_ccwz_rotation_changes_direction... "
380 quickCheckWith qc_args prop_ccwz_rotation_changes_direction
381
382 putStr "prop_cwz_rotation_changes_direction... "
383 quickCheckWith qc_args prop_cwz_rotation_changes_direction
384
385 putStr "prop_ccwx_rotation_result_unique... "
386 quickCheckWith qc_args prop_ccwx_rotation_result_unique
387
388 putStr "prop_cwx_rotation_result_unique... "
389 quickCheckWith qc_args prop_cwx_rotation_result_unique
390
391 putStr "prop_ccwy_rotation_result_unique... "
392 quickCheckWith qc_args prop_ccwy_rotation_result_unique
393
394 putStr "prop_cwy_rotation_result_unique... "
395 quickCheckWith qc_args prop_cwy_rotation_result_unique
396
397 putStr "prop_ccwz_rotation_result_unique... "
398 quickCheckWith qc_args prop_ccwz_rotation_result_unique
399
400 putStr "prop_cwz_rotation_result_unique... "
401 quickCheckWith qc_args prop_cwz_rotation_result_unique
402
403 putStr "prop_four_cwx_is_identity... "
404 quickCheckWith qc_args prop_four_cwx_is_identity
405
406 putStr "prop_four_ccwx_is_identity... "
407 quickCheckWith qc_args prop_four_ccwx_is_identity
408
409 putStr "prop_four_cwy_is_identity... "
410 quickCheckWith qc_args prop_four_cwy_is_identity
411
412 putStr "prop_four_ccwy_is_identity... "
413 quickCheckWith qc_args prop_four_ccwy_is_identity
414
415 putStr "prop_four_cwz_is_identity... "
416 quickCheckWith qc_args prop_four_cwz_is_identity
417
418 putStr "prop_four_ccwz_is_identity... "
419 quickCheckWith qc_args prop_four_ccwz_is_identity
420
421 return ()