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