Changes in src/unittests/vectorunittest.cpp [27ac00:36166d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/vectorunittest.cpp
r27ac00 r36166d 15 15 #include "defs.hpp" 16 16 #include "log.hpp" 17 #include "memoryusageobserver.hpp"18 17 #include "vector.hpp" 19 18 #include "vector_ops.hpp" … … 21 20 #include "Plane.hpp" 22 21 #include "Exceptions/LinearDependenceException.hpp" 22 #include "Matrix.hpp" 23 23 24 24 #ifdef HAVE_TESTRUNNER … … 49 49 void VectorTest::tearDown() 50 50 { 51 MemoryUsageObserver::purgeInstance();52 51 logger::purgeInstance(); 53 52 errorLogger::purgeInstance(); … … 215 214 CPPUNIT_ASSERT(testVector.ScalarProduct(three) < MYEPSILON); 216 215 } 217 218 219 /**220 * UnitTest for Vector::IsInParallelepiped().221 */222 void VectorTest::IsInParallelepipedTest()223 {224 double parallelepiped[NDIM*NDIM];225 parallelepiped[0] = 1;226 parallelepiped[1] = 0;227 parallelepiped[2] = 0;228 parallelepiped[3] = 0;229 parallelepiped[4] = 1;230 parallelepiped[5] = 0;231 parallelepiped[6] = 0;232 parallelepiped[7] = 0;233 parallelepiped[8] = 1;234 235 fixture = zero;236 CPPUNIT_ASSERT_EQUAL( false, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );237 fixture = Vector(2.5,2.5,2.5);238 CPPUNIT_ASSERT_EQUAL( true, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );239 fixture = Vector(1.,1.,1.);240 CPPUNIT_ASSERT_EQUAL( false, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );241 fixture = Vector(3.5,3.5,3.5);242 CPPUNIT_ASSERT_EQUAL( false, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );243 fixture = Vector(2.,2.,2.);244 CPPUNIT_ASSERT_EQUAL( true, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );245 fixture = Vector(2.,3.,2.);246 CPPUNIT_ASSERT_EQUAL( true, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );247 fixture = Vector(-2.,2.,-1.);248 CPPUNIT_ASSERT_EQUAL( false, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );249 }250
Note:
See TracChangeset
for help on using the changeset viewer.