Index: code/branches/testing/src/libraries/util/SignalHandler.cc
===================================================================
--- code/branches/testing/src/libraries/util/SignalHandler.cc	(revision 9113)
+++ code/branches/testing/src/libraries/util/SignalHandler.cc	(revision 9114)
@@ -21,5 +21,6 @@
  *
  *   Author:
- *      Christoph Renner
+ *      Christoph Renner (Linux implementation)
+ *      Fabian 'x3n' Landau (Windows implementation)
  *   Co-authors:
  *      ...
@@ -139,11 +140,11 @@
       orxout(user_error) << "Received signal " << sigName.c_str() << endl << "Try to write backtrace to file orxonox_crash.log" << endl;
 
-      
+
       // First start GDB which will be attached to this process later on
-      
+
       int gdbIn[2];
       int gdbOut[2];
       int gdbErr[2];
-      
+
       if ( pipe(gdbIn) == -1 || pipe(gdbOut) == -1 || pipe(gdbErr) == -1 )
       {
@@ -151,8 +152,8 @@
         exit(EXIT_FAILURE);
       }
-      
+
       int gdbPid = fork();
       // this process will run gdb
-      
+
       if ( gdbPid == -1 )
       {
@@ -160,23 +161,23 @@
         exit(EXIT_FAILURE);
       }
-      
+
       if ( gdbPid == 0 )
       {
         // start gdb
-        
+
         close(gdbIn[1]);
         close(gdbOut[0]);
         close(gdbErr[0]);
-        
+
         dup2( gdbIn[0], STDIN_FILENO );
         dup2( gdbOut[1], STDOUT_FILENO );
         dup2( gdbErr[1], STDERR_FILENO );
-        
+
         execlp( "sh", "sh", "-c", "gdb", static_cast<void*>(NULL));
       }
-      
-      
+
+
       // Now start a fork of this process on which GDB will be attached on
-      
+
       int sigPipe[2];
       if ( pipe(sigPipe) == -1 )
@@ -202,5 +203,5 @@
       {
         getInstance().dontCatch();
-        
+
         // make sure gdb is allowed to attach to our PID even if there are some system restrictions
 #ifdef PR_SET_PTRACER
@@ -208,5 +209,5 @@
           orxout(user_error) << "could not set proper permissions for GDB to attach to process..." << endl;
 #endif
-        
+
         // wait for message from parent when it has attached gdb
         int someData;
Index: code/branches/testing/src/libraries/util/SignalHandler.h
===================================================================
--- code/branches/testing/src/libraries/util/SignalHandler.h	(revision 9113)
+++ code/branches/testing/src/libraries/util/SignalHandler.h	(revision 9114)
@@ -21,5 +21,6 @@
  *
  *   Author:
- *      Christoph Renner
+ *      Christoph Renner (Linux implementation)
+ *      Fabian 'x3n' Landau (Windows implementation)
  *   Co-authors:
  *      ...
Index: code/branches/testing/test/CMakeLists.txt
===================================================================
--- code/branches/testing/test/CMakeLists.txt	(revision 9113)
+++ code/branches/testing/test/CMakeLists.txt	(revision 9114)
Index: code/branches/testing/test/CTestCustom.cmake
===================================================================
--- code/branches/testing/test/CTestCustom.cmake	(revision 9113)
+++ code/branches/testing/test/CTestCustom.cmake	(revision 9114)
Index: code/branches/testing/test/util/CMakeLists.txt
===================================================================
--- code/branches/testing/test/util/CMakeLists.txt	(revision 9113)
+++ code/branches/testing/test/util/CMakeLists.txt	(revision 9114)
@@ -3,5 +3,14 @@
     EXCLUDE_FROM_ALL
     ${GMOCK_MAIN}
+    ConvertTest.cc
     MathTest.cc
+    mboolTest.cc
+    ScopeTest.cc
+    SharedPtrTest.cc
+    SingletonTest.cc
+    SmallObjectAllocatorTest.cc
+    StringUtilsTest.cc
+    SubStringTest.cc
+    VA_NARGSTest.cc
 )
 TARGET_LINK_LIBRARIES(util_test util gmock_orxonox)
@@ -9,2 +18,19 @@
 
 ADD_TEST(util_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/util_test)
+
+#-----------------
+
+IF(MSVC)
+  IF(CMAKE_CL_64)
+    SET(MSVC_PLATFORM "x64")
+  ELSE()
+    SET(MSVC_PLATFORM "Win32")
+  ENDIF()
+  IF(MSVC10)
+    CONFIGURE_FILE("../../src/orxonox-main.vcxproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/util_test.vcxproj.user")
+  ELSE()
+    STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?).*$" "\\1"
+           VISUAL_STUDIO_VERSION_SIMPLE "${CMAKE_GENERATOR}")
+    CONFIGURE_FILE("../../src/orxonox-main.vcproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/util_test.vcproj.user")
+  ENDIF()
+ENDIF(MSVC)
Index: code/branches/testing/test/util/ConvertTest.cc
===================================================================
--- code/branches/testing/test/util/ConvertTest.cc	(revision 9114)
+++ code/branches/testing/test/util/ConvertTest.cc	(revision 9114)
@@ -0,0 +1,122 @@
+#include <gtest/gtest.h>
+#include "util/Convert.h"
+#include "util/Math.h"
+#include "util/MathConvert.h"
+
+namespace orxonox
+{
+    TEST(multi_cast, ToString)
+    {
+        // int
+        EXPECT_EQ("5", multi_cast<std::string>(static_cast<int>(5)));
+        EXPECT_EQ("-13", multi_cast<std::string>(static_cast<int>(-13)));
+
+        // unsigned int
+        EXPECT_EQ("0", multi_cast<std::string>(static_cast<unsigned int>(0)));
+        EXPECT_EQ("4000000000", multi_cast<std::string>(static_cast<unsigned int>(4000000000LL)));
+
+        // float
+        EXPECT_EQ("0", multi_cast<std::string>(0.0f));
+        EXPECT_EQ("10", multi_cast<std::string>(10.0f));
+        EXPECT_EQ("123.456", multi_cast<std::string>(123.456f));
+        EXPECT_EQ("1.234e+012", multi_cast<std::string>(1234000000000.0f));
+
+        // double
+        EXPECT_EQ("0", multi_cast<std::string>(0.0));
+        EXPECT_EQ("10", multi_cast<std::string>(10.0));
+        EXPECT_EQ("123.456", multi_cast<std::string>(123.456));
+        EXPECT_EQ("1.234e+012", multi_cast<std::string>(1234000000000.0));
+
+        // char
+        EXPECT_EQ("a", multi_cast<std::string>('a'));
+        EXPECT_EQ("\n", multi_cast<std::string>('\n'));
+
+        // bool
+        EXPECT_EQ("true", multi_cast<std::string>(true));
+        EXPECT_EQ("false", multi_cast<std::string>(false));
+
+        // string
+        EXPECT_EQ("testTEST123", multi_cast<std::string>("testTEST123"));
+        EXPECT_EQ("", multi_cast<std::string>(""));
+
+        // TODO: Check consistency of conversion depending on MathConvert.h and reversibility
+/*
+        // Vector2
+        EXPECT_EQ("Vector2(10.1, 20)", multi_cast<std::string>(Vector2(10.1, 20)));
+
+        // Vector3
+        EXPECT_EQ("Vector3(10.1, 20, 300000)", multi_cast<std::string>(Vector3(10.1, 20, 300000)));
+
+        // Vector4
+        EXPECT_EQ("Vector4(10.1, 20, 300000, -321)", multi_cast<std::string>(Vector4(10.1, 20, 300000, -321)));
+
+        // Quaternion
+        EXPECT_EQ("Quaternion(10.1, 20, 300000, -321)", multi_cast<std::string>(Quaternion(10.1, 20, 300000, -321)));
+
+        // ColourValue
+        EXPECT_EQ("ColourValue(10.1, 20, 300000, -321)", multi_cast<std::string>(ColourValue(10.1, 20, 300000, -321)));
+
+        // Radian
+        EXPECT_EQ("Radian(1.234)", multi_cast<std::string>(Radian(1.234)));
+
+        // Degree
+        EXPECT_EQ("Degree(123)", multi_cast<std::string>(Degree(123)));
+*/
+    }
+
+    TEST(multi_cast, FromString)
+    {
+        // int
+        EXPECT_EQ(5, multi_cast<int>(std::string("5")));
+        EXPECT_EQ(-13, multi_cast<int>(std::string("-13")));
+
+        // unsigned int
+        EXPECT_EQ(0U, multi_cast<unsigned int>(std::string("0")));
+        EXPECT_EQ(4000000000LL, multi_cast<unsigned int>(std::string("4000000000")));
+
+        // float
+        EXPECT_EQ(0.0f, multi_cast<float>(std::string("0")));
+        EXPECT_EQ(10.0f, multi_cast<float>(std::string("10")));
+        EXPECT_EQ(123.456f, multi_cast<float>(std::string("123.456")));
+        EXPECT_EQ(1234000000000.0f, multi_cast<float>(std::string("1.234e+012")));
+
+        // double
+        EXPECT_EQ(0.0, multi_cast<double>(std::string("0")));
+        EXPECT_EQ(10.0, multi_cast<double>(std::string("10")));
+        EXPECT_EQ(123.456, multi_cast<double>(std::string("123.456")));
+        EXPECT_EQ(1234000000000.0, multi_cast<double>(std::string("1.234e+012")));
+
+        // char
+        EXPECT_EQ('a', multi_cast<char>(std::string("a")));
+        EXPECT_EQ('\n', multi_cast<char>(std::string("\n")));
+        EXPECT_EQ('\0', multi_cast<char>(std::string("")));
+
+        // bool
+        EXPECT_TRUE(multi_cast<bool>(std::string("true")));
+        EXPECT_FALSE(multi_cast<bool>(std::string("false")));
+
+        // TODO: Check consistency of conversion depending on MathConvert.h and reversibility
+/*
+        // Vector2
+        EXPECT_EQ(Vector2(10.1, 20), multi_cast<Vector2>(std::string("Vector2(10.1, 20)")));
+
+        // Vector3
+        EXPECT_EQ(Vector3(10.1, 20, 300000), multi_cast<Vector3>(std::string("Vector3(10.1, 20, 300000)")));
+
+        // Vector4
+        EXPECT_EQ(Vector4(10.1, 20, 300000, -321), multi_cast<Vector4>(std::string("Vector4(10.1, 20, 300000, -321)")));
+
+        // Quaternion
+        EXPECT_EQ(Quaternion(10.1, 20, 300000, -321), multi_cast<Quaternion>(std::string("Quaternion(10.1, 20, 300000, -321)")));
+
+        // ColourValue
+        EXPECT_EQ(ColourValue(10.1, 20, 300000, -321), multi_cast<ColourValue>(std::string("ColourValue(10.1, 20, 300000, -321)")));
+
+        // Radian
+        EXPECT_EQ(Radian(1.234), multi_cast<Radian>(std::string("Radian(1.234)")));
+
+        // Degree
+        EXPECT_EQ(Degree(123), multi_cast<Degree>(std::string("Degree(123)")));
+*/
+    }
+}
Index: code/branches/testing/test/util/MathTest.cc
===================================================================
--- code/branches/testing/test/util/MathTest.cc	(revision 9113)
+++ code/branches/testing/test/util/MathTest.cc	(revision 9114)
@@ -324,5 +324,5 @@
     TEST(getUniqueNumber, Test)
     {
-        std::set<float> numbers;
+        std::set<unsigned long> numbers;
 
         const size_t iterations = 1000;
Index: code/branches/testing/test/util/ScopeTest.cc
===================================================================
--- code/branches/testing/test/util/ScopeTest.cc	(revision 9114)
+++ code/branches/testing/test/util/ScopeTest.cc	(revision 9114)
@@ -0,0 +1,84 @@
+#include <gtest/gtest.h>
+#include "util/ScopedSingletonManager.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class TestSingletonRoot : public Singleton<TestSingletonRoot>
+        {
+            friend class Singleton<TestSingletonRoot>;
+            static TestSingletonRoot* singletonPtr_s;
+        };
+        class TestSingletonGraphics : public Singleton<TestSingletonGraphics>
+        {
+            friend class Singleton<TestSingletonGraphics>;
+            static TestSingletonGraphics* singletonPtr_s;
+        };
+
+        ManageScopedSingleton(TestSingletonRoot, ScopeID::Root, false);
+        ManageScopedSingleton(TestSingletonGraphics, ScopeID::Graphics, false);
+    }
+
+    TEST(Scope, ScopesDoNotExist)
+    {
+        EXPECT_FALSE(Scope<ScopeID::Root>::isActive());
+        EXPECT_FALSE(Scope<ScopeID::Graphics>::isActive());
+    }
+
+    TEST(Scope, SingletonsDoNotExist)
+    {
+        EXPECT_FALSE(TestSingletonRoot::exists());
+        EXPECT_FALSE(TestSingletonGraphics::exists());
+    }
+
+    TEST(Scope, RootScope)
+    {
+        EXPECT_FALSE(Scope<ScopeID::Root>::isActive());
+        {   // create root scope
+            Scope<ScopeID::Root> scope;
+            EXPECT_TRUE(Scope<ScopeID::Root>::isActive());
+        }   // destroy root scope
+        EXPECT_FALSE(Scope<ScopeID::Root>::isActive());
+    }
+
+    TEST(Scope, RootAndGraphicsScope)
+    {
+        EXPECT_FALSE(Scope<ScopeID::Graphics>::isActive());
+        {   // create root scope
+            Scope<ScopeID::Root> scope;
+            EXPECT_FALSE(Scope<ScopeID::Graphics>::isActive());
+            {   // create graphics scope
+                Scope<ScopeID::Graphics> scope;
+                EXPECT_TRUE(Scope<ScopeID::Graphics>::isActive());
+            }   // destroy graphics scope
+            EXPECT_FALSE(Scope<ScopeID::Graphics>::isActive());
+        }   // destroy root scope
+        EXPECT_FALSE(Scope<ScopeID::Graphics>::isActive());
+    }
+
+    TEST(Scope, RootSingleton)
+    {
+        EXPECT_FALSE(TestSingletonRoot::exists());
+        {   // create root scope
+            Scope<ScopeID::Root> scope;
+            EXPECT_TRUE(TestSingletonRoot::exists());
+        }   // destroy root scope
+        EXPECT_FALSE(TestSingletonRoot::exists());
+    }
+
+    TEST(Scope, RootAndGraphicsSingleton)
+    {
+        EXPECT_FALSE(TestSingletonGraphics::exists());
+        {   // create root scope
+            Scope<ScopeID::Root> scope;
+            EXPECT_FALSE(TestSingletonGraphics::exists());
+            {   // create graphics scope
+                Scope<ScopeID::Graphics> scope;
+                EXPECT_TRUE(TestSingletonGraphics::exists());
+            }   // destroy graphics scope
+            EXPECT_FALSE(TestSingletonGraphics::exists());
+        }   // destroy root scope
+        EXPECT_FALSE(TestSingletonGraphics::exists());
+    }
+}
Index: code/branches/testing/test/util/SharedPtrTest.cc
===================================================================
--- code/branches/testing/test/util/SharedPtrTest.cc	(revision 9114)
+++ code/branches/testing/test/util/SharedPtrTest.cc	(revision 9114)
@@ -0,0 +1,184 @@
+#include <gtest/gtest.h>
+#include <gmock/gmock.h>
+#include "util/SharedPtr.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class TestClass
+        {
+            public:
+                TestClass() : value_(0) {}
+                virtual ~TestClass() {}
+
+                void setValue(int value) { this->value_ = value; }
+                int getValue() const { return this->value_; }
+
+            private:
+                int value_;
+        };
+
+        class TestChildClass : public TestClass
+        {
+            public:
+                TestChildClass() {}
+                virtual ~TestChildClass() {}
+        };
+
+        class TestClassMock : public TestClass
+        {
+            public:
+                TestClassMock() {}
+                ~TestClassMock() { objectDestroyed(); }
+
+                MOCK_METHOD0(objectDestroyed, void());
+        };
+    }
+
+    TEST(SharedPtr, ConstructorDefault)
+    {
+        SharedPtr<TestClass> test;
+        EXPECT_EQ(0, test.get());
+    }
+
+    TEST(SharedPtr, ConstructorPointer)
+    {
+        TestClass* pointer = new TestClass();
+
+        SharedPtr<TestClass> test = pointer;
+        EXPECT_EQ(pointer, test.get());
+    }
+
+    TEST(SharedPtr, ConstructorChildPointer)
+    {
+        TestChildClass* pointer = new TestChildClass();
+
+        SharedPtr<TestClass> test = pointer;
+        EXPECT_EQ(pointer, test.get());
+    }
+
+    TEST(SharedPtr, ConstructorOther)
+    {
+        TestClass* pointer = new TestClass();
+
+        SharedPtr<TestClass> other = pointer;
+        EXPECT_EQ(pointer, other.get());
+
+        SharedPtr<TestClass> test = other;
+        EXPECT_EQ(pointer, test.get());
+    }
+
+    TEST(SharedPtr, ConstructorOtherChild)
+    {
+        TestChildClass* pointer = new TestChildClass();
+
+        SharedPtr<TestChildClass> other = pointer;
+        EXPECT_EQ(pointer, other.get());
+
+        SharedPtr<TestClass> test = other;
+        EXPECT_EQ(pointer, test.get());
+    }
+
+    TEST(SharedPtr, Assign)
+    {
+        TestClass* pointer = new TestClass();
+
+        SharedPtr<TestClass> other = pointer;
+        EXPECT_EQ(pointer, other.get());
+
+        SharedPtr<TestClass> test;
+        EXPECT_EQ(0, test.get());
+
+        test = other;
+        EXPECT_EQ(pointer, test.get());
+    }
+
+    TEST(SharedPtr, AssignChild)
+    {
+        TestChildClass* pointer = new TestChildClass();
+
+        SharedPtr<TestChildClass> other = pointer;
+        EXPECT_EQ(pointer, other.get());
+
+        SharedPtr<TestClass> test;
+        EXPECT_EQ(0, test.get());
+
+        test = other;
+        EXPECT_EQ(pointer, test.get());
+    }
+
+    TEST(SharedPtr, Cast)
+    {
+        TestChildClass* pointer = new TestChildClass();
+
+        SharedPtr<TestChildClass> other = pointer;
+        EXPECT_EQ(pointer, other.get());
+
+        SharedPtr<TestClass> test = other.cast<TestClass>();
+        EXPECT_EQ(pointer, test.get());
+    }
+
+    TEST(SharedPtr, Access)
+    {
+        TestClass* pointer = new TestClass();
+
+        SharedPtr<TestClass> test = pointer;
+        EXPECT_EQ(pointer, test.get());
+
+        EXPECT_EQ(0, test->getValue());
+        test->setValue(5);
+        EXPECT_EQ(5, test->getValue());
+        EXPECT_EQ(5, (*test).getValue());
+    }
+
+    TEST(SharedPtr, Boolean)
+    {
+        SharedPtr<TestClass> test;
+        EXPECT_EQ(0, test.get());
+        EXPECT_FALSE(test);
+
+        TestClass* pointer = new TestClass();
+
+        test = pointer;
+        EXPECT_EQ(pointer, test.get());
+        EXPECT_TRUE(test);
+    }
+
+    TEST(SharedPtr, Swap)
+    {
+        TestClass* pointer1 = new TestClass();
+        TestClass* pointer2 = new TestClass();
+
+        SharedPtr<TestClass> test1 = pointer1;
+        SharedPtr<TestClass> test2 = pointer2;
+
+        EXPECT_EQ(pointer1, test1.get());
+        EXPECT_EQ(pointer2, test2.get());
+
+        test1.swap(test2);
+
+        EXPECT_EQ(pointer2, test1.get());
+        EXPECT_EQ(pointer1, test2.get());
+    }
+
+    TEST(SharedPtr, ObjectDestroyedOnePointer)
+    {
+        TestClassMock* pointer = new TestClassMock();
+        SharedPtr<TestClass> test = pointer;
+
+        EXPECT_CALL(*pointer, objectDestroyed()).Times(1);
+    }
+
+    TEST(SharedPtr, ObjectDestroyedManyPointers)
+    {
+        TestClassMock* pointer = new TestClassMock();
+
+        SharedPtr<TestClass> test = pointer;
+        std::vector<SharedPtr<TestClass> > tests;
+        for (size_t i = 0; i < 100; ++i)
+            tests.push_back(SharedPtr<TestClass>(test));
+
+        EXPECT_CALL(*pointer, objectDestroyed()).Times(1);
+    }
+}
Index: code/branches/testing/test/util/SingletonTest.cc
===================================================================
--- code/branches/testing/test/util/SingletonTest.cc	(revision 9114)
+++ code/branches/testing/test/util/SingletonTest.cc	(revision 9114)
@@ -0,0 +1,84 @@
+#include <gtest/gtest.h>
+#include "util/Singleton.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class TestSingleton : public Singleton<TestSingleton>
+        {
+            friend class Singleton<TestSingleton>;
+
+            public:
+                TestSingleton() : value_(MAGIC_VALUE) {}
+                virtual ~TestSingleton() {}
+
+                size_t getValue() const { return this->value_; }
+
+                static const size_t MAGIC_VALUE;
+
+            private:
+                size_t value_;
+                static TestSingleton* singletonPtr_s;
+        };
+
+        TestSingleton* TestSingleton::singletonPtr_s = NULL;
+        const size_t TestSingleton::MAGIC_VALUE = 0xCAFEBABE;
+    }
+
+    TEST(DISABLED_SingletonDeathTest, MustBeUnique)
+    {
+        // create first instance
+        TestSingleton* instance = new TestSingleton();
+        // create second instance, must abort
+        EXPECT_DEATH(new TestSingleton(), ".*");
+
+        delete instance;
+    }
+
+    TEST(DISABLED_SingletonDeathTest, MustBeCreated)
+    {
+        // no instance created, must abort
+        EXPECT_DEATH(TestSingleton::getInstance(), ".*");
+    }
+
+    TEST(DISABLED_SingletonDeathTest, MustBeReset)
+    {
+        // create instance
+        TestSingleton* instance = new TestSingleton();
+        // getInstance() must return newly created instance
+        EXPECT_EQ(instance, &TestSingleton::getInstance());
+
+        // delete instance
+        delete instance;
+        // must abort
+        EXPECT_DEATH(TestSingleton::getInstance(), ".*");
+    }
+
+    TEST(Singleton, MustBeTheSame)
+    {
+        // create instance
+        TestSingleton* instance = new TestSingleton();
+
+        EXPECT_EQ(instance, &TestSingleton::getInstance());
+        EXPECT_EQ(TestSingleton::MAGIC_VALUE, TestSingleton::getInstance().getValue());
+
+        // delete instance
+        delete instance;
+    }
+
+    TEST(Singleton, Exists)
+    {
+        EXPECT_FALSE(TestSingleton::exists());
+
+        // create instance
+        TestSingleton* instance = new TestSingleton();
+
+        EXPECT_TRUE(TestSingleton::exists());
+
+        // delete instance
+        delete instance;
+
+        EXPECT_FALSE(TestSingleton::exists());
+    }
+}
Index: code/branches/testing/test/util/SmallObjectAllocatorTest.cc
===================================================================
--- code/branches/testing/test/util/SmallObjectAllocatorTest.cc	(revision 9114)
+++ code/branches/testing/test/util/SmallObjectAllocatorTest.cc	(revision 9114)
@@ -0,0 +1,282 @@
+#include <gtest/gtest.h>
+#include "util/SmallObjectAllocator.h"
+
+namespace orxonox
+{
+    //////////////////////////////////////////
+    // Allocate objects with primitive type //
+    //////////////////////////////////////////
+
+    class SmallObjectAllocatorTestInt : public testing::Test
+    {
+        public:
+            SmallObjectAllocatorTestInt() : allocator_(sizeof(size_t), 10)
+            {
+                SmallObjectAllocatorTestInt::count++;
+            }
+
+        protected:
+            size_t* create(size_t value)
+            {
+                void* chunk = this->allocator_.alloc();
+                size_t* pointer = new (chunk) size_t;
+                *pointer = value;
+
+                return pointer;
+            }
+
+            void destroy(size_t* pointer)
+            {
+                this->allocator_.free(pointer);
+            }
+
+            SmallObjectAllocator allocator_;
+            static size_t count;
+    };
+
+    size_t SmallObjectAllocatorTestInt::count = 0;
+
+    TEST_F(SmallObjectAllocatorTestInt, Default)
+    {
+        // Test if the fixture was created
+        EXPECT_EQ(1u, SmallObjectAllocatorTestInt::count);
+    }
+
+    TEST_F(SmallObjectAllocatorTestInt, Create)
+    {
+        // create an integer
+        size_t* pointer = this->create(5);
+        ASSERT_NE((void*)0, pointer);
+        EXPECT_EQ(5u, *pointer);
+    }
+
+    TEST_F(SmallObjectAllocatorTestInt, CreateAndDestroy)
+    {
+        // create an integer
+        size_t* pointer = this->create(5);
+        ASSERT_NE((void*)0, pointer);
+        EXPECT_EQ(5u, *pointer);
+
+        // destroy it again
+        this->destroy(pointer);
+    }
+
+    TEST_F(SmallObjectAllocatorTestInt, Create100)
+    {
+        std::vector<size_t*> pointers;
+
+        // create 100 integers. this is greater than the amount of chunks per block, hence the allocator has to allocate multiple blocks
+        static const size_t LIMIT = 100;
+        for (size_t i = 0; i < LIMIT; ++i)
+        {
+            size_t* pointer = this->create(i);
+            EXPECT_EQ(i, *pointer);
+            pointers.push_back(pointer);
+        }
+
+        EXPECT_EQ(LIMIT, pointers.size());
+
+        // check if all integers are still valid
+        for (size_t i = 0; i < LIMIT; ++i)
+        {
+            EXPECT_EQ(i, *pointers[i]);
+        }
+    }
+
+    TEST_F(SmallObjectAllocatorTestInt, Create100Destroy50)
+    {
+        std::vector<size_t*> pointers;
+
+        // create 100 integers
+        static const size_t LIMIT = 100;
+        for (size_t i = 0; i < LIMIT; ++i)
+        {
+            size_t* pointer = this->create(i);
+            EXPECT_EQ(i, *pointer);
+            pointers.push_back(pointer);
+        }
+
+        EXPECT_EQ(LIMIT, pointers.size());
+
+        // destroy the first 50
+        for (size_t i = 0; i < LIMIT / 2; ++i)
+        {
+            this->destroy(pointers[i]);
+        }
+
+        // check if the remaining integers are still valid
+        for (size_t i = LIMIT / 2; i < LIMIT; ++i)
+        {
+            EXPECT_EQ(i, *pointers[i]);
+        }
+    }
+
+    TEST_F(SmallObjectAllocatorTestInt, Create100Destroy50Create100)
+    {
+        std::vector<size_t*> pointers;
+
+        // create 100 integers
+        static const size_t LIMIT = 100;
+        for (size_t i = 0; i < LIMIT; ++i)
+        {
+            size_t* pointer = this->create(i);
+            EXPECT_EQ(i, *pointer);
+            pointers.push_back(pointer);
+        }
+
+        EXPECT_EQ(LIMIT, pointers.size());
+
+        // destroy the first 50
+        for (size_t i = 0; i < LIMIT / 2; ++i)
+        {
+            this->destroy(pointers[i]);
+        }
+
+        // create 100 more integers
+        for (size_t i = LIMIT; i < LIMIT * 2; ++i)
+        {
+            size_t* pointer = this->create(i);
+            EXPECT_EQ(i, *pointer);
+            pointers.push_back(pointer);
+        }
+
+        EXPECT_EQ(LIMIT * 2, pointers.size());
+
+        // check if the remaining and the new integers are valid
+        for (size_t i = LIMIT / 2; i < LIMIT * 2; ++i)
+        {
+            EXPECT_EQ(i, *pointers[i]);
+        }
+    }
+
+
+    /////////////////////////////////////////////////////
+    // Allocate objects which are instances of a class //
+    /////////////////////////////////////////////////////
+
+    class SmallObjectAllocatorTestObject : public testing::Test
+    {
+        protected:
+            class SmallObject
+            {
+                public:
+                    static size_t total_s;
+
+                    SmallObject(size_t value)
+                    {
+                        this->value_ = value;
+                        SmallObject::total_s += this->value_;
+                    }
+
+                    ~SmallObject()
+                    {
+                        SmallObject::total_s -= this->value_;
+                    }
+
+                    size_t getValue() const
+                    {
+                        return this->value_;
+                    }
+
+                private:
+                    size_t value_;
+            };
+
+        public:
+            SmallObjectAllocatorTestObject() : allocator_(sizeof(SmallObject), 10)
+            {
+                SmallObjectAllocatorTestObject::count++;
+                SmallObject::total_s = 0;
+            }
+
+        protected:
+            SmallObject* create(size_t value)
+            {
+                // allocate memory
+                void* chunk = this->allocator_.alloc();
+                // execute placement new operator
+                SmallObject* pointer = new (chunk) SmallObject(value);
+
+                return pointer;
+            }
+
+            void destroy(SmallObject* pointer)
+            {
+                // call destructor
+                pointer->~SmallObject();
+                // free memory
+                this->allocator_.free(pointer);
+            }
+
+            SmallObjectAllocator allocator_;
+            static size_t count;
+    };
+
+    size_t SmallObjectAllocatorTestObject::count = 0;
+    size_t SmallObjectAllocatorTestObject::SmallObject::total_s = 0;
+
+    TEST_F(SmallObjectAllocatorTestObject, Default)
+    {
+        // Test if the fixture was created
+        EXPECT_EQ(1u, SmallObjectAllocatorTestObject::count);
+    }
+
+    TEST_F(SmallObjectAllocatorTestObject, Create)
+    {
+        EXPECT_EQ(0u, SmallObject::total_s);
+
+        // create an object
+        SmallObject* pointer = this->create(5);
+        ASSERT_NE((void*)0, pointer);
+        EXPECT_EQ(5u, pointer->getValue());
+        EXPECT_EQ(5u, SmallObject::total_s);
+    }
+
+    TEST_F(SmallObjectAllocatorTestObject, CreateAndDestroy)
+    {
+        EXPECT_EQ(0u, SmallObject::total_s);
+
+        // create an object
+        SmallObject* pointer = this->create(5);
+        ASSERT_NE((void*)0, pointer);
+        EXPECT_EQ(5u, pointer->getValue());
+        EXPECT_EQ(5u, SmallObject::total_s);
+
+        // destroy it again
+        this->destroy(pointer);
+        EXPECT_EQ(0u, SmallObject::total_s);
+    }
+
+    TEST_F(SmallObjectAllocatorTestObject, CreateAndDestroy100)
+    {
+        std::vector<SmallObject*> pointers;
+
+        // create 100 objects. this is greater than the amount of chunks per block, hence the allocator has to allocate multiple blocks
+        static const size_t LIMIT = 100;
+        size_t total = 0;
+        for (size_t i = 0; i < LIMIT; ++i)
+        {
+            SmallObject* pointer = this->create(i);
+            EXPECT_EQ(i, pointer->getValue());
+            pointers.push_back(pointer);
+            total += i;
+        }
+
+        EXPECT_EQ(LIMIT, pointers.size());
+        EXPECT_EQ(total, SmallObject::total_s);
+
+        // check if all objects are still valid
+        for (size_t i = 0; i < LIMIT; ++i)
+        {
+            EXPECT_EQ(i, pointers[i]->getValue());
+        }
+
+        // destroy all objects
+        for (size_t i = 0; i < LIMIT; ++i)
+        {
+            this->destroy(pointers[i]);
+        }
+
+        EXPECT_EQ(0u, SmallObject::total_s);
+    }
+}
Index: code/branches/testing/test/util/StringUtilsTest.cc
===================================================================
--- code/branches/testing/test/util/StringUtilsTest.cc	(revision 9114)
+++ code/branches/testing/test/util/StringUtilsTest.cc	(revision 9114)
@@ -0,0 +1,355 @@
+#include <gtest/gtest.h>
+#include "util/StringUtils.h"
+
+namespace orxonox
+{
+    TEST(StringUtils, BLANKSTRING)
+    {
+        EXPECT_EQ("", BLANKSTRING);
+    }
+
+    TEST(StringUtils, getUniqueNumberString)
+    {
+        std::set<std::string> numberStrings;
+
+        const size_t iterations = 1000;
+
+        for (size_t i = 0; i < iterations; ++i)
+            numberStrings.insert(getUniqueNumberString());
+
+        // must have exactly <iterations> entries in the set, since all strings should be unique
+        EXPECT_EQ(iterations, numberStrings.size());
+    }
+
+//    _UtilExport std::string  getStripped(const std::string& str);
+    TEST(StringUtils, getStripped)
+    {
+        EXPECT_EQ("", getStripped(""));
+        EXPECT_EQ("test", getStripped("test"));
+        EXPECT_EQ("test", getStripped("te st"));
+        EXPECT_EQ("test", getStripped("   test"));
+        EXPECT_EQ("test", getStripped("test  "));
+        EXPECT_EQ("test", getStripped("   test   "));
+        EXPECT_EQ("test", getStripped("   t  e  s  t   "));
+        EXPECT_EQ("test", getStripped("  \t te \n\n\n  st\n"));
+    }
+
+//    _UtilExport std::string  removeTrailingWhitespaces(const std::string& str);
+    TEST(StringUtils, removeTrailingWhitespaces)
+    {
+        EXPECT_EQ("", removeTrailingWhitespaces(""));
+        EXPECT_EQ("test", removeTrailingWhitespaces("test"));
+        EXPECT_EQ("test", removeTrailingWhitespaces("   test"));
+        EXPECT_EQ("test", removeTrailingWhitespaces("test"));
+        EXPECT_EQ("test", removeTrailingWhitespaces("   test   "));
+        EXPECT_EQ("test", removeTrailingWhitespaces(" \t  test  \n "));
+        EXPECT_EQ("te  st", removeTrailingWhitespaces("te  st"));
+        EXPECT_EQ("te  st", removeTrailingWhitespaces("   te  st   "));
+        EXPECT_EQ("Hel lo\nWo rld", removeTrailingWhitespaces(" \t Hel lo\nWo rld \n"));
+    }
+
+//    _UtilExport void         vectorize(const std::string& str, char delimiter, std::vector<std::string>* output);
+    TEST(StringUtils, vectorize)
+    {
+        std::vector<std::string> output;
+        vectorize("this is a test", ' ', &output);
+        ASSERT_EQ(4u, output.size());
+        EXPECT_EQ("this", output[0]);
+        EXPECT_EQ("is", output[1]);
+        EXPECT_EQ("a", output[2]);
+        EXPECT_EQ("test", output[3]);
+
+        vectorize("this is a test", 't', &output);
+        ASSERT_EQ(4u, output.size());
+        EXPECT_EQ("", output[0]);
+        EXPECT_EQ("his is a ", output[1]);
+        EXPECT_EQ("es", output[2]);
+        EXPECT_EQ("", output[3]);
+    }
+
+//    _UtilExport size_t       getNextQuote(const std::string& str, size_t start = 0);
+    TEST(StringUtils, getNextQuote)
+    {
+        EXPECT_EQ(std::string::npos, getNextQuote(""));
+        EXPECT_EQ(std::string::npos, getNextQuote("text"));
+        EXPECT_EQ(0u, getNextQuote("\"text"));
+        EXPECT_EQ(4u, getNextQuote("text\""));
+        EXPECT_EQ(std::string::npos, getNextQuote("\\\"text"));
+        EXPECT_EQ(std::string::npos, getNextQuote("text\\\""));
+        EXPECT_EQ(3u, getNextQuote("012\"456\"89", 0));
+        EXPECT_EQ(7u, getNextQuote("012\"456\"89", 5));
+    }
+
+//    _UtilExport bool         isBetweenQuotes(const std::string& str, size_t pos);
+    TEST(StringUtils, isBetweenQuotes)
+    {
+        EXPECT_FALSE(isBetweenQuotes("", 0));
+
+        EXPECT_FALSE(isBetweenQuotes("abc", 0));
+        EXPECT_FALSE(isBetweenQuotes("abc", 1));
+        EXPECT_FALSE(isBetweenQuotes("abc", 2));
+        EXPECT_FALSE(isBetweenQuotes("abc", 3));
+
+        EXPECT_FALSE(isBetweenQuotes("\"abc", 0));
+        EXPECT_FALSE(isBetweenQuotes("\"abc", 1));
+        EXPECT_FALSE(isBetweenQuotes("\"abc", 2));
+        EXPECT_FALSE(isBetweenQuotes("\"abc", 3));
+
+        EXPECT_FALSE(isBetweenQuotes("abc\"", 0));
+        EXPECT_FALSE(isBetweenQuotes("abc\"", 1));
+        EXPECT_FALSE(isBetweenQuotes("abc\"", 2));
+        EXPECT_FALSE(isBetweenQuotes("abc\"", 3));
+
+        EXPECT_FALSE(isBetweenQuotes("\"abc\"", 0));
+        EXPECT_TRUE(isBetweenQuotes("\"abc\"", 1));
+        EXPECT_TRUE(isBetweenQuotes("\"abc\"", 2));
+        EXPECT_TRUE(isBetweenQuotes("\"abc\"", 3));
+        EXPECT_FALSE(isBetweenQuotes("\"abc\"", 4));
+
+        //                            012 3456 7890
+        EXPECT_FALSE(isBetweenQuotes("abc\"abc\"abc", 0));
+        EXPECT_FALSE(isBetweenQuotes("abc\"abc\"abc", 1));
+        EXPECT_FALSE(isBetweenQuotes("abc\"abc\"abc", 2));
+        EXPECT_FALSE(isBetweenQuotes("abc\"abc\"abc", 3));
+        EXPECT_TRUE(isBetweenQuotes("abc\"abc\"abc", 4));
+        EXPECT_TRUE(isBetweenQuotes("abc\"abc\"abc", 5));
+        EXPECT_TRUE(isBetweenQuotes("abc\"abc\"abc", 6));
+        EXPECT_FALSE(isBetweenQuotes("abc\"abc\"abc", 7));
+        EXPECT_FALSE(isBetweenQuotes("abc\"abc\"abc", 8));
+        EXPECT_FALSE(isBetweenQuotes("abc\"abc\"abc", 9));
+        EXPECT_FALSE(isBetweenQuotes("abc\"abc\"abc", 10));
+    }
+
+//    _UtilExport bool         hasStringBetweenQuotes(const std::string& str);
+    TEST(StringUtils, hasStringBetweenQuotes)
+    {
+        EXPECT_FALSE(hasStringBetweenQuotes(""));
+        EXPECT_FALSE(hasStringBetweenQuotes("test"));
+        EXPECT_FALSE(hasStringBetweenQuotes("\"test"));
+        EXPECT_FALSE(hasStringBetweenQuotes("te\"st"));
+        EXPECT_FALSE(hasStringBetweenQuotes("test\""));
+        EXPECT_TRUE(hasStringBetweenQuotes("\"test\""));
+        EXPECT_TRUE(hasStringBetweenQuotes("te\"st\""));
+        EXPECT_TRUE(hasStringBetweenQuotes("\"te\"st"));
+        EXPECT_FALSE(hasStringBetweenQuotes("te\"\"st"));
+        EXPECT_FALSE(hasStringBetweenQuotes("\"\"test"));
+        EXPECT_FALSE(hasStringBetweenQuotes("test\"\""));
+    }
+
+//    _UtilExport std::string  getStringBetweenQuotes(const std::string& str);
+    TEST(StringUtils, getStringBetweenQuotes)
+    {
+        EXPECT_EQ("", getStringBetweenQuotes(""));
+        EXPECT_EQ("", getStringBetweenQuotes("test"));
+        EXPECT_EQ("", getStringBetweenQuotes("\"test"));
+        EXPECT_EQ("", getStringBetweenQuotes("te\"st"));
+        EXPECT_EQ("", getStringBetweenQuotes("test\""));
+        EXPECT_EQ("test", getStringBetweenQuotes("\"test\""));
+        EXPECT_EQ("st", getStringBetweenQuotes("te\"st\""));
+        EXPECT_EQ("te", getStringBetweenQuotes("\"te\"st"));
+        EXPECT_EQ("", getStringBetweenQuotes("te\"\"st"));
+        EXPECT_EQ("", getStringBetweenQuotes("\"\"test"));
+        EXPECT_EQ("", getStringBetweenQuotes("test\"\""));
+    }
+
+//    _UtilExport std::string  stripEnclosingQuotes(const std::string& str);
+    TEST(StringUtils, stripEnclosingQuotes)
+    {
+        EXPECT_EQ("", stripEnclosingQuotes(""));
+        EXPECT_EQ("test", stripEnclosingQuotes("test"));
+        EXPECT_EQ(" test", stripEnclosingQuotes(" test"));
+        EXPECT_EQ("   test   ", stripEnclosingQuotes("   test   "));
+        EXPECT_EQ("\"test", stripEnclosingQuotes("\"test"));
+        EXPECT_EQ("test\"", stripEnclosingQuotes("test\""));
+        EXPECT_EQ(" \"test", stripEnclosingQuotes(" \"test"));
+        EXPECT_EQ("test\" ", stripEnclosingQuotes("test\" "));
+        EXPECT_EQ("test", stripEnclosingQuotes("\"test\""));
+        EXPECT_EQ("test", stripEnclosingQuotes("  \"test\"  "));
+        EXPECT_EQ("a  \"test\"  ", stripEnclosingQuotes("a  \"test\"  "));
+    }
+
+//    _UtilExport std::string  stripEnclosingBraces(const std::string& str);
+    TEST(StringUtils, stripEnclosingBraces)
+    {
+        EXPECT_EQ("", stripEnclosingBraces(""));
+        EXPECT_EQ("test", stripEnclosingBraces("test"));
+        EXPECT_EQ("{test", stripEnclosingBraces("{test"));
+        EXPECT_EQ("test}", stripEnclosingBraces("test}"));
+        EXPECT_EQ("t{es}t", stripEnclosingBraces("t{es}t"));
+        EXPECT_EQ(" {test}", stripEnclosingBraces(" {test}"));
+        EXPECT_EQ("}test}", stripEnclosingBraces("}test}"));
+        EXPECT_EQ("{test{", stripEnclosingBraces("{test{"));
+        EXPECT_EQ("test", stripEnclosingBraces("{test}"));
+    }
+
+//    _UtilExport bool         isEmpty(const std::string& str);
+    TEST(StringUtils, isEmpty)
+    {
+        EXPECT_TRUE(isEmpty(""));
+        EXPECT_TRUE(isEmpty(" "));
+        EXPECT_TRUE(isEmpty("       "));
+        EXPECT_TRUE(isEmpty("\t"));
+        EXPECT_TRUE(isEmpty("\n"));
+        EXPECT_TRUE(isEmpty(" \t\n\t\n  \t"));
+        EXPECT_FALSE(isEmpty("a"));
+        EXPECT_FALSE(isEmpty("test"));
+        EXPECT_FALSE(isEmpty("    a   "));
+    }
+
+//    _UtilExport bool         isComment(const std::string& str);
+    TEST(StringUtils, isComment)
+    {
+        EXPECT_FALSE(isComment(""));
+        EXPECT_FALSE(isComment("test"));
+        EXPECT_TRUE(isComment("#test"));
+        EXPECT_TRUE(isComment("%test"));
+        EXPECT_TRUE(isComment(";test"));
+        EXPECT_TRUE(isComment("//test"));
+        EXPECT_FALSE(isComment("/test"));
+
+        EXPECT_TRUE(isComment("        #test"));
+        EXPECT_TRUE(isComment("      %test"));
+        EXPECT_TRUE(isComment("    ;test"));
+        EXPECT_TRUE(isComment("  //test"));
+    }
+
+//    _UtilExport std::string  addSlashes(const std::string& str);
+    TEST(StringUtils, addSlashes)
+    {
+        EXPECT_EQ("", addSlashes(""));
+        EXPECT_EQ("test", addSlashes("test"));
+        EXPECT_EQ("test\\ntest", addSlashes("test\ntest"));
+        EXPECT_EQ("\\n\\t\\r\\f\\a\\b\\v\\\"\\\\", addSlashes("\n\t\r\f\a\b\v\"\\"));
+    }
+
+//    _UtilExport std::string  removeSlashes(const std::string& str);
+    TEST(StringUtils, removeSlashes)
+    {
+        EXPECT_EQ("", removeSlashes(""));
+        EXPECT_EQ("test", removeSlashes("test"));
+        EXPECT_EQ("test\ntest", removeSlashes("test\\ntest"));
+        EXPECT_EQ("\n\t\r\f\a\b\v\"\\", removeSlashes("\\n\\t\\r\\f\\a\\b\\v\\\"\\\\"));
+    }
+
+//    _UtilExport std::string  getLowercase(const std::string& str);
+    TEST(StringUtils, getLowercase)
+    {
+        EXPECT_EQ("", getLowercase(""));
+        EXPECT_EQ("test", getLowercase("test"));
+        EXPECT_EQ("test", getLowercase("Test"));
+        EXPECT_EQ("test", getLowercase("TeSt"));
+        EXPECT_EQ("test", getLowercase("TEST"));
+        EXPECT_EQ("a test b", getLowercase("a TEST b"));
+    }
+
+//    _UtilExport std::string  getUppercase(const std::string& str);
+    TEST(StringUtils, getUppercase)
+    {
+        EXPECT_EQ("", getUppercase(""));
+        EXPECT_EQ("TEST", getUppercase("test"));
+        EXPECT_EQ("TEST", getUppercase("Test"));
+        EXPECT_EQ("TEST", getUppercase("TeSt"));
+        EXPECT_EQ("TEST", getUppercase("TEST"));
+        EXPECT_EQ("A TEST B", getUppercase("A test B"));
+    }
+
+//    _UtilExport int          nocaseCmp(const std::string& s1, const std::string& s2);
+    TEST(StringUtils, nocaseCmp)
+    {
+        EXPECT_EQ(0, nocaseCmp("", ""));
+        EXPECT_EQ(0, nocaseCmp("a", "a"));
+        EXPECT_EQ(0, nocaseCmp("a", "A"));
+        EXPECT_EQ(0, nocaseCmp("A", "a"));
+        EXPECT_EQ(0, nocaseCmp("A", "A"));
+        EXPECT_EQ(0, nocaseCmp("test", "test"));
+        EXPECT_EQ(0, nocaseCmp("test", "TEST"));
+        EXPECT_EQ(0, nocaseCmp("tESt", "test"));
+        EXPECT_EQ(0, nocaseCmp("TesT", "teST"));
+
+        EXPECT_EQ(strcmp("a", "b"), nocaseCmp("a", "b"));
+        EXPECT_EQ(strcmp("b", "a"), nocaseCmp("b", "a"));
+        EXPECT_EQ(strcmp("hello", "world"), nocaseCmp("hello", "world"));
+    }
+
+//    _UtilExport int          nocaseCmp(const std::string& s1, const std::string& s2, size_t len);
+    TEST(StringUtils, nocaseCmpWithLen)
+    {
+        EXPECT_EQ(0, nocaseCmp("test", "TEST", 0));
+        EXPECT_EQ(0, nocaseCmp("test", "TEST", 1));
+        EXPECT_EQ(0, nocaseCmp("test", "TEST", 2));
+        EXPECT_EQ(0, nocaseCmp("test", "TEST", 3));
+        EXPECT_EQ(0, nocaseCmp("test", "TEST", 4));
+        EXPECT_EQ(0, nocaseCmp("test", "TEST", 5));
+    }
+
+//    _UtilExport bool         hasComment(const std::string& str);
+    TEST(StringUtils, hasComment)
+    {
+        EXPECT_FALSE(hasComment(""));
+        EXPECT_FALSE(hasComment("test"));
+        EXPECT_FALSE(hasComment(" asdf / asdf "));
+        EXPECT_TRUE(hasComment("#test"));
+        EXPECT_TRUE(hasComment(" %test"));
+        EXPECT_TRUE(hasComment("test ;test"));
+        EXPECT_TRUE(hasComment("test // test // test"));
+    }
+
+//    _UtilExport std::string  getComment(const std::string& str);
+    TEST(StringUtils, getComment)
+    {
+        EXPECT_EQ("", getComment(""));
+        EXPECT_EQ("", getComment("test"));
+        EXPECT_EQ("", getComment(" asdf / asdf "));
+        EXPECT_EQ("#test", getComment("#test"));
+        EXPECT_EQ(" %test", getComment(" %test"));
+        EXPECT_EQ(" ;test", getComment("test ;test"));
+        EXPECT_EQ(" // test // test", getComment("test // test // test"));
+    }
+
+//    _UtilExport size_t       getNextCommentPosition(const std::string& str, size_t start = 0);
+    TEST(StringUtils, getNextCommentPosition)
+    {
+        EXPECT_EQ(std::string::npos, getNextCommentPosition(""));
+        EXPECT_EQ(std::string::npos, getNextCommentPosition("test"));
+        EXPECT_EQ(std::string::npos, getNextCommentPosition(" asdf / asdf "));
+        EXPECT_EQ(0u, getNextCommentPosition("#test"));
+        EXPECT_EQ(0u, getNextCommentPosition(" %test"));
+        EXPECT_EQ(4u, getNextCommentPosition("test ;test"));
+        EXPECT_EQ(4u, getNextCommentPosition("test // test // test"));
+
+        EXPECT_EQ(std::string::npos, getNextCommentPosition("", 10));
+        EXPECT_EQ(std::string::npos, getNextCommentPosition("test", 10));
+        EXPECT_EQ(std::string::npos, getNextCommentPosition(" asdf / asdf ", 3));
+        EXPECT_EQ(std::string::npos, getNextCommentPosition("#test", 1));
+        EXPECT_EQ(1u, getNextCommentPosition(" %test", 1));
+        EXPECT_EQ(5u, getNextCommentPosition("test ;test", 5));
+        EXPECT_EQ(12u, getNextCommentPosition("test // test // test", 6));
+    }
+
+//    _UtilExport size_t       replaceCharacters(std::string& str, char target, char replacement);
+    TEST(StringUtils, replaceCharacters)
+    {
+        std::string test1 = "test";
+        EXPECT_EQ(1u, replaceCharacters(test1, 'e', '3'));
+        EXPECT_EQ("t3st", test1);
+
+        std::string test2 = "test";
+        EXPECT_EQ(2u, replaceCharacters(test2, 't', '1'));
+        EXPECT_EQ("1es1", test2);
+    }
+
+//    _UtilExport unsigned int getLevenshteinDistance(const std::string& str1, const std::string& str2);
+    TEST(StringUtils, getLevenshteinDistance)
+    {
+        EXPECT_EQ(0u, getLevenshteinDistance("test", "test"));
+        EXPECT_EQ(1u, getLevenshteinDistance("test", "tes"));
+        EXPECT_EQ(1u, getLevenshteinDistance("test", "testt"));
+        EXPECT_EQ(1u, getLevenshteinDistance("test", "t3st"));
+        EXPECT_EQ(1u, getLevenshteinDistance("test", "te1st"));
+        EXPECT_EQ(2u, getLevenshteinDistance("test", "1es1"));
+        EXPECT_EQ(3u, getLevenshteinDistance("test", "1es11"));
+        EXPECT_EQ(4u, getLevenshteinDistance("test", "blub"));
+        EXPECT_EQ(5u, getLevenshteinDistance("test", "abcde"));
+        EXPECT_EQ(6u, getLevenshteinDistance("test", "abcdef"));
+    }
+}
Index: code/branches/testing/test/util/SubStringTest.cc
===================================================================
--- code/branches/testing/test/util/SubStringTest.cc	(revision 9114)
+++ code/branches/testing/test/util/SubStringTest.cc	(revision 9114)
@@ -0,0 +1,191 @@
+#include <gtest/gtest.h>
+#include "util/SubString.h"
+
+namespace orxonox
+{
+    TEST(SubString, Empty)
+    {
+        SubString test;
+        EXPECT_TRUE(test.empty());
+        EXPECT_EQ(0u, test.size());
+    }
+
+    TEST(SubString, CreateSimple)
+    {
+        SubString test("This is a test");
+        EXPECT_FALSE(test.empty());
+        ASSERT_EQ(4u, test.size());
+
+        EXPECT_EQ("This", test[0]);
+        EXPECT_EQ("is", test[1]);
+        EXPECT_EQ("a", test[2]);
+        EXPECT_EQ("test", test[3]);
+
+        EXPECT_EQ("This", test.getString(0));
+        EXPECT_EQ("is", test.getString(1));
+        EXPECT_EQ("a", test.getString(2));
+        EXPECT_EQ("test", test.getString(3));
+
+        EXPECT_EQ("This", test.front());
+        EXPECT_EQ("test", test.back());
+    }
+
+    TEST(SubString, CreateDelimiter)
+    {
+        SubString test1("This|is|a|test");
+        EXPECT_EQ(1u, test1.size());
+
+        SubString test2("This|is|a|test", "|");
+        EXPECT_EQ(4u, test2.size());
+
+        SubString test3("This|is|a|test", "|e");
+        EXPECT_EQ(5u, test3.size());
+    }
+
+    TEST(SubString, CreateDelimiterNeighbours)
+    {
+        SubString test1("This | is | a | test", "|");
+        EXPECT_EQ(4u, test1.size());
+        EXPECT_EQ(" a ", test1[2]);
+
+        SubString test2("This | is | a | test", "|", " ");
+        EXPECT_EQ(4u, test2.size());
+        EXPECT_EQ("a", test2[2]);
+    }
+
+    TEST(SubString, CreateAllowEmptyEntries)
+    {
+        SubString test1("This |  | is |  | a ||| test", "|", " ");
+        EXPECT_EQ(4u, test1.size());
+
+        SubString test2("This |  | is |  | a ||| test", "|", " ", true);
+        EXPECT_EQ(8u, test2.size());
+    }
+
+    TEST(SubString, CreateEscapeChar)
+    {
+        SubString test1("This is a test", SubString::WhiteSpaces, "", false, '\\', true);
+        EXPECT_EQ(4u, test1.size());
+        EXPECT_EQ("is", test1[1]);
+
+        SubString test2("This is\\ a test", SubString::WhiteSpaces, "", false, '\\', true);
+        EXPECT_EQ(3u, test2.size());
+        EXPECT_EQ("is a", test2[1]);
+
+        SubString test3("This is\\ a test", SubString::WhiteSpaces, "", false, '\\', false);
+        EXPECT_EQ(3u, test3.size());
+        EXPECT_EQ("is\\ a", test3[1]);
+    }
+
+    TEST(SubString, CreateSafemodeChar)
+    {
+        SubString test1("This is a test", SubString::WhiteSpaces, "", false, '\\', true, '"', true);
+        EXPECT_EQ(4u, test1.size());
+        EXPECT_EQ("is", test1[1]);
+
+        SubString test2("This \"is a\" test", SubString::WhiteSpaces, "", false, '\\', true, '"', true);
+        EXPECT_EQ(3u, test2.size());
+        EXPECT_EQ("is a", test2[1]);
+
+        SubString test3("This \"is a\" test", SubString::WhiteSpaces, "", false, '\\', true, '"', false);
+        EXPECT_EQ(3u, test3.size());
+        EXPECT_EQ("\"is a\"", test3[1]);
+    }
+
+    TEST(SubString, CreateParenthesisChars)
+    {
+        SubString test1("This is a test", SubString::WhiteSpaces, "", false, '\\', true, '"', true, '{', '}', true);
+        EXPECT_EQ(4u, test1.size());
+        EXPECT_EQ("is", test1[1]);
+
+        SubString test2("This {is a} test", SubString::WhiteSpaces, "", false, '\\', true, '"', true, '{', '}', true);
+        EXPECT_EQ(3u, test2.size());
+        EXPECT_EQ("is a", test2[1]);
+
+        SubString test3("This {is a} test", SubString::WhiteSpaces, "", false, '\\', true, '"', true, '{', '}', false);
+        EXPECT_EQ(3u, test3.size());
+        EXPECT_EQ("{is a}", test3[1]);
+    }
+
+    TEST(SubString, Compare)
+    {
+        SubString test1("This is a test");
+        SubString test2("This is a test");
+        SubString test3("This is not a test");
+
+        EXPECT_TRUE(test1 == test2);
+        EXPECT_TRUE(test1.compare(test2));
+
+        EXPECT_FALSE(test1 == test3);
+        EXPECT_FALSE(test1.compare(test3));
+
+        EXPECT_FALSE(test1.compare(test3, 100));
+        EXPECT_FALSE(test1.compare(test3, 4));
+        EXPECT_FALSE(test1.compare(test3, 3));
+        EXPECT_TRUE(test1.compare(test3, 2));
+        EXPECT_TRUE(test1.compare(test3, 1));
+        EXPECT_TRUE(test1.compare(test3, 0));
+    }
+
+    TEST(SubString, Assign)
+    {
+        SubString test1("This is a test");
+        SubString test2("Hello World");
+
+        EXPECT_EQ(4u, test1.size());
+        EXPECT_EQ(2u, test2.size());
+        EXPECT_FALSE(test1 == test2);
+
+        test2 = test1;
+
+        EXPECT_EQ(4u, test1.size());
+        EXPECT_EQ(4u, test2.size());
+        EXPECT_TRUE(test1 == test2);
+    }
+
+    TEST(SubString, Append)
+    {
+        SubString test1("This is a test");
+        SubString test2("Hello World");
+
+        EXPECT_EQ(4u, test1.size());
+        EXPECT_EQ(2u, test2.size());
+
+        test1 += test2;
+
+        EXPECT_EQ(6u, test1.size());
+        EXPECT_EQ(2u, test2.size());
+    }
+
+    TEST(SubString, Join)
+    {
+        SubString test1("This is a test");
+
+        EXPECT_EQ("This is a test", test1.join());
+        EXPECT_EQ("This|is|a|test", test1.join("|"));
+        EXPECT_EQ("This123is123a123test", test1.join("123"));
+
+        SubString test2("Hello World");
+
+        EXPECT_EQ("Hello World", test2.join());
+
+        test1 += test2;
+
+        EXPECT_EQ("This is a test Hello World", test1.join());
+    }
+
+    TEST(SubString, Subset)
+    {
+        SubString test1("This is a test");
+        EXPECT_EQ(4u, test1.size());
+        EXPECT_EQ("This is a test", test1.join());
+
+        SubString test2 = test1.subSet(1);
+        ASSERT_EQ(3u, test2.size());
+        EXPECT_EQ("is a test", test2.join());
+
+        SubString test3 = test1.subSet(1, 2);
+        ASSERT_EQ(2u, test3.size());
+        EXPECT_EQ("is a", test3.join());
+    }
+}
Index: code/branches/testing/test/util/VA_NARGSTest.cc
===================================================================
--- code/branches/testing/test/util/VA_NARGSTest.cc	(revision 9114)
+++ code/branches/testing/test/util/VA_NARGSTest.cc	(revision 9114)
@@ -0,0 +1,62 @@
+#include <gtest/gtest.h>
+#include "util/VA_NARGS.h"
+
+TEST(VA_NARGS, DirectCall)
+{
+    //EXPECT_EQ(0, ORXONOX_VA_NARGS()); // documented issue of the macro - min number of elements is 1
+
+    EXPECT_EQ(1, ORXONOX_VA_NARGS(some));
+    EXPECT_EQ(2, ORXONOX_VA_NARGS(some, argument));
+    EXPECT_EQ(3, ORXONOX_VA_NARGS(some, argument, to));
+    EXPECT_EQ(4, ORXONOX_VA_NARGS(some, argument, to, test));
+    EXPECT_EQ(5, ORXONOX_VA_NARGS(some, argument, to, test, the));
+    EXPECT_EQ(6, ORXONOX_VA_NARGS(some, argument, to, test, the, macro));
+}
+
+
+#define TEST_MACRO_CONSTANT(...) \
+    BOOST_PP_EXPAND(BOOST_PP_CAT(TEST_MACRO_CONSTANT, ORXONOX_VA_NARGS(__VA_ARGS__)))
+
+#define TEST_MACRO_CONSTANT0 000
+#define TEST_MACRO_CONSTANT1 100
+#define TEST_MACRO_CONSTANT2 200
+#define TEST_MACRO_CONSTANT3 300
+#define TEST_MACRO_CONSTANT4 400
+#define TEST_MACRO_CONSTANT5 500
+#define TEST_MACRO_CONSTANT6 600
+
+TEST(VA_NARGS, MacroConstant)
+{
+    //EXPECT_EQ(000, TEST_MACRO_CONSTANT()); // documented issue of the macro - min number of elements is 1
+
+    EXPECT_EQ(100, TEST_MACRO_CONSTANT(some));
+    EXPECT_EQ(200, TEST_MACRO_CONSTANT(some, argument));
+    EXPECT_EQ(300, TEST_MACRO_CONSTANT(some, argument, to));
+    EXPECT_EQ(400, TEST_MACRO_CONSTANT(some, argument, to, test));
+    EXPECT_EQ(500, TEST_MACRO_CONSTANT(some, argument, to, test, the));
+    EXPECT_EQ(600, TEST_MACRO_CONSTANT(some, argument, to, test, the, macro));
+}
+
+
+#define TEST_MACRO_FUNCTION(...) \
+    BOOST_PP_EXPAND(BOOST_PP_CAT(TEST_MACRO_FUNCTION, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__))
+
+#define TEST_MACRO_FUNCTION0(...) 000
+#define TEST_MACRO_FUNCTION1(...) 100
+#define TEST_MACRO_FUNCTION2(...) 200
+#define TEST_MACRO_FUNCTION3(...) 300
+#define TEST_MACRO_FUNCTION4(...) 400
+#define TEST_MACRO_FUNCTION5(...) 500
+#define TEST_MACRO_FUNCTION6(...) 600
+
+TEST(VA_NARGS, MacroFunction)
+{
+    //EXPECT_EQ(000, TEST_MACRO_FUNCTION()); // documented issue of the macro - min number of elements is 1
+
+    EXPECT_EQ(100, TEST_MACRO_FUNCTION(some));
+    EXPECT_EQ(200, TEST_MACRO_FUNCTION(some, argument));
+    EXPECT_EQ(300, TEST_MACRO_FUNCTION(some, argument, to));
+    EXPECT_EQ(400, TEST_MACRO_FUNCTION(some, argument, to, test));
+    EXPECT_EQ(500, TEST_MACRO_FUNCTION(some, argument, to, test, the));
+    EXPECT_EQ(600, TEST_MACRO_FUNCTION(some, argument, to, test, the, macro));
+}
Index: code/branches/testing/test/util/mboolTest.cc
===================================================================
--- code/branches/testing/test/util/mboolTest.cc	(revision 9114)
+++ code/branches/testing/test/util/mboolTest.cc	(revision 9114)
@@ -0,0 +1,105 @@
+#include <gtest/gtest.h>
+#include "util/mbool.h"
+
+namespace orxonox
+{
+    TEST(mbool, Create)
+    {
+        // default constructor
+        mbool test1;
+        EXPECT_FALSE((bool)test1);
+
+        // initialize with false
+        mbool test2(false);
+        EXPECT_FALSE((bool)test2);
+
+        // initialize with true
+        mbool test3(true);
+        EXPECT_TRUE((bool)test3);
+
+        // copy constructor
+        mbool test4(test2);
+        EXPECT_FALSE((bool)test4);
+
+        // copy constructor
+        mbool test5(test3);
+        EXPECT_TRUE((bool)test5);
+
+        // default constructor & assignment
+        mbool test6;
+        test6 = test2;
+        EXPECT_FALSE((bool)test6);
+
+        // default constructor & assignment
+        mbool test7;
+        test7 = test3;
+        EXPECT_TRUE((bool)test7);
+    }
+
+    TEST(mbool, Compare)
+    {
+        mbool test1(false);
+        mbool test2(true);
+        mbool test3(false);
+        mbool test4(true);
+
+        EXPECT_NE(test1, test2);
+        EXPECT_EQ(test1, test3);
+        EXPECT_EQ(test2, test4);
+
+        EXPECT_FALSE(test1 == true);
+        EXPECT_TRUE (test1 != true);
+        EXPECT_FALSE(test1 == test2);
+        EXPECT_TRUE (test1 != test2);
+        EXPECT_TRUE (test1 == false);
+        EXPECT_FALSE(test1 != false);
+        EXPECT_TRUE (test1 == test3);
+        EXPECT_FALSE(test1 != test3);
+
+
+        EXPECT_FALSE(test2 == false);
+        EXPECT_TRUE (test2 != false);
+        EXPECT_FALSE(test2 == test1);
+        EXPECT_TRUE (test2 != test1);
+        EXPECT_TRUE (test2 == true);
+        EXPECT_FALSE(test2 != true);
+        EXPECT_TRUE (test2 == test4);
+        EXPECT_FALSE(test2 != test4);
+
+        EXPECT_EQ(!test1, true);
+        EXPECT_EQ(!test2, false);
+    }
+
+    TEST(mbool, Assign)
+    {
+        mbool test(false);
+        mbool test_false = false;
+        mbool test_true = true;
+
+        EXPECT_EQ(test, false);        // eq because initialized with false
+        EXPECT_NE(test, true);         // "
+        EXPECT_EQ(test, test_false);   // eq because both initialized with false
+        EXPECT_NE(test, test_true);    // ne because initialized differently
+
+        test = false; // expect no change after assigning false again
+
+        EXPECT_EQ(test, false);        // no change, so still the same
+        EXPECT_NE(test, true);         // "
+        EXPECT_EQ(test, test_false);   // "
+        EXPECT_NE(test, test_true);    // "
+
+        test = true; // expect change after assigning true
+
+        EXPECT_NE(test, false);        // ne because assigned true
+        EXPECT_EQ(test, true);         // eq "
+        EXPECT_NE(test, test_false);   // ne "
+        EXPECT_EQ(test, test_true);    // eq "
+
+        test = false; // expect change after assigning false again
+
+        EXPECT_EQ(test, false);        // eq because assigned false again
+        EXPECT_NE(test, true);         // ne "
+        EXPECT_NE(test, test_false);   // ne because changed state in between, so internal memory differs !!!!!
+        EXPECT_NE(test, test_true);    // ne because assigned false again
+    }
+}
