1 | /*
|
---|
2 | * ShapeUnittest.cpp
|
---|
3 | *
|
---|
4 | * Created on: Jun 18, 2010
|
---|
5 | * Author: crueger
|
---|
6 | */
|
---|
7 |
|
---|
8 | // include config.h
|
---|
9 | #ifdef HAVE_CONFIG_H
|
---|
10 | #include <config.h>
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | #include "ShapeUnittest.hpp"
|
---|
14 |
|
---|
15 | #include <cppunit/CompilerOutputter.h>
|
---|
16 | #include <cppunit/extensions/TestFactoryRegistry.h>
|
---|
17 | #include <cppunit/ui/text/TestRunner.h>
|
---|
18 |
|
---|
19 | #include <cmath>
|
---|
20 |
|
---|
21 | #ifdef HAVE_TESTRUNNER
|
---|
22 | #include "UnitTestMain.hpp"
|
---|
23 | #endif /*HAVE_TESTRUNNER*/
|
---|
24 |
|
---|
25 | #include "LinearAlgebra/Vector.hpp"
|
---|
26 | #include "Shapes/Shape.hpp"
|
---|
27 |
|
---|
28 | #include "Shapes/BaseShapes.hpp"
|
---|
29 |
|
---|
30 | // Registers the fixture into the 'registry'
|
---|
31 | CPPUNIT_TEST_SUITE_REGISTRATION( ShapeUnittest );
|
---|
32 |
|
---|
33 | void ShapeUnittest::setUp()
|
---|
34 | {
|
---|
35 | v000 = 0*e1+0*e2+0*e3;
|
---|
36 | v100 = 1*e1+0*e2+0*e3;
|
---|
37 | v200 = -1*e1+0*e2+0*e3;
|
---|
38 | v010 = 0*e1+1*e2+0*e3;
|
---|
39 | v110 = 1*e1+1*e2+0*e3;
|
---|
40 | v210 = -1*e1+1*e2+0*e3;
|
---|
41 | v020 = 0*e1-1*e2+0*e3;
|
---|
42 | v120 = 1*e1-1*e2+0*e3;
|
---|
43 | v220 = -1*e1-1*e2+0*e3;
|
---|
44 | v001 = 0*e1+0*e2+1*e3;
|
---|
45 | v101 = 1*e1+0*e2+1*e3;
|
---|
46 | v201 = -1*e1+0*e2+1*e3;
|
---|
47 | v011 = 0*e1+1*e2+1*e3;
|
---|
48 | v111 = 1*e1+1*e2+1*e3;
|
---|
49 | v211 = -1*e1+1*e2+1*e3;
|
---|
50 | v021 = 0*e1-1*e2+1*e3;
|
---|
51 | v121 = 1*e1-1*e2+1*e3;
|
---|
52 | v221 = -1*e1-1*e2+1*e3;
|
---|
53 | v002 = 0*e1+0*e2-1*e3;
|
---|
54 | v102 = 1*e1+0*e2-1*e3;
|
---|
55 | v202 = -1*e1+0*e2-1*e3;
|
---|
56 | v012 = 0*e1+1*e2-1*e3;
|
---|
57 | v112 = 1*e1+1*e2-1*e3;
|
---|
58 | v212 = -1*e1+1*e2-1*e3;
|
---|
59 | v022 = 0*e1-1*e2-1*e3;
|
---|
60 | v122 = 1*e1-1*e2-1*e3;
|
---|
61 | v222 = -1*e1-1*e2-1*e3;
|
---|
62 | }
|
---|
63 |
|
---|
64 | void ShapeUnittest::tearDown()
|
---|
65 | {}
|
---|
66 |
|
---|
67 |
|
---|
68 | void ShapeUnittest::baseShapesTest(){
|
---|
69 | CPPUNIT_ASSERT(!Nowhere().isInside(v000));
|
---|
70 | CPPUNIT_ASSERT(!Nowhere().isInside(v100));
|
---|
71 | CPPUNIT_ASSERT(!Nowhere().isInside(v200));
|
---|
72 | CPPUNIT_ASSERT(!Nowhere().isInside(v010));
|
---|
73 | CPPUNIT_ASSERT(!Nowhere().isInside(v110));
|
---|
74 | CPPUNIT_ASSERT(!Nowhere().isInside(v210));
|
---|
75 | CPPUNIT_ASSERT(!Nowhere().isInside(v020));
|
---|
76 | CPPUNIT_ASSERT(!Nowhere().isInside(v120));
|
---|
77 | CPPUNIT_ASSERT(!Nowhere().isInside(v220));
|
---|
78 | CPPUNIT_ASSERT(!Nowhere().isInside(v001));
|
---|
79 | CPPUNIT_ASSERT(!Nowhere().isInside(v101));
|
---|
80 | CPPUNIT_ASSERT(!Nowhere().isInside(v201));
|
---|
81 | CPPUNIT_ASSERT(!Nowhere().isInside(v011));
|
---|
82 | CPPUNIT_ASSERT(!Nowhere().isInside(v111));
|
---|
83 | CPPUNIT_ASSERT(!Nowhere().isInside(v211));
|
---|
84 | CPPUNIT_ASSERT(!Nowhere().isInside(v021));
|
---|
85 | CPPUNIT_ASSERT(!Nowhere().isInside(v121));
|
---|
86 | CPPUNIT_ASSERT(!Nowhere().isInside(v221));
|
---|
87 | CPPUNIT_ASSERT(!Nowhere().isInside(v002));
|
---|
88 | CPPUNIT_ASSERT(!Nowhere().isInside(v102));
|
---|
89 | CPPUNIT_ASSERT(!Nowhere().isInside(v202));
|
---|
90 | CPPUNIT_ASSERT(!Nowhere().isInside(v012));
|
---|
91 | CPPUNIT_ASSERT(!Nowhere().isInside(v112));
|
---|
92 | CPPUNIT_ASSERT(!Nowhere().isInside(v212));
|
---|
93 | CPPUNIT_ASSERT(!Nowhere().isInside(v022));
|
---|
94 | CPPUNIT_ASSERT(!Nowhere().isInside(v122));
|
---|
95 | CPPUNIT_ASSERT(!Nowhere().isInside(v222));
|
---|
96 |
|
---|
97 | CPPUNIT_ASSERT(Everywhere().isInside(v000));
|
---|
98 | CPPUNIT_ASSERT(Everywhere().isInside(v100));
|
---|
99 | CPPUNIT_ASSERT(Everywhere().isInside(v200));
|
---|
100 | CPPUNIT_ASSERT(Everywhere().isInside(v010));
|
---|
101 | CPPUNIT_ASSERT(Everywhere().isInside(v110));
|
---|
102 | CPPUNIT_ASSERT(Everywhere().isInside(v210));
|
---|
103 | CPPUNIT_ASSERT(Everywhere().isInside(v020));
|
---|
104 | CPPUNIT_ASSERT(Everywhere().isInside(v120));
|
---|
105 | CPPUNIT_ASSERT(Everywhere().isInside(v220));
|
---|
106 | CPPUNIT_ASSERT(Everywhere().isInside(v001));
|
---|
107 | CPPUNIT_ASSERT(Everywhere().isInside(v101));
|
---|
108 | CPPUNIT_ASSERT(Everywhere().isInside(v201));
|
---|
109 | CPPUNIT_ASSERT(Everywhere().isInside(v011));
|
---|
110 | CPPUNIT_ASSERT(Everywhere().isInside(v111));
|
---|
111 | CPPUNIT_ASSERT(Everywhere().isInside(v211));
|
---|
112 | CPPUNIT_ASSERT(Everywhere().isInside(v021));
|
---|
113 | CPPUNIT_ASSERT(Everywhere().isInside(v121));
|
---|
114 | CPPUNIT_ASSERT(Everywhere().isInside(v221));
|
---|
115 | CPPUNIT_ASSERT(Everywhere().isInside(v002));
|
---|
116 | CPPUNIT_ASSERT(Everywhere().isInside(v102));
|
---|
117 | CPPUNIT_ASSERT(Everywhere().isInside(v202));
|
---|
118 | CPPUNIT_ASSERT(Everywhere().isInside(v012));
|
---|
119 | CPPUNIT_ASSERT(Everywhere().isInside(v112));
|
---|
120 | CPPUNIT_ASSERT(Everywhere().isInside(v212));
|
---|
121 | CPPUNIT_ASSERT(Everywhere().isInside(v022));
|
---|
122 | CPPUNIT_ASSERT(Everywhere().isInside(v122));
|
---|
123 | CPPUNIT_ASSERT(Everywhere().isInside(v222));
|
---|
124 | }
|
---|
125 |
|
---|
126 | void ShapeUnittest::assignmentTest(){
|
---|
127 | Shape s1 = Nowhere();
|
---|
128 | s1 = Everywhere();
|
---|
129 |
|
---|
130 | CPPUNIT_ASSERT(s1.isInside(v000));
|
---|
131 | CPPUNIT_ASSERT(s1.isInside(v100));
|
---|
132 | CPPUNIT_ASSERT(s1.isInside(v200));
|
---|
133 | CPPUNIT_ASSERT(s1.isInside(v010));
|
---|
134 | CPPUNIT_ASSERT(s1.isInside(v110));
|
---|
135 | CPPUNIT_ASSERT(s1.isInside(v210));
|
---|
136 | CPPUNIT_ASSERT(s1.isInside(v020));
|
---|
137 | CPPUNIT_ASSERT(s1.isInside(v120));
|
---|
138 | CPPUNIT_ASSERT(s1.isInside(v220));
|
---|
139 | CPPUNIT_ASSERT(s1.isInside(v001));
|
---|
140 | CPPUNIT_ASSERT(s1.isInside(v101));
|
---|
141 | CPPUNIT_ASSERT(s1.isInside(v201));
|
---|
142 | CPPUNIT_ASSERT(s1.isInside(v011));
|
---|
143 | CPPUNIT_ASSERT(s1.isInside(v111));
|
---|
144 | CPPUNIT_ASSERT(s1.isInside(v211));
|
---|
145 | CPPUNIT_ASSERT(s1.isInside(v021));
|
---|
146 | CPPUNIT_ASSERT(s1.isInside(v121));
|
---|
147 | CPPUNIT_ASSERT(s1.isInside(v221));
|
---|
148 | CPPUNIT_ASSERT(s1.isInside(v002));
|
---|
149 | CPPUNIT_ASSERT(s1.isInside(v102));
|
---|
150 | CPPUNIT_ASSERT(s1.isInside(v202));
|
---|
151 | CPPUNIT_ASSERT(s1.isInside(v012));
|
---|
152 | CPPUNIT_ASSERT(s1.isInside(v112));
|
---|
153 | CPPUNIT_ASSERT(s1.isInside(v212));
|
---|
154 | CPPUNIT_ASSERT(s1.isInside(v022));
|
---|
155 | CPPUNIT_ASSERT(s1.isInside(v122));
|
---|
156 | CPPUNIT_ASSERT(s1.isInside(v222));
|
---|
157 |
|
---|
158 | Shape s2 = Everywhere();
|
---|
159 | s2 = Nowhere();
|
---|
160 |
|
---|
161 | CPPUNIT_ASSERT(!s2.isInside(v000));
|
---|
162 | CPPUNIT_ASSERT(!s2.isInside(v100));
|
---|
163 | CPPUNIT_ASSERT(!s2.isInside(v200));
|
---|
164 | CPPUNIT_ASSERT(!s2.isInside(v010));
|
---|
165 | CPPUNIT_ASSERT(!s2.isInside(v110));
|
---|
166 | CPPUNIT_ASSERT(!s2.isInside(v210));
|
---|
167 | CPPUNIT_ASSERT(!s2.isInside(v020));
|
---|
168 | CPPUNIT_ASSERT(!s2.isInside(v120));
|
---|
169 | CPPUNIT_ASSERT(!s2.isInside(v220));
|
---|
170 | CPPUNIT_ASSERT(!s2.isInside(v001));
|
---|
171 | CPPUNIT_ASSERT(!s2.isInside(v101));
|
---|
172 | CPPUNIT_ASSERT(!s2.isInside(v201));
|
---|
173 | CPPUNIT_ASSERT(!s2.isInside(v011));
|
---|
174 | CPPUNIT_ASSERT(!s2.isInside(v111));
|
---|
175 | CPPUNIT_ASSERT(!s2.isInside(v211));
|
---|
176 | CPPUNIT_ASSERT(!s2.isInside(v021));
|
---|
177 | CPPUNIT_ASSERT(!s2.isInside(v121));
|
---|
178 | CPPUNIT_ASSERT(!s2.isInside(v221));
|
---|
179 | CPPUNIT_ASSERT(!s2.isInside(v002));
|
---|
180 | CPPUNIT_ASSERT(!s2.isInside(v102));
|
---|
181 | CPPUNIT_ASSERT(!s2.isInside(v202));
|
---|
182 | CPPUNIT_ASSERT(!s2.isInside(v012));
|
---|
183 | CPPUNIT_ASSERT(!s2.isInside(v112));
|
---|
184 | CPPUNIT_ASSERT(!s2.isInside(v212));
|
---|
185 | CPPUNIT_ASSERT(!s2.isInside(v022));
|
---|
186 | CPPUNIT_ASSERT(!s2.isInside(v122));
|
---|
187 | CPPUNIT_ASSERT(!s2.isInside(v222));
|
---|
188 |
|
---|
189 | }
|
---|
190 |
|
---|
191 | void ShapeUnittest::operatorTest(){
|
---|
192 | {
|
---|
193 | Shape s1 = !Nowhere();
|
---|
194 | CPPUNIT_ASSERT(s1.isInside(v000));
|
---|
195 | CPPUNIT_ASSERT(s1.isInside(v100));
|
---|
196 | CPPUNIT_ASSERT(s1.isInside(v200));
|
---|
197 | CPPUNIT_ASSERT(s1.isInside(v010));
|
---|
198 | CPPUNIT_ASSERT(s1.isInside(v110));
|
---|
199 | CPPUNIT_ASSERT(s1.isInside(v210));
|
---|
200 | CPPUNIT_ASSERT(s1.isInside(v020));
|
---|
201 | CPPUNIT_ASSERT(s1.isInside(v120));
|
---|
202 | CPPUNIT_ASSERT(s1.isInside(v220));
|
---|
203 | CPPUNIT_ASSERT(s1.isInside(v001));
|
---|
204 | CPPUNIT_ASSERT(s1.isInside(v101));
|
---|
205 | CPPUNIT_ASSERT(s1.isInside(v201));
|
---|
206 | CPPUNIT_ASSERT(s1.isInside(v011));
|
---|
207 | CPPUNIT_ASSERT(s1.isInside(v111));
|
---|
208 | CPPUNIT_ASSERT(s1.isInside(v211));
|
---|
209 | CPPUNIT_ASSERT(s1.isInside(v021));
|
---|
210 | CPPUNIT_ASSERT(s1.isInside(v121));
|
---|
211 | CPPUNIT_ASSERT(s1.isInside(v221));
|
---|
212 | CPPUNIT_ASSERT(s1.isInside(v002));
|
---|
213 | CPPUNIT_ASSERT(s1.isInside(v102));
|
---|
214 | CPPUNIT_ASSERT(s1.isInside(v202));
|
---|
215 | CPPUNIT_ASSERT(s1.isInside(v012));
|
---|
216 | CPPUNIT_ASSERT(s1.isInside(v112));
|
---|
217 | CPPUNIT_ASSERT(s1.isInside(v212));
|
---|
218 | CPPUNIT_ASSERT(s1.isInside(v022));
|
---|
219 | CPPUNIT_ASSERT(s1.isInside(v122));
|
---|
220 | CPPUNIT_ASSERT(s1.isInside(v222));
|
---|
221 |
|
---|
222 | Shape s2 = !Everywhere();
|
---|
223 | CPPUNIT_ASSERT(!s2.isInside(v000));
|
---|
224 | CPPUNIT_ASSERT(!s2.isInside(v100));
|
---|
225 | CPPUNIT_ASSERT(!s2.isInside(v200));
|
---|
226 | CPPUNIT_ASSERT(!s2.isInside(v010));
|
---|
227 | CPPUNIT_ASSERT(!s2.isInside(v110));
|
---|
228 | CPPUNIT_ASSERT(!s2.isInside(v210));
|
---|
229 | CPPUNIT_ASSERT(!s2.isInside(v020));
|
---|
230 | CPPUNIT_ASSERT(!s2.isInside(v120));
|
---|
231 | CPPUNIT_ASSERT(!s2.isInside(v220));
|
---|
232 | CPPUNIT_ASSERT(!s2.isInside(v001));
|
---|
233 | CPPUNIT_ASSERT(!s2.isInside(v101));
|
---|
234 | CPPUNIT_ASSERT(!s2.isInside(v201));
|
---|
235 | CPPUNIT_ASSERT(!s2.isInside(v011));
|
---|
236 | CPPUNIT_ASSERT(!s2.isInside(v111));
|
---|
237 | CPPUNIT_ASSERT(!s2.isInside(v211));
|
---|
238 | CPPUNIT_ASSERT(!s2.isInside(v021));
|
---|
239 | CPPUNIT_ASSERT(!s2.isInside(v121));
|
---|
240 | CPPUNIT_ASSERT(!s2.isInside(v221));
|
---|
241 | CPPUNIT_ASSERT(!s2.isInside(v002));
|
---|
242 | CPPUNIT_ASSERT(!s2.isInside(v102));
|
---|
243 | CPPUNIT_ASSERT(!s2.isInside(v202));
|
---|
244 | CPPUNIT_ASSERT(!s2.isInside(v012));
|
---|
245 | CPPUNIT_ASSERT(!s2.isInside(v112));
|
---|
246 | CPPUNIT_ASSERT(!s2.isInside(v212));
|
---|
247 | CPPUNIT_ASSERT(!s2.isInside(v022));
|
---|
248 | CPPUNIT_ASSERT(!s2.isInside(v122));
|
---|
249 | CPPUNIT_ASSERT(!s2.isInside(v222));
|
---|
250 | }
|
---|
251 |
|
---|
252 | {
|
---|
253 | Shape s1 = Nowhere() || Everywhere();
|
---|
254 | CPPUNIT_ASSERT(s1.isInside(v000));
|
---|
255 | CPPUNIT_ASSERT(s1.isInside(v100));
|
---|
256 | CPPUNIT_ASSERT(s1.isInside(v200));
|
---|
257 | CPPUNIT_ASSERT(s1.isInside(v010));
|
---|
258 | CPPUNIT_ASSERT(s1.isInside(v110));
|
---|
259 | CPPUNIT_ASSERT(s1.isInside(v210));
|
---|
260 | CPPUNIT_ASSERT(s1.isInside(v020));
|
---|
261 | CPPUNIT_ASSERT(s1.isInside(v120));
|
---|
262 | CPPUNIT_ASSERT(s1.isInside(v220));
|
---|
263 | CPPUNIT_ASSERT(s1.isInside(v001));
|
---|
264 | CPPUNIT_ASSERT(s1.isInside(v101));
|
---|
265 | CPPUNIT_ASSERT(s1.isInside(v201));
|
---|
266 | CPPUNIT_ASSERT(s1.isInside(v011));
|
---|
267 | CPPUNIT_ASSERT(s1.isInside(v111));
|
---|
268 | CPPUNIT_ASSERT(s1.isInside(v211));
|
---|
269 | CPPUNIT_ASSERT(s1.isInside(v021));
|
---|
270 | CPPUNIT_ASSERT(s1.isInside(v121));
|
---|
271 | CPPUNIT_ASSERT(s1.isInside(v221));
|
---|
272 | CPPUNIT_ASSERT(s1.isInside(v002));
|
---|
273 | CPPUNIT_ASSERT(s1.isInside(v102));
|
---|
274 | CPPUNIT_ASSERT(s1.isInside(v202));
|
---|
275 | CPPUNIT_ASSERT(s1.isInside(v012));
|
---|
276 | CPPUNIT_ASSERT(s1.isInside(v112));
|
---|
277 | CPPUNIT_ASSERT(s1.isInside(v212));
|
---|
278 | CPPUNIT_ASSERT(s1.isInside(v022));
|
---|
279 | CPPUNIT_ASSERT(s1.isInside(v122));
|
---|
280 | CPPUNIT_ASSERT(s1.isInside(v222));
|
---|
281 |
|
---|
282 | Shape s2 = Nowhere() && Everywhere();
|
---|
283 | CPPUNIT_ASSERT(!s2.isInside(v000));
|
---|
284 | CPPUNIT_ASSERT(!s2.isInside(v100));
|
---|
285 | CPPUNIT_ASSERT(!s2.isInside(v200));
|
---|
286 | CPPUNIT_ASSERT(!s2.isInside(v010));
|
---|
287 | CPPUNIT_ASSERT(!s2.isInside(v110));
|
---|
288 | CPPUNIT_ASSERT(!s2.isInside(v210));
|
---|
289 | CPPUNIT_ASSERT(!s2.isInside(v020));
|
---|
290 | CPPUNIT_ASSERT(!s2.isInside(v120));
|
---|
291 | CPPUNIT_ASSERT(!s2.isInside(v220));
|
---|
292 | CPPUNIT_ASSERT(!s2.isInside(v001));
|
---|
293 | CPPUNIT_ASSERT(!s2.isInside(v101));
|
---|
294 | CPPUNIT_ASSERT(!s2.isInside(v201));
|
---|
295 | CPPUNIT_ASSERT(!s2.isInside(v011));
|
---|
296 | CPPUNIT_ASSERT(!s2.isInside(v111));
|
---|
297 | CPPUNIT_ASSERT(!s2.isInside(v211));
|
---|
298 | CPPUNIT_ASSERT(!s2.isInside(v021));
|
---|
299 | CPPUNIT_ASSERT(!s2.isInside(v121));
|
---|
300 | CPPUNIT_ASSERT(!s2.isInside(v221));
|
---|
301 | CPPUNIT_ASSERT(!s2.isInside(v002));
|
---|
302 | CPPUNIT_ASSERT(!s2.isInside(v102));
|
---|
303 | CPPUNIT_ASSERT(!s2.isInside(v202));
|
---|
304 | CPPUNIT_ASSERT(!s2.isInside(v012));
|
---|
305 | CPPUNIT_ASSERT(!s2.isInside(v112));
|
---|
306 | CPPUNIT_ASSERT(!s2.isInside(v212));
|
---|
307 | CPPUNIT_ASSERT(!s2.isInside(v022));
|
---|
308 | CPPUNIT_ASSERT(!s2.isInside(v122));
|
---|
309 | CPPUNIT_ASSERT(!s2.isInside(v222));
|
---|
310 | }
|
---|
311 |
|
---|
312 | {
|
---|
313 | Shape s1 = Everywhere() || Nowhere();
|
---|
314 | CPPUNIT_ASSERT(s1.isInside(v000));
|
---|
315 | CPPUNIT_ASSERT(s1.isInside(v100));
|
---|
316 | CPPUNIT_ASSERT(s1.isInside(v200));
|
---|
317 | CPPUNIT_ASSERT(s1.isInside(v010));
|
---|
318 | CPPUNIT_ASSERT(s1.isInside(v110));
|
---|
319 | CPPUNIT_ASSERT(s1.isInside(v210));
|
---|
320 | CPPUNIT_ASSERT(s1.isInside(v020));
|
---|
321 | CPPUNIT_ASSERT(s1.isInside(v120));
|
---|
322 | CPPUNIT_ASSERT(s1.isInside(v220));
|
---|
323 | CPPUNIT_ASSERT(s1.isInside(v001));
|
---|
324 | CPPUNIT_ASSERT(s1.isInside(v101));
|
---|
325 | CPPUNIT_ASSERT(s1.isInside(v201));
|
---|
326 | CPPUNIT_ASSERT(s1.isInside(v011));
|
---|
327 | CPPUNIT_ASSERT(s1.isInside(v111));
|
---|
328 | CPPUNIT_ASSERT(s1.isInside(v211));
|
---|
329 | CPPUNIT_ASSERT(s1.isInside(v021));
|
---|
330 | CPPUNIT_ASSERT(s1.isInside(v121));
|
---|
331 | CPPUNIT_ASSERT(s1.isInside(v221));
|
---|
332 | CPPUNIT_ASSERT(s1.isInside(v002));
|
---|
333 | CPPUNIT_ASSERT(s1.isInside(v102));
|
---|
334 | CPPUNIT_ASSERT(s1.isInside(v202));
|
---|
335 | CPPUNIT_ASSERT(s1.isInside(v012));
|
---|
336 | CPPUNIT_ASSERT(s1.isInside(v112));
|
---|
337 | CPPUNIT_ASSERT(s1.isInside(v212));
|
---|
338 | CPPUNIT_ASSERT(s1.isInside(v022));
|
---|
339 | CPPUNIT_ASSERT(s1.isInside(v122));
|
---|
340 | CPPUNIT_ASSERT(s1.isInside(v222));
|
---|
341 |
|
---|
342 | Shape s2 = Everywhere() && Nowhere();
|
---|
343 | CPPUNIT_ASSERT(!s2.isInside(v000));
|
---|
344 | CPPUNIT_ASSERT(!s2.isInside(v100));
|
---|
345 | CPPUNIT_ASSERT(!s2.isInside(v200));
|
---|
346 | CPPUNIT_ASSERT(!s2.isInside(v010));
|
---|
347 | CPPUNIT_ASSERT(!s2.isInside(v110));
|
---|
348 | CPPUNIT_ASSERT(!s2.isInside(v210));
|
---|
349 | CPPUNIT_ASSERT(!s2.isInside(v020));
|
---|
350 | CPPUNIT_ASSERT(!s2.isInside(v120));
|
---|
351 | CPPUNIT_ASSERT(!s2.isInside(v220));
|
---|
352 | CPPUNIT_ASSERT(!s2.isInside(v001));
|
---|
353 | CPPUNIT_ASSERT(!s2.isInside(v101));
|
---|
354 | CPPUNIT_ASSERT(!s2.isInside(v201));
|
---|
355 | CPPUNIT_ASSERT(!s2.isInside(v011));
|
---|
356 | CPPUNIT_ASSERT(!s2.isInside(v111));
|
---|
357 | CPPUNIT_ASSERT(!s2.isInside(v211));
|
---|
358 | CPPUNIT_ASSERT(!s2.isInside(v021));
|
---|
359 | CPPUNIT_ASSERT(!s2.isInside(v121));
|
---|
360 | CPPUNIT_ASSERT(!s2.isInside(v221));
|
---|
361 | CPPUNIT_ASSERT(!s2.isInside(v002));
|
---|
362 | CPPUNIT_ASSERT(!s2.isInside(v102));
|
---|
363 | CPPUNIT_ASSERT(!s2.isInside(v202));
|
---|
364 | CPPUNIT_ASSERT(!s2.isInside(v012));
|
---|
365 | CPPUNIT_ASSERT(!s2.isInside(v112));
|
---|
366 | CPPUNIT_ASSERT(!s2.isInside(v212));
|
---|
367 | CPPUNIT_ASSERT(!s2.isInside(v022));
|
---|
368 | CPPUNIT_ASSERT(!s2.isInside(v122));
|
---|
369 | CPPUNIT_ASSERT(!s2.isInside(v222));
|
---|
370 | }
|
---|
371 |
|
---|
372 | }
|
---|