]> gitweb.michael.orlitzky.com - spline3.git/blob - test/TestSuite.hs
Remove the 'reorient' function from Cube.
[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_v0_all_equal... "
96 quickCheckWith qc_args prop_v0_all_equal
97
98 putStrLn "\nMisc Tests\n"
99
100 putStr "prop_factorial_greater... "
101 quickCheckWith qc_args prop_factorial_greater
102
103 putStrLn "\nTetrahedron Tests\n"
104
105 putStr "prop_b0_v0_always_unity... "
106 quickCheckWith qc_args prop_b0_v0_always_unity
107
108 putStr "prop_b0_v1_always_zero... "
109 quickCheckWith qc_args prop_b0_v1_always_zero
110
111 putStr "prop_b0_v2_always_zero... "
112 quickCheckWith qc_args prop_b0_v2_always_zero
113
114 putStr "prop_b0_v3_always_zero... "
115 quickCheckWith qc_args prop_b0_v3_always_zero
116
117 putStr "prop_b1_v1_always_unity... "
118 quickCheckWith qc_args prop_b1_v1_always_unity
119
120 putStr "prop_b1_v0_always_zero... "
121 quickCheckWith qc_args prop_b1_v0_always_zero
122
123 putStr "prop_b1_v2_always_zero... "
124 quickCheckWith qc_args prop_b1_v2_always_zero
125
126 putStr "prop_b1_v3_always_zero... "
127 quickCheckWith qc_args prop_b1_v3_always_zero
128
129 putStr "prop_b2_v2_always_unity... "
130 quickCheckWith qc_args prop_b2_v2_always_unity
131
132 putStr "prop_b2_v0_always_zero... "
133 quickCheckWith qc_args prop_b2_v0_always_zero
134
135 putStr "prop_b2_v1_always_zero... "
136 quickCheckWith qc_args prop_b2_v1_always_zero
137
138 putStr "prop_b2_v3_always_zero... "
139 quickCheckWith qc_args prop_b2_v3_always_zero
140
141 putStr "prop_b3_v3_always_unity... "
142 quickCheckWith qc_args prop_b3_v3_always_unity
143
144 putStr "prop_b3_v0_always_zero... "
145 quickCheckWith qc_args prop_b3_v0_always_zero
146
147 putStr "prop_b3_v1_always_zero... "
148 quickCheckWith qc_args prop_b3_v1_always_zero
149
150 putStr "prop_b3_v2_always_zero... "
151 quickCheckWith qc_args prop_b3_v2_always_zero
152
153 -- putStrLn "\np. 78, (2.4)\n"
154
155 -- putStr "prop_c3000_identity... "
156 -- quickCheckWith qc_args TT.prop_c3000_identity
157
158 -- putStr "prop_c2100_identity... "
159 -- quickCheckWith qc_args TT.prop_c2100_identity
160
161 -- putStr "prop_c1110_identity... "
162 -- quickCheckWith qc_args TT.prop_c1110_identity
163
164 -- putStrLn "\np. 78, (2.5)\n"
165
166 -- putStr "prop_cijk1_identity... "
167 -- quickCheckWith qc_args prop_cijk1_identity
168 -- putStrLn "\np. 79, (2.6)\n"
169
170 -- putStr "prop_c0120_identity1... "
171 -- quickCheckWith qc_args TF.prop_c0120_identity1
172
173 -- putStr "prop_c0210_identity1... "
174 -- quickCheckWith qc_args TF.prop_c0210_identity1
175
176 -- putStr "prop_c0300_identity1... "
177 -- quickCheckWith qc_args TF.prop_c0300_identity1
178
179 -- putStr "prop_c1110_identity... "
180 -- quickCheckWith qc_args TF.prop_c1110_identity
181
182 -- putStr "prop_c1200_identity1... "
183 -- quickCheckWith qc_args prop_c1200_identity1
184
185 -- putStr "prop_c2100_identity1... "
186 -- quickCheckWith qc_args TF.prop_c2100_identity1
187
188 -- putStrLn "\np. 79, (2.7)\n"
189
190 -- putStr "prop_c0102_identity1... "
191 -- quickCheckWith qc_args TF.prop_c0102_identity1
192
193 -- putStr "prop_c0201_identity1... "
194 -- quickCheckWith qc_args TF.prop_c0201_identity1
195
196 -- putStr "prop_c0300_identity2... "
197 -- quickCheckWith qc_args TF.prop_c0300_identity2
198
199 -- putStr "prop_c1101_identity... "
200 -- quickCheckWith qc_args TF.prop_c1101_identity
201
202 -- putStr "prop_c1200_identity2... "
203 -- quickCheckWith qc_args TF.prop_c1200_identity2
204
205 -- putStr "prop_c2100_identity2... "
206 -- quickCheckWith qc_args TF.prop_c2100_identity2
207
208 -- putStrLn "\np. 79, (2.8)\n"
209
210 -- putStr "prop_c3000_identity... "
211 -- quickCheckWith qc_args TF.prop_c3000_identity
212
213 -- putStr "prop_c2010_identity... "
214 -- quickCheckWith qc_args TF.prop_c2010_identity
215
216 -- putStr "prop_c2001_identity... "
217 -- quickCheckWith qc_args TF.prop_c2001_identity
218
219 -- putStr "prop_c1020_identity... "
220 -- quickCheckWith qc_args TF.prop_c1020_identity
221
222 -- putStr "prop_c1002_identity... "
223 -- quickCheckWith qc_args TF.prop_c1002_identity
224
225 -- putStr "prop_c1011_identity... "
226 -- quickCheckWith qc_args TF.prop_c1011_identity
227
228 -- putStrLn "\np. 80, (2.9)\n"
229
230 -- putStr "prop_c0120_identity2... "
231 -- quickCheckWith qc_args TF.prop_c0120_identity2
232
233 -- putStr "prop_c0102_identity2... "
234 -- quickCheckWith qc_args TF.prop_c0102_identity2
235
236 -- putStr "prop_c0111_identity... "
237 -- quickCheckWith qc_args TF.prop_c0111_identity
238
239 -- putStr "prop_c0210_identity2... "
240 -- quickCheckWith qc_args TF.prop_c0210_identity2
241
242 -- putStr "prop_c0201_identity2... "
243 -- quickCheckWith qc_args TF.prop_c0201_identity2
244
245 -- putStr "prop_c0300_identity3... "
246 -- quickCheckWith qc_args TF.prop_c0300_identity3
247
248 putStrLn "\nCardinal Tests\n"
249
250 putStr "prop_ccwx_rotation_changes_direction... "
251 quickCheckWith qc_args prop_ccwx_rotation_changes_direction
252
253 putStr "prop_cwx_rotation_changes_direction... "
254 quickCheckWith qc_args prop_cwx_rotation_changes_direction
255
256 putStr "prop_four_cwx_is_identity... "
257 quickCheckWith qc_args prop_four_cwx_is_identity
258
259 putStr "prop_four_ccwx_is_identity... "
260 quickCheckWith qc_args prop_four_ccwx_is_identity
261
262 putStr "prop_four_cwy_is_identity... "
263 quickCheckWith qc_args prop_four_cwy_is_identity
264
265 putStr "prop_four_ccwy_is_identity... "
266 quickCheckWith qc_args prop_four_ccwy_is_identity
267
268 putStr "prop_four_cwz_is_identity... "
269 quickCheckWith qc_args prop_four_cwz_is_identity
270
271 putStr "prop_four_ccwz_is_identity... "
272 quickCheckWith qc_args prop_four_ccwz_is_identity
273
274 return ()