Index: code/trunk/test/core/object/ClassFactoryTest.cc
===================================================================
--- code/trunk/test/core/object/ClassFactoryTest.cc	(revision 10624)
+++ code/trunk/test/core/object/ClassFactoryTest.cc	(revision 11071)
@@ -14,12 +14,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -33,8 +33,8 @@
     {
         Factory* factory = new ClassFactoryWithContext<BaseObject>();
-        Identifiable* object = factory->fabricate(NULL);
-        ASSERT_TRUE(object != NULL);
+        Identifiable* object = factory->fabricate(nullptr);
+        ASSERT_TRUE(object != nullptr);
         BaseObject* baseObject = dynamic_cast<BaseObject*>(object);
-        EXPECT_TRUE(baseObject != NULL);
+        EXPECT_TRUE(baseObject != nullptr);
         delete object;
         // don't delete factory - it remains in the identifier
Index: code/trunk/test/core/object/ContextTest.cc
===================================================================
--- code/trunk/test/core/object/ContextTest.cc	(revision 10624)
+++ code/trunk/test/core/object/ContextTest.cc	(revision 11071)
@@ -12,5 +12,5 @@
         {
             public:
-                SubclassContext() : Context(NULL) { RegisterObject(SubclassContext); }
+                SubclassContext() : Context(nullptr) { RegisterObject(SubclassContext); }
         };
 
@@ -21,12 +21,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -39,5 +39,5 @@
     TEST_F(ContextTest, CanCreateContext)
     {
-        Context context(NULL);
+        Context context(nullptr);
     }
 
@@ -49,5 +49,5 @@
     TEST_F(ContextTest, ContextIsItsOwnContext)
     {
-        Context context(NULL);
+        Context context(nullptr);
         EXPECT_EQ(&context, context.getContext());
     }
@@ -68,5 +68,5 @@
     TEST_F(ContextTest, ContextIsAddedToItsOwnObjectList)
     {
-        Context context(NULL);
+        Context context(nullptr);
         ASSERT_EQ(1u, context.getObjectList<Context>()->size());
         EXPECT_TRUE(context.getObjectList<Context>()->begin()->objectBase_ == static_cast<Listable*>(&context));
@@ -75,5 +75,5 @@
     TEST_F(ContextTest, ContextIsAddedToObjectListOfBaseContext)
     {
-        Context baseContext(NULL);
+        Context baseContext(nullptr);
         Context subContext(&baseContext);
 
Index: code/trunk/test/core/object/DestroyableTest.cc
===================================================================
--- code/trunk/test/core/object/DestroyableTest.cc	(revision 10624)
+++ code/trunk/test/core/object/DestroyableTest.cc	(revision 11071)
@@ -32,5 +32,5 @@
         DestroyableTest* test = new DestroyableTest(destroyed);
         EXPECT_FALSE(destroyed);
-        EXPECT_TRUE(test != NULL);
+        EXPECT_TRUE(test != nullptr);
         test->destroy();
         EXPECT_TRUE(destroyed);
Index: code/trunk/test/core/object/IteratorTest.cc
===================================================================
--- code/trunk/test/core/object/IteratorTest.cc	(revision 10624)
+++ code/trunk/test/core/object/IteratorTest.cc	(revision 11071)
@@ -15,5 +15,5 @@
         {
             public:
-            TestInterface() { RegisterObject(TestInterface); }
+                TestInterface() { RegisterObject(TestInterface); }
         };
 
@@ -32,12 +32,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -55,5 +55,6 @@
     TEST_F(IteratorTest, CanAssignIterator)
     {
-        Iterator<TestInterface> it = ObjectList<TestInterface>::begin();
+        ObjectList<TestInterface> list;
+        Iterator<TestInterface> it = list.begin();
     }
 
@@ -61,5 +62,6 @@
     {
         size_t i = 0;
-        for (Iterator<TestInterface> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it)
+        ObjectList<TestInterface> list;
+        for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it)
             ++i;
         EXPECT_EQ(0u, i);
@@ -77,6 +79,69 @@
 
         // iterate over interfaces but use a TestClass iterator - now we can call TestClass::test()
-        for (Iterator<TestClass> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it)
+        ObjectList<TestInterface> list;
+        for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it)
             it->test();
     }
+
+    TEST_F(IteratorTest, CanIterateOverInterfaceListWithInterfaceIterator)
+    {
+        TestClass testClass;
+        TestInterface testInterface;
+
+        size_t i = 0;
+        ObjectList<TestInterface> list;
+        for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it)
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&testClass, *it);
+            if (i == 2u) EXPECT_EQ(&testInterface, *it);
+        }
+        EXPECT_EQ(2u, i);
+    }
+
+    TEST_F(IteratorTest, CanIterateOverClassListWithClassIterator)
+    {
+        TestClass testClass;
+        TestInterface testInterface;
+
+        size_t i = 0;
+        ObjectList<TestClass> list;
+        for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it)
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&testClass, *it);
+        }
+        EXPECT_EQ(1u, i);
+    }
+
+    TEST_F(IteratorTest, CanIterateOverInterfaceListWithClassIterator)
+    {
+        TestClass testClass;
+        TestInterface testInterface;
+
+        size_t i = 0;
+        ObjectList<TestInterface> list;
+        for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it)
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&testClass, *it);
+            if (i == 2u) EXPECT_EQ(nullptr, *it);
+        }
+        EXPECT_EQ(2u, i);
+    }
+
+    TEST_F(IteratorTest, CanIterateOverClassListWithInterfaceIterator)
+    {
+        TestClass testClass;
+        TestInterface testInterface;
+
+        size_t i = 0;
+        ObjectList<TestClass> list;
+        for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it)
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&testClass, *it);
+        }
+        EXPECT_EQ(1u, i);
+    }
 }
Index: code/trunk/test/core/object/ListableTest.cc
===================================================================
--- code/trunk/test/core/object/ListableTest.cc	(revision 10624)
+++ code/trunk/test/core/object/ListableTest.cc	(revision 11071)
@@ -37,12 +37,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -56,5 +56,5 @@
     {
         ListableClassTest* test = new ListableClassTest();
-        ASSERT_TRUE(test != NULL);
+        ASSERT_TRUE(test != nullptr);
         delete test;
     }
@@ -63,5 +63,5 @@
     {
         ListableClassTest test;
-        EXPECT_EQ(1u, ObjectList<ListableClassTest>::size());
+        EXPECT_EQ(1u, ObjectList<ListableClassTest>().size());
         EXPECT_TRUE(objectListContains<ListableClassTest>(&test));
     }
@@ -70,7 +70,7 @@
     {
         ListableSubclassTest test;
-        EXPECT_EQ(1u, ObjectList<ListableClassTest>::size());
+        EXPECT_EQ(1u, ObjectList<ListableClassTest>().size());
         EXPECT_TRUE(objectListContains<ListableClassTest>(&test));
-        EXPECT_EQ(1u, ObjectList<ListableSubclassTest>::size());
+        EXPECT_EQ(1u, ObjectList<ListableSubclassTest>().size());
         EXPECT_TRUE(objectListContains<ListableSubclassTest>(&test));
     }
@@ -78,31 +78,31 @@
     TEST_F(ListableTest, RemovesFromObjectList)
     {
-        EXPECT_EQ(0u, ObjectList<ListableClassTest>::size());
+        EXPECT_EQ(0u, ObjectList<ListableClassTest>().size());
         {
             ListableClassTest test;
-            EXPECT_EQ(1u, ObjectList<ListableClassTest>::size());
+            EXPECT_EQ(1u, ObjectList<ListableClassTest>().size());
             EXPECT_TRUE(objectListContains<ListableClassTest>(&test));
         }
-        EXPECT_EQ(0u, ObjectList<ListableClassTest>::size());
+        EXPECT_EQ(0u, ObjectList<ListableClassTest>().size());
     }
 
     TEST_F(ListableTest, RemovesFromAllObjectLists)
     {
-        EXPECT_EQ(0u, ObjectList<ListableClassTest>::size());
-        EXPECT_EQ(0u, ObjectList<ListableSubclassTest>::size());
+        EXPECT_EQ(0u, ObjectList<ListableClassTest>().size());
+        EXPECT_EQ(0u, ObjectList<ListableSubclassTest>().size());
         {
             ListableSubclassTest test;
-            EXPECT_EQ(1u, ObjectList<ListableClassTest>::size());
+            EXPECT_EQ(1u, ObjectList<ListableClassTest>().size());
             EXPECT_TRUE(objectListContains<ListableClassTest>(&test));
-            EXPECT_EQ(1u, ObjectList<ListableSubclassTest>::size());
+            EXPECT_EQ(1u, ObjectList<ListableSubclassTest>().size());
             EXPECT_TRUE(objectListContains<ListableSubclassTest>(&test));
         }
-        EXPECT_EQ(0u, ObjectList<ListableClassTest>::size());
-        EXPECT_EQ(0u, ObjectList<ListableSubclassTest>::size());
+        EXPECT_EQ(0u, ObjectList<ListableClassTest>().size());
+        EXPECT_EQ(0u, ObjectList<ListableSubclassTest>().size());
     }
 
     TEST_F(ListableTest, CanAddObjectToContext)
     {
-        Context context(NULL);
+        Context context(nullptr);
         ListableSubclassTest test;
 
@@ -118,5 +118,5 @@
     TEST_F(ListableTest, CanAddObjectToSubContext)
     {
-        Context baseContext(NULL);
+        Context baseContext(nullptr);
         Context subContext(&baseContext);
         ListableSubclassTest test;
@@ -139,5 +139,5 @@
     {
         Context* rootContext = Context::getRootContext();
-        Context newContext(NULL);
+        Context newContext(nullptr);
         ListableSubclassTest test;
 
Index: code/trunk/test/core/object/ObjectListBaseTest.cc
===================================================================
--- code/trunk/test/core/object/ObjectListBaseTest.cc	(revision 10624)
+++ code/trunk/test/core/object/ObjectListBaseTest.cc	(revision 11071)
@@ -24,5 +24,5 @@
     {
         ObjectListBase list;
-        ObjectListBaseElement* element = new ObjectListElement<Listable>(NULL);
+        ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr);
         list.addElement(element);
         EXPECT_EQ(1u, list.size());
@@ -32,5 +32,5 @@
     {
         ObjectListBase list;
-        ObjectListBaseElement* element = new ObjectListElement<Listable>(NULL);
+        ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr);
         list.addElement(element);
         EXPECT_EQ(1u, list.size());
@@ -43,5 +43,5 @@
     {
         ObjectListBase list;
-        list.addElement(new ObjectListElement<Listable>(NULL));
+        list.addElement(new ObjectListElement<Listable>(nullptr));
         EXPECT_EQ(1u, list.size());
     }
@@ -52,13 +52,13 @@
         EXPECT_EQ(0u, list.size());
         {
-            ObjectListElement<Listable> element1(NULL);
+            ObjectListElement<Listable> element1(nullptr);
             list.addElement(&element1);
             EXPECT_EQ(1u, list.size());
             {
-                ObjectListElement<Listable> element1(NULL);
+                ObjectListElement<Listable> element1(nullptr);
                 list.addElement(&element1);
                 EXPECT_EQ(2u, list.size());
                 {
-                    ObjectListElement<Listable> element1(NULL);
+                    ObjectListElement<Listable> element1(nullptr);
                     list.addElement(&element1);
                     EXPECT_EQ(3u, list.size());
@@ -76,5 +76,5 @@
         ObjectListElementRemovalListenerMock listener;
         list.registerRemovalListener(&listener);
-        ObjectListBaseElement* element = new ObjectListElement<Listable>(NULL);
+        ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr);
         list.addElement(element);
         EXPECT_CALL(listener, removedElement(element));
Index: code/trunk/test/core/object/ObjectListIteratorTest.cc
===================================================================
--- code/trunk/test/core/object/ObjectListIteratorTest.cc	(revision 10624)
+++ code/trunk/test/core/object/ObjectListIteratorTest.cc	(revision 11071)
@@ -3,5 +3,6 @@
 
 #include "core/object/ObjectListIterator.h"
-#include "core/object/Listable.h"
+#include "core/class/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 #include "core/CoreIncludes.h"
 #include "core/module/ModuleInstance.h"
@@ -11,12 +12,19 @@
     namespace
     {
-        class ListableTest : public Listable
+        class TestInterface : virtual public OrxonoxInterface
         {
             public:
-                ListableTest() { RegisterObject(ListableTest); }
+                TestInterface() { RegisterObject(TestInterface); }
+        };
+
+        class TestClass : public OrxonoxClass, public TestInterface
+        {
+            public:
+                TestClass() { RegisterObject(TestClass); }
                 MOCK_METHOD0(test, void());
         };
 
-        RegisterClassNoArgs(ListableTest);
+        RegisterClassNoArgs(TestInterface);
+        RegisterClassNoArgs(TestClass);
 
         // Fixture
@@ -24,12 +32,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -42,10 +50,11 @@
     TEST_F(ObjectListIteratorTest, CanCreateIterator)
     {
-        ObjectListIterator<ListableTest> it;
+        ObjectListIterator<TestClass> it;
     }
 
     TEST_F(ObjectListIteratorTest, CanAssignIterator)
     {
-        ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin();
+        ObjectList<TestClass> list;
+        ObjectListIterator<TestClass> it = list.begin();
     }
 
@@ -53,5 +62,6 @@
     {
         size_t i = 0;
-        for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); it != ObjectList<ListableTest>::end(); ++it)
+        ObjectList<TestClass> list;
+        for (ObjectListIterator<TestClass> it = list.begin(); it != list.end(); ++it)
             ++i;
         EXPECT_EQ(0u, i);
@@ -60,10 +70,12 @@
     TEST_F(ObjectListIteratorTest, CanIterateOverFullList)
     {
-        ListableTest test1;
-        ListableTest test2;
-        ListableTest test3;
+        TestClass test1;
+        TestClass test2;
+        TestClass test3;
+        TestInterface interface;
 
         size_t i = 0;
-        for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); it != ObjectList<ListableTest>::end(); ++it)
+        ObjectList<TestClass> list;
+        for (ObjectListIterator<TestClass> it = list.begin(); it != list.end(); ++it)
         {
             ++i;
@@ -77,10 +89,12 @@
     TEST_F(ObjectListIteratorTest, CanIterateReverseOverFullList)
     {
-        ListableTest test1;
-        ListableTest test2;
-        ListableTest test3;
+        TestClass test1;
+        TestClass test2;
+        TestClass test3;
+        TestInterface interface;
 
         size_t i = 0;
-        for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::rbegin(); it != ObjectList<ListableTest>::rend(); --it)
+        ObjectList<TestClass> list;
+        for (ObjectListIterator<TestClass> it = list.rbegin(); it != list.rend(); --it)
         {
             ++i;
@@ -94,7 +108,8 @@
     TEST_F(ObjectListIteratorTest, CanCallObjects)
     {
-        ListableTest test1;
-        ListableTest test2;
-        ListableTest test3;
+        TestClass test1;
+        TestClass test2;
+        TestClass test3;
+        TestInterface interface;
 
         EXPECT_CALL(test1, test());
@@ -102,5 +117,6 @@
         EXPECT_CALL(test3, test());
 
-        for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); it != ObjectList<ListableTest>::end(); ++it)
+        ObjectList<TestClass> list;
+        for (ObjectListIterator<TestClass> it = list.begin(); it != list.end(); ++it)
             it->test();
     }
Index: code/trunk/test/core/object/ObjectListTest.cc
===================================================================
--- code/trunk/test/core/object/ObjectListTest.cc	(revision 11071)
+++ code/trunk/test/core/object/ObjectListTest.cc	(revision 11071)
@@ -0,0 +1,150 @@
+#include <gtest/gtest.h>
+#include <gmock/gmock.h>
+
+#include "core/object/ObjectListIterator.h"
+#include "core/object/Listable.h"
+#include "core/CoreIncludes.h"
+#include "core/module/ModuleInstance.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class ListableTest : public Listable
+        {
+            public:
+                ListableTest() { RegisterObject(ListableTest); }
+                ListableTest(Context* context) : Listable(context) { RegisterObject(ListableTest); }
+                MOCK_METHOD0(test, void());
+        };
+
+        RegisterClassNoArgs(ListableTest);
+
+        // Fixture
+        class ObjectListTest : public ::testing::Test
+        {
+            public:
+                virtual void SetUp() override
+                {
+                    new IdentifierManager();
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    Context::setRootContext(new Context(nullptr));
+                }
+
+                virtual void TearDown() override
+                {
+                    Context::destroyRootContext();
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
+                }
+        };
+    }
+    
+    TEST_F(ObjectListTest, CanIterateOverEmptyList)
+    {
+        size_t i = 0;
+        for (ListableTest* object : ObjectList<ListableTest>())
+        {
+            ++i;
+            ((void*)object); // avoid warning about unused variable
+        }
+        EXPECT_EQ(0u, i);
+    }
+
+    TEST_F(ObjectListTest, CanIterateOverFullList)
+    {
+        ListableTest test1;
+        ListableTest test2;
+        ListableTest test3;
+
+        size_t i = 0;
+        for (ListableTest* object : ObjectList<ListableTest>())
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&test1, object);
+            if (i == 2u) EXPECT_EQ(&test2, object);
+            if (i == 3u) EXPECT_EQ(&test3, object);
+        }
+        EXPECT_EQ(3u, i);
+    }
+    
+    TEST_F(ObjectListTest, CanIterateOverFullList_Expanded)
+    {
+        ListableTest test1;
+        ListableTest test2;
+        ListableTest test3;
+
+        size_t i = 0;
+        ObjectList<ListableTest>&& __range = ObjectList<ListableTest>();
+        ObjectListIterator<ListableTest> __begin = __range.begin();
+        ObjectListIterator<ListableTest>__end = __range.end();
+        for (; __begin != __end; ++__begin)
+        {
+            ListableTest* object = *__begin;
+
+            ++i;
+            if (i == 1u) EXPECT_EQ(&test1, object);
+            if (i == 2u) EXPECT_EQ(&test2, object);
+            if (i == 3u) EXPECT_EQ(&test3, object);
+        }
+        EXPECT_EQ(3u, i);
+    }
+    
+    TEST_F(ObjectListTest, CanCallObjects)
+    {
+        ListableTest test1;
+        ListableTest test2;
+        ListableTest test3;
+
+        EXPECT_CALL(test1, test());
+        EXPECT_CALL(test2, test());
+        EXPECT_CALL(test3, test());
+
+        for (ListableTest* object : ObjectList<ListableTest>())
+            object->test();
+    }
+
+    TEST_F(ObjectListTest, UsesCorrectContext)
+    {
+        Context context1(Context::getRootContext());
+        Context context2(Context::getRootContext());
+
+        ListableTest test1(&context1);
+        ListableTest test2(&context1);
+        ListableTest test3(&context2);
+
+        EXPECT_EQ(3, ObjectList<ListableTest>().size());
+        EXPECT_EQ(2, ObjectList<ListableTest>(&context1).size());
+        EXPECT_EQ(1, ObjectList<ListableTest>(&context2).size());
+    }
+
+    TEST_F(ObjectListTest, CanIterateOverCorrectContext)
+    {
+        Context context1(Context::getRootContext());
+        Context context2(Context::getRootContext());
+
+        ListableTest test1(&context1);
+        ListableTest test2(&context1);
+        ListableTest test3(&context2);
+
+        {
+            size_t i = 0;
+            for (ListableTest* object : ObjectList<ListableTest>(&context1))
+            {
+                ++i;
+                if (i == 1u) EXPECT_EQ(&test1, object);
+                if (i == 2u) EXPECT_EQ(&test2, object);
+            }
+            EXPECT_EQ(2u, i);
+        }
+        {
+            size_t i = 0;
+            for (ListableTest* object : ObjectList<ListableTest>(&context2))
+            {
+                ++i;
+                if (i == 1u) EXPECT_EQ(&test3, object);
+            }
+            EXPECT_EQ(1u, i);
+        }
+    }
+}
Index: code/trunk/test/core/object/StrongPtrTest.cc
===================================================================
--- code/trunk/test/core/object/StrongPtrTest.cc	(revision 10624)
+++ code/trunk/test/core/object/StrongPtrTest.cc	(revision 11071)
@@ -1,2 +1,3 @@
+#include <utility>
 #include <gtest/gtest.h>
 #include "core/object/StrongPtr.h"
@@ -23,4 +24,20 @@
         StrongPtr<DestroyableTest> strongPtr = test;
         EXPECT_EQ(test, strongPtr.get());
+        EXPECT_EQ(test, &(*strongPtr));
+        EXPECT_EQ(static_cast<Destroyable*>(test), strongPtr.getBase());
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, CanHaveMultiplePointers)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+        StrongPtr<DestroyableTest> strongPtr1 = test;
+        StrongPtr<DestroyableTest> strongPtr2 = test;
+        StrongPtr<DestroyableTest> strongPtr3 = test;
+        EXPECT_EQ(test, strongPtr1.get());
+        EXPECT_EQ(test, strongPtr2.get());
+        EXPECT_EQ(test, strongPtr3.get());
+        EXPECT_EQ(3u, test->getReferenceCount());
         test->destroy();
     }
@@ -94,9 +111,9 @@
     void isNull(const StrongPtr<DestroyableTest> strongPtr)
     {
-        EXPECT_TRUE(strongPtr == NULL);
-        EXPECT_TRUE(strongPtr == 0);
+        EXPECT_TRUE(strongPtr == nullptr);
+        EXPECT_TRUE(strongPtr == nullptr);
         EXPECT_TRUE(!strongPtr);
-        EXPECT_FALSE(strongPtr != NULL);
-        EXPECT_FALSE(strongPtr != 0);
+        EXPECT_FALSE(strongPtr != nullptr);
+        EXPECT_FALSE(strongPtr != nullptr);
         EXPECT_FALSE(strongPtr);
     }
@@ -109,19 +126,19 @@
         }
         {
-            StrongPtr<DestroyableTest> strongPtr = NULL;
+            StrongPtr<DestroyableTest> strongPtr = nullptr;
             isNull(strongPtr);
         }
         {
             StrongPtr<DestroyableTest> strongPtr;
-            strongPtr = NULL;
-            isNull(strongPtr);
-        }
-        {
-            StrongPtr<DestroyableTest> strongPtr = 0;
+            strongPtr = nullptr;
+            isNull(strongPtr);
+        }
+        {
+            StrongPtr<DestroyableTest> strongPtr = nullptr;
             isNull(strongPtr);
         }
         {
             StrongPtr<DestroyableTest> strongPtr;
-            strongPtr = 0;
+            strongPtr = nullptr;
             isNull(strongPtr);
         }
@@ -133,11 +150,159 @@
         DestroyableTest* test = new DestroyableTest(destroyed);
         StrongPtr<DestroyableTest> strongPtr = test;
-        EXPECT_FALSE(strongPtr == NULL);
-        EXPECT_FALSE(strongPtr == 0);
+        EXPECT_FALSE(strongPtr == nullptr);
+        EXPECT_FALSE(strongPtr == nullptr);
         EXPECT_FALSE(!strongPtr);
-        EXPECT_TRUE(strongPtr != NULL);
-        EXPECT_TRUE(strongPtr != 0);
+        EXPECT_TRUE(strongPtr != nullptr);
+        EXPECT_TRUE(strongPtr != nullptr);
         EXPECT_TRUE(strongPtr);
         test->destroy();
     }
+
+    TEST(StrongPtrTest, TestConstructors)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+
+        // default
+        StrongPtr<DestroyableTest> strongPtr1;
+        EXPECT_EQ(nullptr, strongPtr1.get());
+
+        // pointer
+        StrongPtr<DestroyableTest> strongPtr2a = test;
+        StrongPtr<DestroyableTest> strongPtr2b(test);
+        EXPECT_EQ(test, strongPtr2a.get());
+        EXPECT_EQ(test, strongPtr2b.get());
+
+        // copy
+        StrongPtr<DestroyableTest> strongPtr3a = strongPtr2a;
+        StrongPtr<DestroyableTest> strongPtr3b(strongPtr2b);
+        EXPECT_EQ(test, strongPtr3a.get());
+        EXPECT_EQ(test, strongPtr3b.get());
+
+        // move
+        StrongPtr<DestroyableTest> strongPtr4a = std::move(strongPtr3a);
+        StrongPtr<DestroyableTest> strongPtr4b(std::move(strongPtr3b));
+        EXPECT_EQ(test, strongPtr4a.get());
+        EXPECT_EQ(test, strongPtr4b.get());
+
+        // other
+        StrongPtr<Destroyable> strongPtr5a = strongPtr4a;
+        StrongPtr<Destroyable> strongPtr5b(strongPtr4b);
+        EXPECT_EQ(test, strongPtr5a.get());
+        EXPECT_EQ(test, strongPtr5b.get());
+
+        // weakPtr
+        WeakPtr<DestroyableTest> weakPtr = test;
+        StrongPtr<DestroyableTest> strongPtr6a = weakPtr;
+        StrongPtr<DestroyableTest> strongPtr6b(weakPtr);
+        EXPECT_EQ(test, strongPtr6a.get());
+        EXPECT_EQ(test, strongPtr6b.get());
+
+        // weakPtr other
+        StrongPtr<Destroyable> strongPtr7a = weakPtr;
+        StrongPtr<Destroyable> strongPtr7b(weakPtr);
+        EXPECT_EQ(test, strongPtr7a.get());
+        EXPECT_EQ(test, strongPtr7b.get());
+
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, TestAssignments)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+
+        // pointer
+        StrongPtr<DestroyableTest> strongPtr1;
+        strongPtr1 = test;
+        EXPECT_EQ(test, strongPtr1.get());
+
+        // copy
+        StrongPtr<DestroyableTest> strongPtr2;
+        strongPtr2 = strongPtr1;
+        EXPECT_EQ(test, strongPtr2.get());
+
+        // move
+        StrongPtr<DestroyableTest> strongPtr3;
+        strongPtr3 = std::move(strongPtr2);
+        EXPECT_EQ(test, strongPtr3.get());
+
+        // other
+        StrongPtr<Destroyable> strongPtr4;
+        strongPtr4 = strongPtr3;
+        EXPECT_EQ(test, strongPtr4.get());
+
+        // weakPtr
+        WeakPtr<DestroyableTest> weakPtr = test;
+        StrongPtr<DestroyableTest> strongPtr5;
+        strongPtr5 = weakPtr;
+        EXPECT_EQ(test, strongPtr5.get());
+
+        // weakPtr other
+        StrongPtr<Destroyable> strongPtr6;
+        strongPtr6 = weakPtr;
+        EXPECT_EQ(test, strongPtr6.get());
+
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, TestStrongPtrInVector)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+
+        std::vector<StrongPtr<DestroyableTest>> vector;
+        vector.push_back(test);
+        vector.push_back(test);
+        vector.push_back(test);
+
+        ASSERT_EQ(3, vector.size());
+        EXPECT_EQ(test, vector[0].get());
+        EXPECT_EQ(test, vector[1].get());
+        EXPECT_EQ(test, vector[2].get());
+        EXPECT_EQ(3u, test->getReferenceCount());
+
+        vector.clear();
+        EXPECT_EQ(0u, test->getReferenceCount());
+
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, TestReset)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+        StrongPtr<DestroyableTest> strongPtr(test);
+        EXPECT_EQ(test, strongPtr.get());
+        EXPECT_EQ(1u, test->getReferenceCount());
+        strongPtr.reset();
+        EXPECT_EQ(nullptr, strongPtr.get());
+        EXPECT_EQ(0u, test->getReferenceCount());
+
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, TestSwap)
+    {
+        bool bla;
+        DestroyableTest* test1 = new DestroyableTest(bla);
+        DestroyableTest* test2 = new DestroyableTest(bla);
+
+        StrongPtr<DestroyableTest> strongPtr1(test1);
+        StrongPtr<DestroyableTest> strongPtr2(test2);
+        EXPECT_EQ(test1, strongPtr1.get());
+        EXPECT_EQ(test2, strongPtr2.get());
+        EXPECT_EQ(1u, test1->getReferenceCount());
+        EXPECT_EQ(1u, test2->getReferenceCount());
+
+        strongPtr1.swap(strongPtr2);
+
+        EXPECT_EQ(test2, strongPtr1.get());
+        EXPECT_EQ(test1, strongPtr2.get());
+        EXPECT_EQ(1u, test1->getReferenceCount());
+        EXPECT_EQ(1u, test2->getReferenceCount());
+
+        test1->destroy();
+        test2->destroy();
+    }
 }
Index: code/trunk/test/core/object/WeakPtrTest.cc
===================================================================
--- code/trunk/test/core/object/WeakPtrTest.cc	(revision 10624)
+++ code/trunk/test/core/object/WeakPtrTest.cc	(revision 11071)
@@ -1,2 +1,3 @@
+#include <utility>
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
@@ -24,4 +25,6 @@
         WeakPtr<DestroyableTest> weakPtr = test;
         EXPECT_EQ(test, weakPtr.get());
+        EXPECT_EQ(test, &(*weakPtr));
+        EXPECT_EQ(static_cast<Destroyable*>(test), weakPtr.getBase());
         test->destroy();
     }
@@ -33,5 +36,20 @@
         EXPECT_EQ(test, weakPtr.get());
         test->destroy();
-        EXPECT_EQ(NULL, weakPtr.get());
+        EXPECT_EQ(nullptr, weakPtr.get());
+    }
+
+    TEST(WeakPtrTest, CanHaveMultiplePointers)
+    {
+        DestroyableTest* test = new DestroyableTest();
+        WeakPtr<DestroyableTest> weakPtr1 = test;
+        WeakPtr<DestroyableTest> weakPtr2 = test;
+        WeakPtr<DestroyableTest> weakPtr3 = test;
+        EXPECT_EQ(test, weakPtr1.get());
+        EXPECT_EQ(test, weakPtr2.get());
+        EXPECT_EQ(test, weakPtr3.get());
+        test->destroy();
+        EXPECT_EQ(nullptr, weakPtr1.get());
+        EXPECT_EQ(nullptr, weakPtr2.get());
+        EXPECT_EQ(nullptr, weakPtr3.get());
     }
 
@@ -48,9 +66,9 @@
     void isNull(const WeakPtr<DestroyableTest> weakPtr)
     {
-        EXPECT_TRUE(weakPtr == NULL);
-        EXPECT_TRUE(weakPtr == 0);
+        EXPECT_TRUE(weakPtr == nullptr);
+        EXPECT_TRUE(weakPtr == nullptr);
         EXPECT_TRUE(!weakPtr);
-        EXPECT_FALSE(weakPtr != NULL);
-        EXPECT_FALSE(weakPtr != 0);
+        EXPECT_FALSE(weakPtr != nullptr);
+        EXPECT_FALSE(weakPtr != nullptr);
         EXPECT_FALSE(weakPtr);
     }
@@ -63,19 +81,19 @@
         }
         {
-            WeakPtr<DestroyableTest> weakPtr = NULL;
+            WeakPtr<DestroyableTest> weakPtr = nullptr;
             isNull(weakPtr);
         }
         {
             WeakPtr<DestroyableTest> weakPtr;
-            weakPtr = NULL;
-            isNull(weakPtr);
-        }
-        {
-            WeakPtr<DestroyableTest> weakPtr = 0;
+            weakPtr = nullptr;
+            isNull(weakPtr);
+        }
+        {
+            WeakPtr<DestroyableTest> weakPtr = nullptr;
             isNull(weakPtr);
         }
         {
             WeakPtr<DestroyableTest> weakPtr;
-            weakPtr = 0;
+            weakPtr = nullptr;
             isNull(weakPtr);
         }
@@ -86,11 +104,124 @@
         DestroyableTest* test = new DestroyableTest();
         WeakPtr<DestroyableTest> weakPtr = test;
-        EXPECT_FALSE(weakPtr == NULL);
-        EXPECT_FALSE(weakPtr == 0);
+        EXPECT_FALSE(weakPtr == nullptr);
+        EXPECT_FALSE(weakPtr == nullptr);
         EXPECT_FALSE(!weakPtr);
-        EXPECT_TRUE(weakPtr != NULL);
-        EXPECT_TRUE(weakPtr != 0);
+        EXPECT_TRUE(weakPtr != nullptr);
+        EXPECT_TRUE(weakPtr != nullptr);
         EXPECT_TRUE(weakPtr);
         test->destroy();
     }
+
+    TEST(WeakPtrTest, TestConstructors)
+    {
+        DestroyableTest* test = new DestroyableTest();
+
+        // default
+        WeakPtr<DestroyableTest> weakPtr1;
+        EXPECT_EQ(nullptr, weakPtr1.get());
+
+        // pointer
+        WeakPtr<DestroyableTest> weakPtr2a = test;
+        WeakPtr<DestroyableTest> weakPtr2b(test);
+        EXPECT_EQ(test, weakPtr2a.get());
+        EXPECT_EQ(test, weakPtr2b.get());
+
+        // copy
+        WeakPtr<DestroyableTest> weakPtr3a = weakPtr2a;
+        WeakPtr<DestroyableTest> weakPtr3b(weakPtr2b);
+        EXPECT_EQ(test, weakPtr3a.get());
+        EXPECT_EQ(test, weakPtr3b.get());
+
+        // move
+        WeakPtr<DestroyableTest> weakPtr4a = std::move(weakPtr3a);
+        WeakPtr<DestroyableTest> weakPtr4b(std::move(weakPtr3b));
+        EXPECT_EQ(test, weakPtr4a.get());
+        EXPECT_EQ(test, weakPtr4b.get());
+
+        // other
+        WeakPtr<Destroyable> weakPtr5a = weakPtr4a;
+        WeakPtr<Destroyable> weakPtr5b(weakPtr4b);
+        EXPECT_EQ(test, weakPtr5a.get());
+        EXPECT_EQ(test, weakPtr5b.get());
+
+        test->destroy();
+    }
+
+    TEST(WeakPtrTest, TestAssignments)
+    {
+        DestroyableTest* test = new DestroyableTest();
+
+        // pointer
+        WeakPtr<DestroyableTest> weakPtr1;
+        weakPtr1 = test;
+        EXPECT_EQ(test, weakPtr1.get());
+
+        // copy
+        WeakPtr<DestroyableTest> weakPtr2;
+        weakPtr2 = weakPtr1;
+        EXPECT_EQ(test, weakPtr2.get());
+
+        // move
+        WeakPtr<DestroyableTest> weakPtr3;
+        weakPtr3 = std::move(weakPtr2);
+        EXPECT_EQ(test, weakPtr3.get());
+
+        // other
+        WeakPtr<Destroyable> weakPtr4;
+        weakPtr4 = weakPtr3;
+        EXPECT_EQ(test, weakPtr4.get());
+
+        test->destroy();
+    }
+
+    TEST(WeakPtrTest, TestWeakPtrInVector)
+    {
+        DestroyableTest* test = new DestroyableTest();
+
+        std::vector<WeakPtr<DestroyableTest>> vector;
+        vector.push_back(test);
+        vector.push_back(test);
+        vector.push_back(test);
+
+        ASSERT_EQ(3, vector.size());
+        EXPECT_EQ(test, vector[0].get());
+        EXPECT_EQ(test, vector[1].get());
+        EXPECT_EQ(test, vector[2].get());
+
+        test->destroy();
+
+        EXPECT_EQ(nullptr, vector[0].get());
+        EXPECT_EQ(nullptr, vector[1].get());
+        EXPECT_EQ(nullptr, vector[2].get());
+    }
+
+    TEST(WeakPtrTest, TestReset)
+    {
+        DestroyableTest* test = new DestroyableTest();
+        WeakPtr<DestroyableTest> weakPtr(test);
+        EXPECT_EQ(test, weakPtr.get());
+        weakPtr.reset();
+        EXPECT_EQ(nullptr, weakPtr.get());
+
+        test->destroy();
+    }
+
+    TEST(WeakPtrTest, TestSwap)
+    {
+        DestroyableTest* test1 = new DestroyableTest();
+        DestroyableTest* test2 = new DestroyableTest();
+
+        WeakPtr<DestroyableTest> weakPtr1(test1);
+        WeakPtr<DestroyableTest> weakPtr2(test2);
+        EXPECT_EQ(test1, weakPtr1.get());
+        EXPECT_EQ(test2, weakPtr2.get());
+
+        weakPtr1.swap(weakPtr2);
+
+        EXPECT_EQ(test2, weakPtr1.get());
+        EXPECT_EQ(test1, weakPtr2.get());
+
+        test1->destroy();
+        test2->destroy();
+    }
 }
