Index: src/unittests/BaseShapesUnittest.cpp
===================================================================
--- src/unittests/BaseShapesUnittest.cpp	(revision c5186e909d411ff3c5b6bc38edd607738818eab0)
+++ src/unittests/BaseShapesUnittest.cpp	(revision c5186e909d411ff3c5b6bc38edd607738818eab0)
@@ -0,0 +1,135 @@
+/*
+ * BaseShapesUnittest.cpp
+ *
+ *  Created on: Jun 18, 2010
+ *      Author: crueger
+ */
+
+#include "BaseShapesUnittest.hpp"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include <cmath>
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+#include "LinearAlgebra/Vector.hpp"
+#include "Shapes/Shape.hpp"
+
+#include "Shapes/BaseShapes.hpp"
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( BaseShapesUnittest );
+
+void BaseShapesUnittest::setUp()
+{
+  v000 =  0*e1+0*e2+0*e3;
+  v100 =  1*e1+0*e2+0*e3;
+  v200 = -1*e1+0*e2+0*e3;
+  v010 =  0*e1+1*e2+0*e3;
+  v110 =  1*e1+1*e2+0*e3;
+  v210 = -1*e1+1*e2+0*e3;
+  v020 =  0*e1-1*e2+0*e3;
+  v120 =  1*e1-1*e2+0*e3;
+  v220 = -1*e1-1*e2+0*e3;
+  v001 =  0*e1+0*e2+1*e3;
+  v101 =  1*e1+0*e2+1*e3;
+  v201 = -1*e1+0*e2+1*e3;
+  v011 =  0*e1+1*e2+1*e3;
+  v111 =  1*e1+1*e2+1*e3;
+  v211 = -1*e1+1*e2+1*e3;
+  v021 =  0*e1-1*e2+1*e3;
+  v121 =  1*e1-1*e2+1*e3;
+  v221 = -1*e1-1*e2+1*e3;
+  v002 =  0*e1+0*e2-1*e3;
+  v102 =  1*e1+0*e2-1*e3;
+  v202 = -1*e1+0*e2-1*e3;
+  v012 =  0*e1+1*e2-1*e3;
+  v112 =  1*e1+1*e2-1*e3;
+  v212 = -1*e1+1*e2-1*e3;
+  v022 =  0*e1-1*e2-1*e3;
+  v122 =  1*e1-1*e2-1*e3;
+  v222 = -1*e1-1*e2-1*e3;
+}
+
+void BaseShapesUnittest::tearDown()
+{}
+
+
+void BaseShapesUnittest::isInsideTest(){
+  Shape s1 = Sphere();
+
+  CPPUNIT_ASSERT(s1.isInside(v000));
+  CPPUNIT_ASSERT(s1.isInside(v100));
+  CPPUNIT_ASSERT(s1.isInside(v200));
+  CPPUNIT_ASSERT(s1.isInside(v010));
+  CPPUNIT_ASSERT(!s1.isInside(v110));
+  CPPUNIT_ASSERT(!s1.isInside(v210));
+  CPPUNIT_ASSERT(s1.isInside(v020));
+  CPPUNIT_ASSERT(!s1.isInside(v120));
+  CPPUNIT_ASSERT(!s1.isInside(v220));
+  CPPUNIT_ASSERT(s1.isInside(v001));
+  CPPUNIT_ASSERT(!s1.isInside(v101));
+  CPPUNIT_ASSERT(!s1.isInside(v201));
+  CPPUNIT_ASSERT(!s1.isInside(v011));
+  CPPUNIT_ASSERT(!s1.isInside(v111));
+  CPPUNIT_ASSERT(!s1.isInside(v211));
+  CPPUNIT_ASSERT(!s1.isInside(v021));
+  CPPUNIT_ASSERT(!s1.isInside(v121));
+  CPPUNIT_ASSERT(!s1.isInside(v221));
+  CPPUNIT_ASSERT(s1.isInside(v002));
+  CPPUNIT_ASSERT(!s1.isInside(v102));
+  CPPUNIT_ASSERT(!s1.isInside(v202));
+  CPPUNIT_ASSERT(!s1.isInside(v012));
+  CPPUNIT_ASSERT(!s1.isInside(v112));
+  CPPUNIT_ASSERT(!s1.isInside(v212));
+  CPPUNIT_ASSERT(!s1.isInside(v022));
+  CPPUNIT_ASSERT(!s1.isInside(v122));
+  CPPUNIT_ASSERT(!s1.isInside(v222));
+
+  Shape s2 = Cuboid();
+
+  CPPUNIT_ASSERT(s2.isInside(v000));
+  CPPUNIT_ASSERT(s2.isInside(v100));
+  CPPUNIT_ASSERT(!s2.isInside(v200));
+  CPPUNIT_ASSERT(s2.isInside(v010));
+  CPPUNIT_ASSERT(s2.isInside(v110));
+  CPPUNIT_ASSERT(!s2.isInside(v210));
+  CPPUNIT_ASSERT(!s2.isInside(v020));
+  CPPUNIT_ASSERT(!s2.isInside(v120));
+  CPPUNIT_ASSERT(!s2.isInside(v220));
+  CPPUNIT_ASSERT(s2.isInside(v001));
+  CPPUNIT_ASSERT(s2.isInside(v101));
+  CPPUNIT_ASSERT(!s2.isInside(v201));
+  CPPUNIT_ASSERT(s2.isInside(v011));
+  CPPUNIT_ASSERT(s2.isInside(v111));
+  CPPUNIT_ASSERT(!s2.isInside(v211));
+  CPPUNIT_ASSERT(!s2.isInside(v021));
+  CPPUNIT_ASSERT(!s2.isInside(v121));
+  CPPUNIT_ASSERT(!s2.isInside(v221));
+  CPPUNIT_ASSERT(!s2.isInside(v002));
+  CPPUNIT_ASSERT(!s2.isInside(v102));
+  CPPUNIT_ASSERT(!s2.isInside(v202));
+  CPPUNIT_ASSERT(!s2.isInside(v012));
+  CPPUNIT_ASSERT(!s2.isInside(v112));
+  CPPUNIT_ASSERT(!s2.isInside(v212));
+  CPPUNIT_ASSERT(!s2.isInside(v022));
+  CPPUNIT_ASSERT(!s2.isInside(v122));
+  CPPUNIT_ASSERT(!s2.isInside(v222));
+
+}
+
+void BaseShapesUnittest::PointsOnSurfaceTest(){
+  Shape s = Sphere();
+  const size_t N = 200;
+  std::vector<Vector> PointsOnSurface = s.getHomogeneousPointsOnSurface(N);
+  for (std::vector<Vector>::const_iterator iter = PointsOnSurface.begin(); iter != PointsOnSurface.end(); ++iter) {
+    CPPUNIT_ASSERT(fabs(1. - (*iter).NormSquared()) < MYEPSILON);
+  }
+  CPPUNIT_ASSERT_EQUAL(N, PointsOnSurface.size());
+}
+
Index: src/unittests/BaseShapesUnittest.hpp
===================================================================
--- src/unittests/BaseShapesUnittest.hpp	(revision c5186e909d411ff3c5b6bc38edd607738818eab0)
+++ src/unittests/BaseShapesUnittest.hpp	(revision c5186e909d411ff3c5b6bc38edd607738818eab0)
@@ -0,0 +1,63 @@
+/*
+ * BaseShapesUnittest.hpp
+ *
+ *  Created on: Jun 18, 2010
+ *      Author: crueger
+ */
+
+#ifndef BASESHAPESUNITTEST_HPP_
+#define BASESHAPESUNITTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+class Vector;
+
+#include "LinearAlgebra/Vector.hpp"
+
+class BaseShapesUnittest : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( BaseShapesUnittest) ;
+  CPPUNIT_TEST ( isInsideTest );
+  CPPUNIT_TEST ( PointsOnSurfaceTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void isInsideTest();
+  void PointsOnSurfaceTest();
+
+  // a lot of vectors.
+  // these define all the edges of a box around -1 +1 on each axis
+  // 0 is 0, 1 is 1 and 2 is -1
+  Vector v000;
+  Vector v100;
+  Vector v200;
+  Vector v010;
+  Vector v110;
+  Vector v210;
+  Vector v020;
+  Vector v120;
+  Vector v220;
+  Vector v001;
+  Vector v101;
+  Vector v201;
+  Vector v011;
+  Vector v111;
+  Vector v211;
+  Vector v021;
+  Vector v121;
+  Vector v221;
+  Vector v002;
+  Vector v102;
+  Vector v202;
+  Vector v012;
+  Vector v112;
+  Vector v212;
+  Vector v022;
+  Vector v122;
+  Vector v222;
+};
+
+#endif /* BASESHAPESUNITTEST_HPP_ */
Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision b5c53d0007611f38495bf2e4a8c7348258cf1e7e)
+++ src/unittests/Makefile.am	(revision c5186e909d411ff3c5b6bc38edd607738818eab0)
@@ -16,4 +16,5 @@
   atomsCalculationTest \
   AtomDescriptorTest \
+  BaseShapesUnitTest \
   BondGraphUnitTest \
   BoxUnittest \
@@ -73,4 +74,5 @@
   AtomDescriptorTest.cpp \
   atomsCalculationTest.cpp \
+  BaseShapesUnittest.cpp \
   bondgraphunittest.cpp \
   BoxUnittest.cpp \
@@ -111,4 +113,5 @@
   AtomDescriptorTest.hpp \
   atomsCalculationTest.hpp \
+  BaseShapesUnittest.hpp \
   bondgraphunittest.hpp \
   BoxUnittest.hpp \
@@ -164,4 +167,7 @@
 AtomDescriptorTest_LDADD = ${ALLLIBS}
 
+BaseShapesUnitTest_SOURCES = UnitTestMain.cpp BaseShapesUnittest.cpp BaseShapesUnittest.hpp
+BaseShapesUnitTest_LDADD = ${ALLLIBS}
+
 BondGraphUnitTest_SOURCES = UnitTestMain.cpp bondgraphunittest.cpp bondgraphunittest.hpp
 BondGraphUnitTest_LDADD = ${ALLLIBS}
Index: src/unittests/ShapeUnittest.cpp
===================================================================
--- src/unittests/ShapeUnittest.cpp	(revision b5c53d0007611f38495bf2e4a8c7348258cf1e7e)
+++ src/unittests/ShapeUnittest.cpp	(revision c5186e909d411ff3c5b6bc38edd607738818eab0)
@@ -12,4 +12,6 @@
 #include <cppunit/ui/text/TestRunner.h>
 
+#include <cmath>
+
 #ifdef HAVE_TESTRUNNER
 #include "UnitTestMain.hpp"
@@ -18,4 +20,6 @@
 #include "LinearAlgebra/Vector.hpp"
 #include "Shapes/Shape.hpp"
+
+#include "Shapes/BaseShapes.hpp"
 
 // Registers the fixture into the 'registry'
@@ -179,4 +183,5 @@
 
 }
+
 void ShapeUnittest::operatorTest(){
   {
