Index: src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.cpp
===================================================================
--- src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.cpp	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
+++ src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.cpp	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
@@ -0,0 +1,122 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * LinearSystemOfEquationsunittest.cpp
+ *
+ *  Created on: Jan 8, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+using namespace std;
+
+#include <iomanip>
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cmath>
+
+#include "LinearAlgebra/Vector.hpp"
+
+#include "LinearSystemOfEquationsUnitTest.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( LinearSystemOfEquationsTest );
+
+
+void LinearSystemOfEquationsTest::setUp()
+{
+  s = new LinearSystemOfEquations(4,4);
+};
+
+void LinearSystemOfEquationsTest::tearDown()
+{
+  delete(s);
+};
+
+/** Unit test for initialization.
+ *
+ */
+void LinearSystemOfEquationsTest::InitializationTest()
+{
+  // Setting A
+  double array[] = { 1., 0., 0., 0.,
+                     0., 2., 0., 0.,
+                     0., 0., 3., 0.,
+                     0., 0., 0., 4. };
+  s->SetA(array);
+
+  // Setting b
+};
+
+/** Unit test for symmetry property.
+ *
+ */
+void LinearSystemOfEquationsTest::SymmetricTest()
+{
+  CPPUNIT_ASSERT_EQUAL( true, s->SetSymmetric(true) );
+  //LinearSystemOfEquations *t = new LinearSystemOfEquations(4,3);
+  //CPPUNIT_ASSERT_EQUAL( true, t->SetSymmetric(true) );
+  //delete(t);
+};
+
+/** Unit test for simple Solve.
+ *
+ */
+void LinearSystemOfEquationsTest::SolveSimpleTest()
+{
+  // set up A and b
+  double m_array[] = { 1., 0., 0., 0.,
+                       0., 2., 0., 0.,
+                       0., 0., 3., 0.,
+                       0., 0., 0., 4. };
+  double v_array[] = { 1., 2., 3., 4. };
+  s->SetA(m_array);
+  s->Setb(v_array);
+
+  // solve
+  double *array = new double[4];
+  s->GetSolutionAsArray(array);
+  for (int i=0;i<4;i++)
+    CPPUNIT_ASSERT_EQUAL( 1., array[i]);
+  delete[](array);
+};
+
+/** Unit test for advanced Solve.
+ *
+ */
+void LinearSystemOfEquationsTest::SolveAdvancedTest()
+{
+  // set up A and b
+  double m_array[] = { 0.18, 0.60, 0.57, 0.96,
+                       0.41, 0.24, 0.99, 0.58,
+                       0.14, 0.30, 0.97, 0.66,
+                       0.51, 0.13, 0.19, 0.85 };
+  double v_array[] = { 1.0, 2.0, 3.0, 4.0 };
+  double x_array[] = { -4.05205022957398, -12.60561139590692, 1.660911626708844, 8.693766928795233 };
+  s->SetA(m_array);
+  s->Setb(v_array);
+
+  // solve
+  double *array = new double[4];
+  s->GetSolutionAsArray(array);
+  for (int i=0;i<4;i++) {
+    CPPUNIT_ASSERT( fabs(x_array[i] - array[i]) < MYEPSILON );
+  }
+  delete[](array);
+};
Index: src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.hpp
===================================================================
--- src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.hpp	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
+++ src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.hpp	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
@@ -0,0 +1,40 @@
+/*
+ * LinearSystemOfEquationsunittest.hpp
+ *
+ *  Created on: Jan 8, 2010
+ *      Author: heber
+ */
+
+#ifndef LINEARSYSTEMOFEQUATIONSUNITTEST_HPP_
+#define LINEARSYSTEMOFEQUATIONSUNITTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "LinearAlgebra/LinearSystemOfEquations.hpp"
+
+/********************************************** Test classes **************************************/
+
+class LinearSystemOfEquationsTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( LinearSystemOfEquationsTest) ;
+    CPPUNIT_TEST ( InitializationTest );
+    CPPUNIT_TEST ( SymmetricTest );
+    CPPUNIT_TEST ( SolveSimpleTest );
+    CPPUNIT_TEST ( SolveAdvancedTest );
+    CPPUNIT_TEST_SUITE_END();
+
+public:
+    void setUp();
+    void tearDown();
+
+    void InitializationTest();
+    void SymmetricTest();
+    void SolveSimpleTest();
+    void SolveAdvancedTest();
+
+private:
+    LinearSystemOfEquations *s;
+};
+
+
+#endif /* LINEARSYSTEMOFEQUATIONSUNITTEST_HPP_ */
Index: src/LinearAlgebra/unittests/Makefile.am
===================================================================
--- src/LinearAlgebra/unittests/Makefile.am	(revision fff54fc0db0a4acc85e41914d8ef5c4e74bd0e7f)
+++ src/LinearAlgebra/unittests/Makefile.am	(revision efd61bd3e7212dbd914dab44397fc2a2e40bff21)
@@ -9,4 +9,5 @@
 
 TESTS = \
+  LinearSystemOfEquationsUnitTest \
   MatrixContentSymmetricUnitTest \
   MatrixContentUnitTest \
@@ -23,4 +24,9 @@
 	../../Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \
 	$(BOOST_LIB)
+
+LinearSystemOfEquationsUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	LinearSystemOfEquationsUnitTest.cpp \
+	LinearSystemOfEquationsUnitTest.hpp
+LinearSystemOfEquationsUnitTest_LDADD = ${GSLLIBS}
 
 MatrixContentSymmetricUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
