]> gitweb.michael.orlitzky.com - spline3.git/blob - test/TestSuite.hs
Add the rest of the tetrahedron and tests.
[spline3.git] / test / TestSuite.hs
1 import Test.HUnit
2 import Test.QuickCheck
3
4 import Tests.Cardinal
5 import Tests.Cube
6 import Tests.Face as TF
7 import Tests.Misc
8 import Tests.Tetrahedron as TT
9
10 -- The list of HUnit tests.
11 test_suite = TestList (concat [face_tests,
12 misc_tests,
13 tetrahedron_tests])
14
15 main :: IO ()
16 main = do
17 putStrLn "HUnit"
18 putStrLn "-----"
19 runTestTT test_suite
20 putStrLn ""
21 putStrLn "QuickCheck"
22 putStrLn "----------"
23 let qc_args = stdArgs { maxSuccess = 100,
24 maxDiscard = 500,
25 maxSize = 100 }
26
27 putStrLn "\nCube Tests\n"
28
29 putStr "prop_all_volumes_positive... "
30 quickCheckWith qc_args prop_all_volumes_positive
31
32 putStr "prop_tetrahedron0_volumes_exact... "
33 quickCheckWith qc_args prop_tetrahedron0_volumes_exact
34
35 putStr "prop_tetrahedron1_volumes_exact... "
36 quickCheckWith qc_args prop_tetrahedron1_volumes_exact
37
38 putStr "prop_tetrahedron2_volumes_exact... "
39 quickCheckWith qc_args prop_tetrahedron2_volumes_exact
40
41 putStr "prop_tetrahedron3_volumes_exact... "
42 quickCheckWith qc_args prop_tetrahedron3_volumes_exact
43
44 putStr "prop_tetrahedron4_volumes_exact... "
45 quickCheckWith qc_args prop_tetrahedron4_volumes_exact
46
47 putStr "prop_tetrahedron4_volumes_exact... "
48 quickCheckWith qc_args prop_tetrahedron4_volumes_exact
49
50 putStr "prop_tetrahedron5_volumes_exact... "
51 quickCheckWith qc_args prop_tetrahedron5_volumes_exact
52
53 putStr "prop_tetrahedron6_volumes_exact... "
54 quickCheckWith qc_args prop_tetrahedron6_volumes_exact
55
56 putStr "prop_tetrahedron7_volumes_exact... "
57 quickCheckWith qc_args prop_tetrahedron7_volumes_exact
58
59 putStr "prop_tetrahedron0_volumes_positive... "
60 quickCheckWith qc_args prop_tetrahedron0_volumes_positive
61
62 putStr "prop_tetrahedron1_volumes_positive... "
63 quickCheckWith qc_args prop_tetrahedron1_volumes_positive
64
65 putStr "prop_tetrahedron2_volumes_positive... "
66 quickCheckWith qc_args prop_tetrahedron2_volumes_positive
67
68 putStr "prop_tetrahedron3_volumes_positive... "
69 quickCheckWith qc_args prop_tetrahedron3_volumes_positive
70
71 putStr "prop_tetrahedron4_volumes_positive... "
72 quickCheckWith qc_args prop_tetrahedron4_volumes_positive
73
74 putStr "prop_tetrahedron5_volumes_positive... "
75 quickCheckWith qc_args prop_tetrahedron5_volumes_positive
76
77 putStr "prop_tetrahedron6_volumes_positive... "
78 quickCheckWith qc_args prop_tetrahedron6_volumes_positive
79
80 putStr "prop_tetrahedron7_volumes_positive... "
81 quickCheckWith qc_args prop_tetrahedron7_volumes_positive
82
83 putStr "prop_tetrahedron8_volumes_positive... "
84 quickCheckWith qc_args prop_tetrahedron8_volumes_positive
85
86 putStr "prop_tetrahedron9_volumes_positive... "
87 quickCheckWith qc_args prop_tetrahedron9_volumes_positive
88
89 putStr "prop_tetrahedron10_volumes_positive... "
90 quickCheckWith qc_args prop_tetrahedron10_volumes_positive
91
92 putStr "prop_tetrahedron11_volumes_positive... "
93 quickCheckWith qc_args prop_tetrahedron11_volumes_positive
94
95 putStr "prop_tetrahedron12_volumes_positive... "
96 quickCheckWith qc_args prop_tetrahedron12_volumes_positive
97
98 putStr "prop_tetrahedron13_volumes_positive... "
99 quickCheckWith qc_args prop_tetrahedron13_volumes_positive
100
101 putStr "prop_tetrahedron14_volumes_positive... "
102 quickCheckWith qc_args prop_tetrahedron14_volumes_positive
103
104 putStr "prop_tetrahedron15_volumes_positive... "
105 quickCheckWith qc_args prop_tetrahedron15_volumes_positive
106
107 putStr "prop_tetrahedron16_volumes_positive... "
108 quickCheckWith qc_args prop_tetrahedron16_volumes_positive
109
110 putStr "prop_tetrahedron17_volumes_positive... "
111 quickCheckWith qc_args prop_tetrahedron17_volumes_positive
112
113 putStr "prop_tetrahedron18_volumes_positive... "
114 quickCheckWith qc_args prop_tetrahedron18_volumes_positive
115
116 putStr "prop_tetrahedron19_volumes_positive... "
117 quickCheckWith qc_args prop_tetrahedron19_volumes_positive
118
119 putStr "prop_tetrahedron20_volumes_positive... "
120 quickCheckWith qc_args prop_tetrahedron20_volumes_positive
121
122 putStr "prop_tetrahedron21_volumes_positive... "
123 quickCheckWith qc_args prop_tetrahedron21_volumes_positive
124
125 putStr "prop_tetrahedron22_volumes_positive... "
126 quickCheckWith qc_args prop_tetrahedron22_volumes_positive
127
128 putStr "prop_tetrahedron23_volumes_positive... "
129 quickCheckWith qc_args prop_tetrahedron23_volumes_positive
130
131 putStr "prop_v0_all_equal... "
132 quickCheckWith qc_args prop_v0_all_equal
133
134 putStrLn "\nMisc Tests\n"
135
136 putStr "prop_factorial_greater... "
137 quickCheckWith qc_args prop_factorial_greater
138
139 putStrLn "\nTetrahedron Tests\n"
140
141 putStr "prop_b0_v0_always_unity... "
142 quickCheckWith qc_args prop_b0_v0_always_unity
143
144 putStr "prop_b0_v1_always_zero... "
145 quickCheckWith qc_args prop_b0_v1_always_zero
146
147 putStr "prop_b0_v2_always_zero... "
148 quickCheckWith qc_args prop_b0_v2_always_zero
149
150 putStr "prop_b0_v3_always_zero... "
151 quickCheckWith qc_args prop_b0_v3_always_zero
152
153 putStr "prop_b1_v1_always_unity... "
154 quickCheckWith qc_args prop_b1_v1_always_unity
155
156 putStr "prop_b1_v0_always_zero... "
157 quickCheckWith qc_args prop_b1_v0_always_zero
158
159 putStr "prop_b1_v2_always_zero... "
160 quickCheckWith qc_args prop_b1_v2_always_zero
161
162 putStr "prop_b1_v3_always_zero... "
163 quickCheckWith qc_args prop_b1_v3_always_zero
164
165 putStr "prop_b2_v2_always_unity... "
166 quickCheckWith qc_args prop_b2_v2_always_unity
167
168 putStr "prop_b2_v0_always_zero... "
169 quickCheckWith qc_args prop_b2_v0_always_zero
170
171 putStr "prop_b2_v1_always_zero... "
172 quickCheckWith qc_args prop_b2_v1_always_zero
173
174 putStr "prop_b2_v3_always_zero... "
175 quickCheckWith qc_args prop_b2_v3_always_zero
176
177 putStr "prop_b3_v3_always_unity... "
178 quickCheckWith qc_args prop_b3_v3_always_unity
179
180 putStr "prop_b3_v0_always_zero... "
181 quickCheckWith qc_args prop_b3_v0_always_zero
182
183 putStr "prop_b3_v1_always_zero... "
184 quickCheckWith qc_args prop_b3_v1_always_zero
185
186 putStr "prop_b3_v2_always_zero... "
187 quickCheckWith qc_args prop_b3_v2_always_zero
188
189 -- putStrLn "\np. 78, (2.4)\n"
190
191 -- putStr "prop_c3000_identity... "
192 -- quickCheckWith qc_args TT.prop_c3000_identity
193
194 -- putStr "prop_c2100_identity... "
195 -- quickCheckWith qc_args TT.prop_c2100_identity
196
197 -- putStr "prop_c1110_identity... "
198 -- quickCheckWith qc_args TT.prop_c1110_identity
199
200 -- putStrLn "\np. 78, (2.5)\n"
201
202 -- putStr "prop_cijk1_identity... "
203 -- quickCheckWith qc_args prop_cijk1_identity
204 -- putStrLn "\np. 79, (2.6)\n"
205
206 -- putStr "prop_c0120_identity1... "
207 -- quickCheckWith qc_args TF.prop_c0120_identity1
208
209 -- putStr "prop_c0210_identity1... "
210 -- quickCheckWith qc_args TF.prop_c0210_identity1
211
212 -- putStr "prop_c0300_identity1... "
213 -- quickCheckWith qc_args TF.prop_c0300_identity1
214
215 -- putStr "prop_c1110_identity... "
216 -- quickCheckWith qc_args TF.prop_c1110_identity
217
218 -- putStr "prop_c1200_identity1... "
219 -- quickCheckWith qc_args prop_c1200_identity1
220
221 -- putStr "prop_c2100_identity1... "
222 -- quickCheckWith qc_args TF.prop_c2100_identity1
223
224 -- putStrLn "\np. 79, (2.7)\n"
225
226 -- putStr "prop_c0102_identity1... "
227 -- quickCheckWith qc_args TF.prop_c0102_identity1
228
229 -- putStr "prop_c0201_identity1... "
230 -- quickCheckWith qc_args TF.prop_c0201_identity1
231
232 -- putStr "prop_c0300_identity2... "
233 -- quickCheckWith qc_args TF.prop_c0300_identity2
234
235 -- putStr "prop_c1101_identity... "
236 -- quickCheckWith qc_args TF.prop_c1101_identity
237
238 -- putStr "prop_c1200_identity2... "
239 -- quickCheckWith qc_args TF.prop_c1200_identity2
240
241 -- putStr "prop_c2100_identity2... "
242 -- quickCheckWith qc_args TF.prop_c2100_identity2
243
244 -- putStrLn "\np. 79, (2.8)\n"
245
246 -- putStr "prop_c3000_identity... "
247 -- quickCheckWith qc_args TF.prop_c3000_identity
248
249 -- putStr "prop_c2010_identity... "
250 -- quickCheckWith qc_args TF.prop_c2010_identity
251
252 -- putStr "prop_c2001_identity... "
253 -- quickCheckWith qc_args TF.prop_c2001_identity
254
255 -- putStr "prop_c1020_identity... "
256 -- quickCheckWith qc_args TF.prop_c1020_identity
257
258 -- putStr "prop_c1002_identity... "
259 -- quickCheckWith qc_args TF.prop_c1002_identity
260
261 -- putStr "prop_c1011_identity... "
262 -- quickCheckWith qc_args TF.prop_c1011_identity
263
264 -- putStrLn "\np. 80, (2.9)\n"
265
266 -- putStr "prop_c0120_identity2... "
267 -- quickCheckWith qc_args TF.prop_c0120_identity2
268
269 -- putStr "prop_c0102_identity2... "
270 -- quickCheckWith qc_args TF.prop_c0102_identity2
271
272 -- putStr "prop_c0111_identity... "
273 -- quickCheckWith qc_args TF.prop_c0111_identity
274
275 -- putStr "prop_c0210_identity2... "
276 -- quickCheckWith qc_args TF.prop_c0210_identity2
277
278 -- putStr "prop_c0201_identity2... "
279 -- quickCheckWith qc_args TF.prop_c0201_identity2
280
281 -- putStr "prop_c0300_identity3... "
282 -- quickCheckWith qc_args TF.prop_c0300_identity3
283
284 putStrLn "\nCardinal Tests\n"
285
286 putStr "prop_ccwx_rotation_changes_direction... "
287 quickCheckWith qc_args prop_ccwx_rotation_changes_direction
288
289 putStr "prop_cwx_rotation_changes_direction... "
290 quickCheckWith qc_args prop_cwx_rotation_changes_direction
291
292 putStr "prop_four_cwx_is_identity... "
293 quickCheckWith qc_args prop_four_cwx_is_identity
294
295 putStr "prop_four_ccwx_is_identity... "
296 quickCheckWith qc_args prop_four_ccwx_is_identity
297
298 putStr "prop_four_cwy_is_identity... "
299 quickCheckWith qc_args prop_four_cwy_is_identity
300
301 putStr "prop_four_ccwy_is_identity... "
302 quickCheckWith qc_args prop_four_ccwy_is_identity
303
304 putStr "prop_four_cwz_is_identity... "
305 quickCheckWith qc_args prop_four_cwz_is_identity
306
307 putStr "prop_four_ccwz_is_identity... "
308 quickCheckWith qc_args prop_four_ccwz_is_identity
309
310 return ()