]> gitweb.michael.orlitzky.com - spline3.git/blob - test/TestSuite.hs
Rework a bunch of Cube stuff and re-enable now-passing 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 putStr "prop_all_volumes_positive... "
28 quickCheckWith qc_args prop_all_volumes_positive
29
30 putStr "prop_all_volumes_exact... "
31 quickCheckWith qc_args prop_all_volumes_exact
32
33 putStr "prop_tetrahedron0_volumes_positive... "
34 quickCheckWith qc_args prop_tetrahedron0_volumes_positive
35
36 putStr "prop_tetrahedron1_volumes_positive... "
37 quickCheckWith qc_args prop_tetrahedron1_volumes_positive
38
39 putStr "prop_tetrahedron2_volumes_positive... "
40 quickCheckWith qc_args prop_tetrahedron2_volumes_positive
41
42 putStr "prop_tetrahedron3_volumes_positive... "
43 quickCheckWith qc_args prop_tetrahedron3_volumes_positive
44
45 putStr "prop_tetrahedron4_volumes_positive... "
46 quickCheckWith qc_args prop_tetrahedron4_volumes_positive
47
48 putStr "prop_tetrahedron5_volumes_positive... "
49 quickCheckWith qc_args prop_tetrahedron5_volumes_positive
50
51 putStr "prop_tetrahedron6_volumes_positive... "
52 quickCheckWith qc_args prop_tetrahedron6_volumes_positive
53
54 putStr "prop_tetrahedron7_volumes_positive... "
55 quickCheckWith qc_args prop_tetrahedron7_volumes_positive
56
57 putStr "prop_v0_all_equal... "
58 quickCheckWith qc_args prop_v0_all_equal
59
60 putStr "prop_factorial_greater... "
61 quickCheckWith qc_args prop_factorial_greater
62
63 putStr "prop_b0_v0_always_unity... "
64 quickCheckWith qc_args prop_b0_v0_always_unity
65
66 putStr "prop_b0_v1_always_zero... "
67 quickCheckWith qc_args prop_b0_v1_always_zero
68
69 putStr "prop_b0_v2_always_zero... "
70 quickCheckWith qc_args prop_b0_v2_always_zero
71
72 putStr "prop_b0_v3_always_zero... "
73 quickCheckWith qc_args prop_b0_v3_always_zero
74
75 putStr "prop_b1_v1_always_unity... "
76 quickCheckWith qc_args prop_b1_v1_always_unity
77
78 putStr "prop_b1_v0_always_zero... "
79 quickCheckWith qc_args prop_b1_v0_always_zero
80
81 putStr "prop_b1_v2_always_zero... "
82 quickCheckWith qc_args prop_b1_v2_always_zero
83
84 putStr "prop_b1_v3_always_zero... "
85 quickCheckWith qc_args prop_b1_v3_always_zero
86
87 putStr "prop_b2_v2_always_unity... "
88 quickCheckWith qc_args prop_b2_v2_always_unity
89
90 putStr "prop_b2_v0_always_zero... "
91 quickCheckWith qc_args prop_b2_v0_always_zero
92
93 putStr "prop_b2_v1_always_zero... "
94 quickCheckWith qc_args prop_b2_v1_always_zero
95
96 putStr "prop_b2_v3_always_zero... "
97 quickCheckWith qc_args prop_b2_v3_always_zero
98
99 putStr "prop_b3_v3_always_unity... "
100 quickCheckWith qc_args prop_b3_v3_always_unity
101
102 putStr "prop_b3_v0_always_zero... "
103 quickCheckWith qc_args prop_b3_v0_always_zero
104
105 putStr "prop_b3_v1_always_zero... "
106 quickCheckWith qc_args prop_b3_v1_always_zero
107
108 putStr "prop_b3_v2_always_zero... "
109 quickCheckWith qc_args prop_b3_v2_always_zero
110
111 -- putStrLn "\np. 78, (2.4)\n"
112
113 -- putStr "prop_c3000_identity... "
114 -- quickCheckWith qc_args TT.prop_c3000_identity
115
116 -- putStr "prop_c2100_identity... "
117 -- quickCheckWith qc_args TT.prop_c2100_identity
118
119 -- putStr "prop_c1110_identity... "
120 -- quickCheckWith qc_args TT.prop_c1110_identity
121
122 -- putStrLn "\np. 78, (2.5)\n"
123
124 -- putStr "prop_cijk1_identity... "
125 -- quickCheckWith qc_args prop_cijk1_identity
126 -- putStrLn "\np. 79, (2.6)\n"
127
128 -- putStr "prop_c0120_identity1... "
129 -- quickCheckWith qc_args TF.prop_c0120_identity1
130
131 -- putStr "prop_c0210_identity1... "
132 -- quickCheckWith qc_args TF.prop_c0210_identity1
133
134 -- putStr "prop_c0300_identity1... "
135 -- quickCheckWith qc_args TF.prop_c0300_identity1
136
137 -- putStr "prop_c1110_identity... "
138 -- quickCheckWith qc_args TF.prop_c1110_identity
139
140 -- putStr "prop_c1200_identity1... "
141 -- quickCheckWith qc_args prop_c1200_identity1
142
143 -- putStr "prop_c2100_identity1... "
144 -- quickCheckWith qc_args TF.prop_c2100_identity1
145
146 -- putStrLn "\np. 79, (2.7)\n"
147
148 -- putStr "prop_c0102_identity1... "
149 -- quickCheckWith qc_args TF.prop_c0102_identity1
150
151 -- putStr "prop_c0201_identity1... "
152 -- quickCheckWith qc_args TF.prop_c0201_identity1
153
154 -- putStr "prop_c0300_identity2... "
155 -- quickCheckWith qc_args TF.prop_c0300_identity2
156
157 -- putStr "prop_c1101_identity... "
158 -- quickCheckWith qc_args TF.prop_c1101_identity
159
160 -- putStr "prop_c1200_identity2... "
161 -- quickCheckWith qc_args TF.prop_c1200_identity2
162
163 -- putStr "prop_c2100_identity2... "
164 -- quickCheckWith qc_args TF.prop_c2100_identity2
165
166 -- putStrLn "\np. 79, (2.8)\n"
167
168 -- putStr "prop_c3000_identity... "
169 -- quickCheckWith qc_args TF.prop_c3000_identity
170
171 -- putStr "prop_c2010_identity... "
172 -- quickCheckWith qc_args TF.prop_c2010_identity
173
174 -- putStr "prop_c2001_identity... "
175 -- quickCheckWith qc_args TF.prop_c2001_identity
176
177 -- putStr "prop_c1020_identity... "
178 -- quickCheckWith qc_args TF.prop_c1020_identity
179
180 -- putStr "prop_c1002_identity... "
181 -- quickCheckWith qc_args TF.prop_c1002_identity
182
183 -- putStr "prop_c1011_identity... "
184 -- quickCheckWith qc_args TF.prop_c1011_identity
185
186 -- putStrLn "\np. 80, (2.9)\n"
187
188 -- putStr "prop_c0120_identity2... "
189 -- quickCheckWith qc_args TF.prop_c0120_identity2
190
191 -- putStr "prop_c0102_identity2... "
192 -- quickCheckWith qc_args TF.prop_c0102_identity2
193
194 -- putStr "prop_c0111_identity... "
195 -- quickCheckWith qc_args TF.prop_c0111_identity
196
197 -- putStr "prop_c0210_identity2... "
198 -- quickCheckWith qc_args TF.prop_c0210_identity2
199
200 -- putStr "prop_c0201_identity2... "
201 -- quickCheckWith qc_args TF.prop_c0201_identity2
202
203 -- putStr "prop_c0300_identity3... "
204 -- quickCheckWith qc_args TF.prop_c0300_identity3
205
206 putStr "prop_ccwx_rotation_changes_direction... "
207 quickCheckWith qc_args prop_ccwx_rotation_changes_direction
208
209 putStr "prop_cwx_rotation_changes_direction... "
210 quickCheckWith qc_args prop_cwx_rotation_changes_direction
211
212 return ()