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