Changeset 11071 for code/trunk/test/core
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 23 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/test/core/CMakeLists.txt
r10624 r11071 19 19 class/SuperTest.cc 20 20 command/CommandTest.cc 21 command/FunctorPtrTest.cc 22 command/FunctorTest.cc 23 command/ExecutorPtrTest.cc 21 24 object/ClassFactoryTest.cc 22 25 object/ContextTest.cc … … 25 28 object/ListableTest.cc 26 29 object/ObjectListBaseTest.cc 30 object/ObjectListTest.cc 27 31 object/ObjectListIteratorTest.cc 28 32 object/StrongPtrTest.cc -
code/trunk/test/core/class/IdentifiableTest.cc
r10624 r11071 20 20 { 21 21 public: 22 virtual void SetUp() 22 virtual void SetUp() override 23 23 { 24 24 new IdentifierManager(); … … 26 26 } 27 27 28 virtual void TearDown() 28 virtual void TearDown() override 29 29 { 30 30 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); … … 37 37 { 38 38 IdentifiableClass* test = new IdentifiableClass(); 39 ASSERT_TRUE(test != NULL);39 ASSERT_TRUE(test != nullptr); 40 40 delete test; 41 41 } -
code/trunk/test/core/class/IdentifierClassHierarchyTest.cc
r10624 r11071 86 86 } 87 87 88 virtual void test1() {}88 virtual void test1() override {} 89 89 }; 90 90 … … 97 97 } 98 98 99 virtual void test1() {}100 virtual void test2() {}99 virtual void test1() override {} 100 virtual void test2() override {} 101 101 }; 102 102 … … 109 109 } 110 110 111 virtual void test1() {}112 virtual void test2() {}111 virtual void test1() override {} 112 virtual void test2() override {} 113 113 }; 114 114 … … 121 121 } 122 122 123 virtual void test1() {}124 virtual void test2() {}123 virtual void test1() override {} 124 virtual void test2() override {} 125 125 }; 126 126 … … 140 140 { 141 141 public: 142 virtual void SetUp() 142 virtual void SetUp() override 143 143 { 144 144 new IdentifierManager(); 145 145 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 146 Context::setRootContext(new Context( NULL));146 Context::setRootContext(new Context(nullptr)); 147 147 Identifier::initConfigValues_s = false; // TODO: hack! 148 148 IdentifierManager::getInstance().createClassHierarchy(); 149 149 } 150 150 151 virtual void TearDown() 151 virtual void TearDown() override 152 152 { 153 153 IdentifierManager::getInstance().destroyClassHierarchy(); -
code/trunk/test/core/class/IdentifierExternalClassHierarchyTest.cc
r10624 r11071 36 36 } 37 37 38 virtual void test() {}38 virtual void test() override {} 39 39 }; 40 40 … … 47 47 { 48 48 public: 49 virtual void SetUp() 49 virtual void SetUp() override 50 50 { 51 51 new IdentifierManager(); 52 52 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 53 Context::setRootContext(new Context( NULL));53 Context::setRootContext(new Context(nullptr)); 54 54 Identifier::initConfigValues_s = false; // TODO: hack! 55 55 IdentifierManager::getInstance().createClassHierarchy(); 56 56 } 57 57 58 virtual void TearDown() 58 virtual void TearDown() override 59 59 { 60 60 IdentifierManager::getInstance().destroyClassHierarchy(); -
code/trunk/test/core/class/IdentifierNestedClassHierarchyTest.cc
r11052 r11071 107 107 { 108 108 public: 109 virtual void SetUp() 109 virtual void SetUp() override 110 110 { 111 111 new IdentifierManager(); 112 112 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 113 Context::setRootContext(new Context( NULL));113 Context::setRootContext(new Context(nullptr)); 114 114 Identifier::initConfigValues_s = false; // TODO: hack! 115 115 IdentifierManager::getInstance().createClassHierarchy(); 116 116 } 117 117 118 virtual void TearDown() 118 virtual void TearDown() override 119 119 { 120 120 IdentifierManager::getInstance().destroyClassHierarchy(); -
code/trunk/test/core/class/IdentifierSimpleClassHierarchyTest.cc
r10624 r11071 38 38 } 39 39 40 virtual void test() {}40 virtual void test() override {} 41 41 }; 42 42 … … 49 49 { 50 50 public: 51 virtual void SetUp() 51 virtual void SetUp() override 52 52 { 53 53 new IdentifierManager(); 54 54 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 55 Context::setRootContext(new Context( NULL));55 Context::setRootContext(new Context(nullptr)); 56 56 Identifier::initConfigValues_s = false; // TODO: hack! 57 57 IdentifierManager::getInstance().createClassHierarchy(); 58 58 } 59 59 60 virtual void TearDown() 60 virtual void TearDown() override 61 61 { 62 62 IdentifierManager::getInstance().destroyClassHierarchy(); -
code/trunk/test/core/class/IdentifierTest.cc
r10624 r11071 27 27 { 28 28 public: 29 virtual void SetUp() 29 virtual void SetUp() override 30 30 { 31 31 new IdentifierManager(); … … 33 33 } 34 34 35 virtual void TearDown() 35 virtual void TearDown() override 36 36 { 37 37 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); … … 46 46 47 47 Identifier* identifier = Class(TestClass); 48 EXPECT_TRUE(identifier != NULL);48 EXPECT_TRUE(identifier != nullptr); 49 49 } 50 50 … … 54 54 55 55 Identifier* identifier = Class(TestSubclass); 56 EXPECT_TRUE(identifier != NULL);56 EXPECT_TRUE(identifier != nullptr); 57 57 } 58 58 -
code/trunk/test/core/class/OrxonoxClassTest.cc
r10624 r11071 16 16 { 17 17 public: 18 virtual void SetUp() 18 virtual void SetUp() override 19 19 { 20 20 new IdentifierManager(); 21 Context::setRootContext(new Context( NULL));21 Context::setRootContext(new Context(nullptr)); 22 22 } 23 23 24 virtual void TearDown() 24 virtual void TearDown() override 25 25 { 26 26 Context::destroyRootContext(); … … 33 33 { 34 34 TestClass* test = new TestClass(); 35 ASSERT_TRUE(test != NULL);35 ASSERT_TRUE(test != nullptr); 36 36 delete test; 37 37 } -
code/trunk/test/core/class/OrxonoxInterfaceTest.cc
r10624 r11071 31 31 { 32 32 public: 33 virtual void SetUp() 33 virtual void SetUp() override 34 34 { 35 35 new IdentifierManager(); 36 Context::setRootContext(new Context( NULL));36 Context::setRootContext(new Context(nullptr)); 37 37 } 38 38 39 virtual void TearDown() 39 virtual void TearDown() override 40 40 { 41 41 Context::destroyRootContext(); … … 48 48 { 49 49 TestClass1* test = new TestClass1(); 50 ASSERT_TRUE(test != NULL);50 ASSERT_TRUE(test != nullptr); 51 51 delete test; 52 52 } … … 55 55 { 56 56 TestClass2* test = new TestClass2(); 57 ASSERT_TRUE(test != NULL);57 ASSERT_TRUE(test != nullptr); 58 58 delete test; 59 59 } -
code/trunk/test/core/class/SubclassIdentifierTest.cc
r10624 r11071 13 13 { 14 14 public: 15 TestClass(Context* context = NULL) { RegisterObject(TestClass); }15 TestClass(Context* context = nullptr) { RegisterObject(TestClass); } 16 16 }; 17 17 … … 19 19 { 20 20 public: 21 TestSubclass(Context* context = NULL) { RegisterObject(TestSubclass); }21 TestSubclass(Context* context = nullptr) { RegisterObject(TestSubclass); } 22 22 }; 23 23 … … 29 29 { 30 30 public: 31 virtual void SetUp() 31 virtual void SetUp() override 32 32 { 33 33 new IdentifierManager(); 34 34 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 35 Context::setRootContext(new Context( NULL));35 Context::setRootContext(new Context(nullptr)); 36 36 Identifier::initConfigValues_s = false; // TODO: hack! 37 37 IdentifierManager::getInstance().createClassHierarchy(); 38 38 } 39 39 40 virtual void TearDown() 40 virtual void TearDown() override 41 41 { 42 42 IdentifierManager::getInstance().destroyClassHierarchy(); … … 77 77 subclassIdentifier = Class(TestSubclass); 78 78 79 TestClass* instance = subclassIdentifier.fabricate( NULL);80 ASSERT_TRUE(instance != NULL);79 TestClass* instance = subclassIdentifier.fabricate(nullptr); 80 ASSERT_TRUE(instance != nullptr); 81 81 EXPECT_EQ(Class(TestSubclass), instance->getIdentifier()); 82 82 delete instance; -
code/trunk/test/core/class/SuperTest.cc
r10624 r11071 14 14 { 15 15 public: 16 TestClass(Context* context = NULL) : BaseObject(context), changedNameBase_(false), xmlPortBase_(false), modeBase_(XMLPort::NOP)16 TestClass(Context* context = nullptr) : BaseObject(context), changedNameBase_(false), xmlPortBase_(false), modeBase_(XMLPort::NOP) 17 17 { 18 18 RegisterObject(TestClass); 19 19 } 20 20 21 virtual void changedName() 21 virtual void changedName() override 22 22 { 23 23 this->changedNameBase_ = true; 24 24 } 25 25 26 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) 26 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override 27 27 { 28 28 this->xmlPortBase_ = true; … … 38 38 { 39 39 public: 40 TestSubclass(Context* context = NULL) : TestClass(context), changedNameSubclass_(false), xmlPortSubclass_(false), modeSubclass_(XMLPort::NOP)40 TestSubclass(Context* context = nullptr) : TestClass(context), changedNameSubclass_(false), xmlPortSubclass_(false), modeSubclass_(XMLPort::NOP) 41 41 { 42 42 RegisterObject(TestSubclass); 43 43 } 44 44 45 virtual void changedName() 45 virtual void changedName() override 46 46 { 47 47 this->changedNameSubclass_ = true; … … 50 50 } 51 51 52 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) 52 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override 53 53 { 54 54 this->xmlPortSubclass_ = true; … … 70 70 { 71 71 public: 72 virtual void SetUp() 72 virtual void SetUp() override 73 73 { 74 74 new IdentifierManager(); 75 75 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 76 Context::setRootContext(new Context( NULL));76 Context::setRootContext(new Context(nullptr)); 77 77 Identifier::initConfigValues_s = false; // TODO: hack! 78 78 IdentifierManager::getInstance().createClassHierarchy(); 79 79 } 80 80 81 virtual void TearDown() 81 virtual void TearDown() override 82 82 { 83 83 IdentifierManager::getInstance().destroyClassHierarchy(); … … 132 132 EXPECT_EQ(XMLPort::NOP, test.modeSubclass_); 133 133 134 Element* element = NULL;134 Element* element = nullptr; 135 135 test.XMLPort(*element, XMLPort::SaveObject); 136 136 -
code/trunk/test/core/command/CommandTest.cc
r10624 r11071 129 129 ModifyConsoleCommand("test").popObject(); 130 130 else if (a == 1) 131 ModifyConsoleCommand("test").setFunction(FunctorPtr( 0));131 ModifyConsoleCommand("test").setFunction(FunctorPtr(nullptr)); 132 132 else if (a == -1) 133 133 ModifyConsoleCommand("test").popFunction(); … … 138 138 { 139 139 public: 140 virtual void SetUp() 140 virtual void SetUp() override 141 141 { 142 142 new IdentifierManager(); 143 143 new ConsoleCommandManager(); 144 144 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND); 145 Context::setRootContext(new Context( NULL));145 Context::setRootContext(new Context(nullptr)); 146 146 Identifier::initConfigValues_s = false; // TODO: hack! 147 147 IdentifierManager::getInstance().createClassHierarchy(); 148 148 } 149 149 150 virtual void TearDown() 150 virtual void TearDown() override 151 151 { 152 152 IdentifierManager::getInstance().destroyClassHierarchy(); -
code/trunk/test/core/object/ClassFactoryTest.cc
r10624 r11071 14 14 { 15 15 public: 16 virtual void SetUp() 16 virtual void SetUp() override 17 17 { 18 18 new IdentifierManager(); 19 19 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 20 Context::setRootContext(new Context( NULL));20 Context::setRootContext(new Context(nullptr)); 21 21 } 22 22 23 virtual void TearDown() 23 virtual void TearDown() override 24 24 { 25 25 Context::destroyRootContext(); … … 33 33 { 34 34 Factory* factory = new ClassFactoryWithContext<BaseObject>(); 35 Identifiable* object = factory->fabricate( NULL);36 ASSERT_TRUE(object != NULL);35 Identifiable* object = factory->fabricate(nullptr); 36 ASSERT_TRUE(object != nullptr); 37 37 BaseObject* baseObject = dynamic_cast<BaseObject*>(object); 38 EXPECT_TRUE(baseObject != NULL);38 EXPECT_TRUE(baseObject != nullptr); 39 39 delete object; 40 40 // don't delete factory - it remains in the identifier -
code/trunk/test/core/object/ContextTest.cc
r10624 r11071 12 12 { 13 13 public: 14 SubclassContext() : Context( NULL) { RegisterObject(SubclassContext); }14 SubclassContext() : Context(nullptr) { RegisterObject(SubclassContext); } 15 15 }; 16 16 … … 21 21 { 22 22 public: 23 virtual void SetUp() 23 virtual void SetUp() override 24 24 { 25 25 new IdentifierManager(); 26 26 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 27 Context::setRootContext(new Context( NULL));27 Context::setRootContext(new Context(nullptr)); 28 28 } 29 29 30 virtual void TearDown() 30 virtual void TearDown() override 31 31 { 32 32 Context::destroyRootContext(); … … 39 39 TEST_F(ContextTest, CanCreateContext) 40 40 { 41 Context context( NULL);41 Context context(nullptr); 42 42 } 43 43 … … 49 49 TEST_F(ContextTest, ContextIsItsOwnContext) 50 50 { 51 Context context( NULL);51 Context context(nullptr); 52 52 EXPECT_EQ(&context, context.getContext()); 53 53 } … … 68 68 TEST_F(ContextTest, ContextIsAddedToItsOwnObjectList) 69 69 { 70 Context context( NULL);70 Context context(nullptr); 71 71 ASSERT_EQ(1u, context.getObjectList<Context>()->size()); 72 72 EXPECT_TRUE(context.getObjectList<Context>()->begin()->objectBase_ == static_cast<Listable*>(&context)); … … 75 75 TEST_F(ContextTest, ContextIsAddedToObjectListOfBaseContext) 76 76 { 77 Context baseContext( NULL);77 Context baseContext(nullptr); 78 78 Context subContext(&baseContext); 79 79 -
code/trunk/test/core/object/DestroyableTest.cc
r9603 r11071 32 32 DestroyableTest* test = new DestroyableTest(destroyed); 33 33 EXPECT_FALSE(destroyed); 34 EXPECT_TRUE(test != NULL);34 EXPECT_TRUE(test != nullptr); 35 35 test->destroy(); 36 36 EXPECT_TRUE(destroyed); -
code/trunk/test/core/object/IteratorTest.cc
r10624 r11071 15 15 { 16 16 public: 17 TestInterface() { RegisterObject(TestInterface); }17 TestInterface() { RegisterObject(TestInterface); } 18 18 }; 19 19 … … 32 32 { 33 33 public: 34 virtual void SetUp() 34 virtual void SetUp() override 35 35 { 36 36 new IdentifierManager(); 37 37 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 38 Context::setRootContext(new Context( NULL));38 Context::setRootContext(new Context(nullptr)); 39 39 } 40 40 41 virtual void TearDown() 41 virtual void TearDown() override 42 42 { 43 43 Context::destroyRootContext(); … … 55 55 TEST_F(IteratorTest, CanAssignIterator) 56 56 { 57 Iterator<TestInterface> it = ObjectList<TestInterface>::begin(); 57 ObjectList<TestInterface> list; 58 Iterator<TestInterface> it = list.begin(); 58 59 } 59 60 … … 61 62 { 62 63 size_t i = 0; 63 for (Iterator<TestInterface> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it) 64 ObjectList<TestInterface> list; 65 for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it) 64 66 ++i; 65 67 EXPECT_EQ(0u, i); … … 77 79 78 80 // iterate over interfaces but use a TestClass iterator - now we can call TestClass::test() 79 for (Iterator<TestClass> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it) 81 ObjectList<TestInterface> list; 82 for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it) 80 83 it->test(); 81 84 } 85 86 TEST_F(IteratorTest, CanIterateOverInterfaceListWithInterfaceIterator) 87 { 88 TestClass testClass; 89 TestInterface testInterface; 90 91 size_t i = 0; 92 ObjectList<TestInterface> list; 93 for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it) 94 { 95 ++i; 96 if (i == 1u) EXPECT_EQ(&testClass, *it); 97 if (i == 2u) EXPECT_EQ(&testInterface, *it); 98 } 99 EXPECT_EQ(2u, i); 100 } 101 102 TEST_F(IteratorTest, CanIterateOverClassListWithClassIterator) 103 { 104 TestClass testClass; 105 TestInterface testInterface; 106 107 size_t i = 0; 108 ObjectList<TestClass> list; 109 for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it) 110 { 111 ++i; 112 if (i == 1u) EXPECT_EQ(&testClass, *it); 113 } 114 EXPECT_EQ(1u, i); 115 } 116 117 TEST_F(IteratorTest, CanIterateOverInterfaceListWithClassIterator) 118 { 119 TestClass testClass; 120 TestInterface testInterface; 121 122 size_t i = 0; 123 ObjectList<TestInterface> list; 124 for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it) 125 { 126 ++i; 127 if (i == 1u) EXPECT_EQ(&testClass, *it); 128 if (i == 2u) EXPECT_EQ(nullptr, *it); 129 } 130 EXPECT_EQ(2u, i); 131 } 132 133 TEST_F(IteratorTest, CanIterateOverClassListWithInterfaceIterator) 134 { 135 TestClass testClass; 136 TestInterface testInterface; 137 138 size_t i = 0; 139 ObjectList<TestClass> list; 140 for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it) 141 { 142 ++i; 143 if (i == 1u) EXPECT_EQ(&testClass, *it); 144 } 145 EXPECT_EQ(1u, i); 146 } 82 147 } -
code/trunk/test/core/object/ListableTest.cc
r10624 r11071 37 37 { 38 38 public: 39 virtual void SetUp() 39 virtual void SetUp() override 40 40 { 41 41 new IdentifierManager(); 42 42 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 43 Context::setRootContext(new Context( NULL));43 Context::setRootContext(new Context(nullptr)); 44 44 } 45 45 46 virtual void TearDown() 46 virtual void TearDown() override 47 47 { 48 48 Context::destroyRootContext(); … … 56 56 { 57 57 ListableClassTest* test = new ListableClassTest(); 58 ASSERT_TRUE(test != NULL);58 ASSERT_TRUE(test != nullptr); 59 59 delete test; 60 60 } … … 63 63 { 64 64 ListableClassTest test; 65 EXPECT_EQ(1u, ObjectList<ListableClassTest> ::size());65 EXPECT_EQ(1u, ObjectList<ListableClassTest>().size()); 66 66 EXPECT_TRUE(objectListContains<ListableClassTest>(&test)); 67 67 } … … 70 70 { 71 71 ListableSubclassTest test; 72 EXPECT_EQ(1u, ObjectList<ListableClassTest> ::size());72 EXPECT_EQ(1u, ObjectList<ListableClassTest>().size()); 73 73 EXPECT_TRUE(objectListContains<ListableClassTest>(&test)); 74 EXPECT_EQ(1u, ObjectList<ListableSubclassTest> ::size());74 EXPECT_EQ(1u, ObjectList<ListableSubclassTest>().size()); 75 75 EXPECT_TRUE(objectListContains<ListableSubclassTest>(&test)); 76 76 } … … 78 78 TEST_F(ListableTest, RemovesFromObjectList) 79 79 { 80 EXPECT_EQ(0u, ObjectList<ListableClassTest> ::size());80 EXPECT_EQ(0u, ObjectList<ListableClassTest>().size()); 81 81 { 82 82 ListableClassTest test; 83 EXPECT_EQ(1u, ObjectList<ListableClassTest> ::size());83 EXPECT_EQ(1u, ObjectList<ListableClassTest>().size()); 84 84 EXPECT_TRUE(objectListContains<ListableClassTest>(&test)); 85 85 } 86 EXPECT_EQ(0u, ObjectList<ListableClassTest> ::size());86 EXPECT_EQ(0u, ObjectList<ListableClassTest>().size()); 87 87 } 88 88 89 89 TEST_F(ListableTest, RemovesFromAllObjectLists) 90 90 { 91 EXPECT_EQ(0u, ObjectList<ListableClassTest> ::size());92 EXPECT_EQ(0u, ObjectList<ListableSubclassTest> ::size());91 EXPECT_EQ(0u, ObjectList<ListableClassTest>().size()); 92 EXPECT_EQ(0u, ObjectList<ListableSubclassTest>().size()); 93 93 { 94 94 ListableSubclassTest test; 95 EXPECT_EQ(1u, ObjectList<ListableClassTest> ::size());95 EXPECT_EQ(1u, ObjectList<ListableClassTest>().size()); 96 96 EXPECT_TRUE(objectListContains<ListableClassTest>(&test)); 97 EXPECT_EQ(1u, ObjectList<ListableSubclassTest> ::size());97 EXPECT_EQ(1u, ObjectList<ListableSubclassTest>().size()); 98 98 EXPECT_TRUE(objectListContains<ListableSubclassTest>(&test)); 99 99 } 100 EXPECT_EQ(0u, ObjectList<ListableClassTest> ::size());101 EXPECT_EQ(0u, ObjectList<ListableSubclassTest> ::size());100 EXPECT_EQ(0u, ObjectList<ListableClassTest>().size()); 101 EXPECT_EQ(0u, ObjectList<ListableSubclassTest>().size()); 102 102 } 103 103 104 104 TEST_F(ListableTest, CanAddObjectToContext) 105 105 { 106 Context context( NULL);106 Context context(nullptr); 107 107 ListableSubclassTest test; 108 108 … … 118 118 TEST_F(ListableTest, CanAddObjectToSubContext) 119 119 { 120 Context baseContext( NULL);120 Context baseContext(nullptr); 121 121 Context subContext(&baseContext); 122 122 ListableSubclassTest test; … … 139 139 { 140 140 Context* rootContext = Context::getRootContext(); 141 Context newContext( NULL);141 Context newContext(nullptr); 142 142 ListableSubclassTest test; 143 143 -
code/trunk/test/core/object/ObjectListBaseTest.cc
r9661 r11071 24 24 { 25 25 ObjectListBase list; 26 ObjectListBaseElement* element = new ObjectListElement<Listable>( NULL);26 ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr); 27 27 list.addElement(element); 28 28 EXPECT_EQ(1u, list.size()); … … 32 32 { 33 33 ObjectListBase list; 34 ObjectListBaseElement* element = new ObjectListElement<Listable>( NULL);34 ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr); 35 35 list.addElement(element); 36 36 EXPECT_EQ(1u, list.size()); … … 43 43 { 44 44 ObjectListBase list; 45 list.addElement(new ObjectListElement<Listable>( NULL));45 list.addElement(new ObjectListElement<Listable>(nullptr)); 46 46 EXPECT_EQ(1u, list.size()); 47 47 } … … 52 52 EXPECT_EQ(0u, list.size()); 53 53 { 54 ObjectListElement<Listable> element1( NULL);54 ObjectListElement<Listable> element1(nullptr); 55 55 list.addElement(&element1); 56 56 EXPECT_EQ(1u, list.size()); 57 57 { 58 ObjectListElement<Listable> element1( NULL);58 ObjectListElement<Listable> element1(nullptr); 59 59 list.addElement(&element1); 60 60 EXPECT_EQ(2u, list.size()); 61 61 { 62 ObjectListElement<Listable> element1( NULL);62 ObjectListElement<Listable> element1(nullptr); 63 63 list.addElement(&element1); 64 64 EXPECT_EQ(3u, list.size()); … … 76 76 ObjectListElementRemovalListenerMock listener; 77 77 list.registerRemovalListener(&listener); 78 ObjectListBaseElement* element = new ObjectListElement<Listable>( NULL);78 ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr); 79 79 list.addElement(element); 80 80 EXPECT_CALL(listener, removedElement(element)); -
code/trunk/test/core/object/ObjectListIteratorTest.cc
r10624 r11071 3 3 4 4 #include "core/object/ObjectListIterator.h" 5 #include "core/object/Listable.h" 5 #include "core/class/OrxonoxClass.h" 6 #include "core/class/OrxonoxInterface.h" 6 7 #include "core/CoreIncludes.h" 7 8 #include "core/module/ModuleInstance.h" … … 11 12 namespace 12 13 { 13 class ListableTest : public Listable14 class TestInterface : virtual public OrxonoxInterface 14 15 { 15 16 public: 16 ListableTest() { RegisterObject(ListableTest); } 17 TestInterface() { RegisterObject(TestInterface); } 18 }; 19 20 class TestClass : public OrxonoxClass, public TestInterface 21 { 22 public: 23 TestClass() { RegisterObject(TestClass); } 17 24 MOCK_METHOD0(test, void()); 18 25 }; 19 26 20 RegisterClassNoArgs(ListableTest); 27 RegisterClassNoArgs(TestInterface); 28 RegisterClassNoArgs(TestClass); 21 29 22 30 // Fixture … … 24 32 { 25 33 public: 26 virtual void SetUp() 34 virtual void SetUp() override 27 35 { 28 36 new IdentifierManager(); 29 37 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 30 Context::setRootContext(new Context( NULL));38 Context::setRootContext(new Context(nullptr)); 31 39 } 32 40 33 virtual void TearDown() 41 virtual void TearDown() override 34 42 { 35 43 Context::destroyRootContext(); … … 42 50 TEST_F(ObjectListIteratorTest, CanCreateIterator) 43 51 { 44 ObjectListIterator< ListableTest> it;52 ObjectListIterator<TestClass> it; 45 53 } 46 54 47 55 TEST_F(ObjectListIteratorTest, CanAssignIterator) 48 56 { 49 ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); 57 ObjectList<TestClass> list; 58 ObjectListIterator<TestClass> it = list.begin(); 50 59 } 51 60 … … 53 62 { 54 63 size_t i = 0; 55 for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); it != ObjectList<ListableTest>::end(); ++it) 64 ObjectList<TestClass> list; 65 for (ObjectListIterator<TestClass> it = list.begin(); it != list.end(); ++it) 56 66 ++i; 57 67 EXPECT_EQ(0u, i); … … 60 70 TEST_F(ObjectListIteratorTest, CanIterateOverFullList) 61 71 { 62 ListableTest test1; 63 ListableTest test2; 64 ListableTest test3; 72 TestClass test1; 73 TestClass test2; 74 TestClass test3; 75 TestInterface interface; 65 76 66 77 size_t i = 0; 67 for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); it != ObjectList<ListableTest>::end(); ++it) 78 ObjectList<TestClass> list; 79 for (ObjectListIterator<TestClass> it = list.begin(); it != list.end(); ++it) 68 80 { 69 81 ++i; … … 77 89 TEST_F(ObjectListIteratorTest, CanIterateReverseOverFullList) 78 90 { 79 ListableTest test1; 80 ListableTest test2; 81 ListableTest test3; 91 TestClass test1; 92 TestClass test2; 93 TestClass test3; 94 TestInterface interface; 82 95 83 96 size_t i = 0; 84 for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::rbegin(); it != ObjectList<ListableTest>::rend(); --it) 97 ObjectList<TestClass> list; 98 for (ObjectListIterator<TestClass> it = list.rbegin(); it != list.rend(); --it) 85 99 { 86 100 ++i; … … 94 108 TEST_F(ObjectListIteratorTest, CanCallObjects) 95 109 { 96 ListableTest test1; 97 ListableTest test2; 98 ListableTest test3; 110 TestClass test1; 111 TestClass test2; 112 TestClass test3; 113 TestInterface interface; 99 114 100 115 EXPECT_CALL(test1, test()); … … 102 117 EXPECT_CALL(test3, test()); 103 118 104 for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); it != ObjectList<ListableTest>::end(); ++it) 119 ObjectList<TestClass> list; 120 for (ObjectListIterator<TestClass> it = list.begin(); it != list.end(); ++it) 105 121 it->test(); 106 122 } -
code/trunk/test/core/object/StrongPtrTest.cc
r10624 r11071 1 #include <utility> 1 2 #include <gtest/gtest.h> 2 3 #include "core/object/StrongPtr.h" … … 23 24 StrongPtr<DestroyableTest> strongPtr = test; 24 25 EXPECT_EQ(test, strongPtr.get()); 26 EXPECT_EQ(test, &(*strongPtr)); 27 EXPECT_EQ(static_cast<Destroyable*>(test), strongPtr.getBase()); 28 test->destroy(); 29 } 30 31 TEST(StrongPtrTest, CanHaveMultiplePointers) 32 { 33 bool bla; 34 DestroyableTest* test = new DestroyableTest(bla); 35 StrongPtr<DestroyableTest> strongPtr1 = test; 36 StrongPtr<DestroyableTest> strongPtr2 = test; 37 StrongPtr<DestroyableTest> strongPtr3 = test; 38 EXPECT_EQ(test, strongPtr1.get()); 39 EXPECT_EQ(test, strongPtr2.get()); 40 EXPECT_EQ(test, strongPtr3.get()); 41 EXPECT_EQ(3u, test->getReferenceCount()); 25 42 test->destroy(); 26 43 } … … 94 111 void isNull(const StrongPtr<DestroyableTest> strongPtr) 95 112 { 96 EXPECT_TRUE(strongPtr == NULL);97 EXPECT_TRUE(strongPtr == 0);113 EXPECT_TRUE(strongPtr == nullptr); 114 EXPECT_TRUE(strongPtr == nullptr); 98 115 EXPECT_TRUE(!strongPtr); 99 EXPECT_FALSE(strongPtr != NULL);100 EXPECT_FALSE(strongPtr != 0);116 EXPECT_FALSE(strongPtr != nullptr); 117 EXPECT_FALSE(strongPtr != nullptr); 101 118 EXPECT_FALSE(strongPtr); 102 119 } … … 109 126 } 110 127 { 111 StrongPtr<DestroyableTest> strongPtr = NULL;128 StrongPtr<DestroyableTest> strongPtr = nullptr; 112 129 isNull(strongPtr); 113 130 } 114 131 { 115 132 StrongPtr<DestroyableTest> strongPtr; 116 strongPtr = NULL;117 isNull(strongPtr); 118 } 119 { 120 StrongPtr<DestroyableTest> strongPtr = 0;133 strongPtr = nullptr; 134 isNull(strongPtr); 135 } 136 { 137 StrongPtr<DestroyableTest> strongPtr = nullptr; 121 138 isNull(strongPtr); 122 139 } 123 140 { 124 141 StrongPtr<DestroyableTest> strongPtr; 125 strongPtr = 0;142 strongPtr = nullptr; 126 143 isNull(strongPtr); 127 144 } … … 133 150 DestroyableTest* test = new DestroyableTest(destroyed); 134 151 StrongPtr<DestroyableTest> strongPtr = test; 135 EXPECT_FALSE(strongPtr == NULL);136 EXPECT_FALSE(strongPtr == 0);152 EXPECT_FALSE(strongPtr == nullptr); 153 EXPECT_FALSE(strongPtr == nullptr); 137 154 EXPECT_FALSE(!strongPtr); 138 EXPECT_TRUE(strongPtr != NULL);139 EXPECT_TRUE(strongPtr != 0);155 EXPECT_TRUE(strongPtr != nullptr); 156 EXPECT_TRUE(strongPtr != nullptr); 140 157 EXPECT_TRUE(strongPtr); 141 158 test->destroy(); 142 159 } 160 161 TEST(StrongPtrTest, TestConstructors) 162 { 163 bool bla; 164 DestroyableTest* test = new DestroyableTest(bla); 165 166 // default 167 StrongPtr<DestroyableTest> strongPtr1; 168 EXPECT_EQ(nullptr, strongPtr1.get()); 169 170 // pointer 171 StrongPtr<DestroyableTest> strongPtr2a = test; 172 StrongPtr<DestroyableTest> strongPtr2b(test); 173 EXPECT_EQ(test, strongPtr2a.get()); 174 EXPECT_EQ(test, strongPtr2b.get()); 175 176 // copy 177 StrongPtr<DestroyableTest> strongPtr3a = strongPtr2a; 178 StrongPtr<DestroyableTest> strongPtr3b(strongPtr2b); 179 EXPECT_EQ(test, strongPtr3a.get()); 180 EXPECT_EQ(test, strongPtr3b.get()); 181 182 // move 183 StrongPtr<DestroyableTest> strongPtr4a = std::move(strongPtr3a); 184 StrongPtr<DestroyableTest> strongPtr4b(std::move(strongPtr3b)); 185 EXPECT_EQ(test, strongPtr4a.get()); 186 EXPECT_EQ(test, strongPtr4b.get()); 187 188 // other 189 StrongPtr<Destroyable> strongPtr5a = strongPtr4a; 190 StrongPtr<Destroyable> strongPtr5b(strongPtr4b); 191 EXPECT_EQ(test, strongPtr5a.get()); 192 EXPECT_EQ(test, strongPtr5b.get()); 193 194 // weakPtr 195 WeakPtr<DestroyableTest> weakPtr = test; 196 StrongPtr<DestroyableTest> strongPtr6a = weakPtr; 197 StrongPtr<DestroyableTest> strongPtr6b(weakPtr); 198 EXPECT_EQ(test, strongPtr6a.get()); 199 EXPECT_EQ(test, strongPtr6b.get()); 200 201 // weakPtr other 202 StrongPtr<Destroyable> strongPtr7a = weakPtr; 203 StrongPtr<Destroyable> strongPtr7b(weakPtr); 204 EXPECT_EQ(test, strongPtr7a.get()); 205 EXPECT_EQ(test, strongPtr7b.get()); 206 207 test->destroy(); 208 } 209 210 TEST(StrongPtrTest, TestAssignments) 211 { 212 bool bla; 213 DestroyableTest* test = new DestroyableTest(bla); 214 215 // pointer 216 StrongPtr<DestroyableTest> strongPtr1; 217 strongPtr1 = test; 218 EXPECT_EQ(test, strongPtr1.get()); 219 220 // copy 221 StrongPtr<DestroyableTest> strongPtr2; 222 strongPtr2 = strongPtr1; 223 EXPECT_EQ(test, strongPtr2.get()); 224 225 // move 226 StrongPtr<DestroyableTest> strongPtr3; 227 strongPtr3 = std::move(strongPtr2); 228 EXPECT_EQ(test, strongPtr3.get()); 229 230 // other 231 StrongPtr<Destroyable> strongPtr4; 232 strongPtr4 = strongPtr3; 233 EXPECT_EQ(test, strongPtr4.get()); 234 235 // weakPtr 236 WeakPtr<DestroyableTest> weakPtr = test; 237 StrongPtr<DestroyableTest> strongPtr5; 238 strongPtr5 = weakPtr; 239 EXPECT_EQ(test, strongPtr5.get()); 240 241 // weakPtr other 242 StrongPtr<Destroyable> strongPtr6; 243 strongPtr6 = weakPtr; 244 EXPECT_EQ(test, strongPtr6.get()); 245 246 test->destroy(); 247 } 248 249 TEST(StrongPtrTest, TestStrongPtrInVector) 250 { 251 bool bla; 252 DestroyableTest* test = new DestroyableTest(bla); 253 254 std::vector<StrongPtr<DestroyableTest>> vector; 255 vector.push_back(test); 256 vector.push_back(test); 257 vector.push_back(test); 258 259 ASSERT_EQ(3, vector.size()); 260 EXPECT_EQ(test, vector[0].get()); 261 EXPECT_EQ(test, vector[1].get()); 262 EXPECT_EQ(test, vector[2].get()); 263 EXPECT_EQ(3u, test->getReferenceCount()); 264 265 vector.clear(); 266 EXPECT_EQ(0u, test->getReferenceCount()); 267 268 test->destroy(); 269 } 270 271 TEST(StrongPtrTest, TestReset) 272 { 273 bool bla; 274 DestroyableTest* test = new DestroyableTest(bla); 275 StrongPtr<DestroyableTest> strongPtr(test); 276 EXPECT_EQ(test, strongPtr.get()); 277 EXPECT_EQ(1u, test->getReferenceCount()); 278 strongPtr.reset(); 279 EXPECT_EQ(nullptr, strongPtr.get()); 280 EXPECT_EQ(0u, test->getReferenceCount()); 281 282 test->destroy(); 283 } 284 285 TEST(StrongPtrTest, TestSwap) 286 { 287 bool bla; 288 DestroyableTest* test1 = new DestroyableTest(bla); 289 DestroyableTest* test2 = new DestroyableTest(bla); 290 291 StrongPtr<DestroyableTest> strongPtr1(test1); 292 StrongPtr<DestroyableTest> strongPtr2(test2); 293 EXPECT_EQ(test1, strongPtr1.get()); 294 EXPECT_EQ(test2, strongPtr2.get()); 295 EXPECT_EQ(1u, test1->getReferenceCount()); 296 EXPECT_EQ(1u, test2->getReferenceCount()); 297 298 strongPtr1.swap(strongPtr2); 299 300 EXPECT_EQ(test2, strongPtr1.get()); 301 EXPECT_EQ(test1, strongPtr2.get()); 302 EXPECT_EQ(1u, test1->getReferenceCount()); 303 EXPECT_EQ(1u, test2->getReferenceCount()); 304 305 test1->destroy(); 306 test2->destroy(); 307 } 143 308 } -
code/trunk/test/core/object/WeakPtrTest.cc
r10624 r11071 1 #include <utility> 1 2 #include <gtest/gtest.h> 2 3 #include <gmock/gmock.h> … … 24 25 WeakPtr<DestroyableTest> weakPtr = test; 25 26 EXPECT_EQ(test, weakPtr.get()); 27 EXPECT_EQ(test, &(*weakPtr)); 28 EXPECT_EQ(static_cast<Destroyable*>(test), weakPtr.getBase()); 26 29 test->destroy(); 27 30 } … … 33 36 EXPECT_EQ(test, weakPtr.get()); 34 37 test->destroy(); 35 EXPECT_EQ(NULL, weakPtr.get()); 38 EXPECT_EQ(nullptr, weakPtr.get()); 39 } 40 41 TEST(WeakPtrTest, CanHaveMultiplePointers) 42 { 43 DestroyableTest* test = new DestroyableTest(); 44 WeakPtr<DestroyableTest> weakPtr1 = test; 45 WeakPtr<DestroyableTest> weakPtr2 = test; 46 WeakPtr<DestroyableTest> weakPtr3 = test; 47 EXPECT_EQ(test, weakPtr1.get()); 48 EXPECT_EQ(test, weakPtr2.get()); 49 EXPECT_EQ(test, weakPtr3.get()); 50 test->destroy(); 51 EXPECT_EQ(nullptr, weakPtr1.get()); 52 EXPECT_EQ(nullptr, weakPtr2.get()); 53 EXPECT_EQ(nullptr, weakPtr3.get()); 36 54 } 37 55 … … 48 66 void isNull(const WeakPtr<DestroyableTest> weakPtr) 49 67 { 50 EXPECT_TRUE(weakPtr == NULL);51 EXPECT_TRUE(weakPtr == 0);68 EXPECT_TRUE(weakPtr == nullptr); 69 EXPECT_TRUE(weakPtr == nullptr); 52 70 EXPECT_TRUE(!weakPtr); 53 EXPECT_FALSE(weakPtr != NULL);54 EXPECT_FALSE(weakPtr != 0);71 EXPECT_FALSE(weakPtr != nullptr); 72 EXPECT_FALSE(weakPtr != nullptr); 55 73 EXPECT_FALSE(weakPtr); 56 74 } … … 63 81 } 64 82 { 65 WeakPtr<DestroyableTest> weakPtr = NULL;83 WeakPtr<DestroyableTest> weakPtr = nullptr; 66 84 isNull(weakPtr); 67 85 } 68 86 { 69 87 WeakPtr<DestroyableTest> weakPtr; 70 weakPtr = NULL;71 isNull(weakPtr); 72 } 73 { 74 WeakPtr<DestroyableTest> weakPtr = 0;88 weakPtr = nullptr; 89 isNull(weakPtr); 90 } 91 { 92 WeakPtr<DestroyableTest> weakPtr = nullptr; 75 93 isNull(weakPtr); 76 94 } 77 95 { 78 96 WeakPtr<DestroyableTest> weakPtr; 79 weakPtr = 0;97 weakPtr = nullptr; 80 98 isNull(weakPtr); 81 99 } … … 86 104 DestroyableTest* test = new DestroyableTest(); 87 105 WeakPtr<DestroyableTest> weakPtr = test; 88 EXPECT_FALSE(weakPtr == NULL);89 EXPECT_FALSE(weakPtr == 0);106 EXPECT_FALSE(weakPtr == nullptr); 107 EXPECT_FALSE(weakPtr == nullptr); 90 108 EXPECT_FALSE(!weakPtr); 91 EXPECT_TRUE(weakPtr != NULL);92 EXPECT_TRUE(weakPtr != 0);109 EXPECT_TRUE(weakPtr != nullptr); 110 EXPECT_TRUE(weakPtr != nullptr); 93 111 EXPECT_TRUE(weakPtr); 94 112 test->destroy(); 95 113 } 114 115 TEST(WeakPtrTest, TestConstructors) 116 { 117 DestroyableTest* test = new DestroyableTest(); 118 119 // default 120 WeakPtr<DestroyableTest> weakPtr1; 121 EXPECT_EQ(nullptr, weakPtr1.get()); 122 123 // pointer 124 WeakPtr<DestroyableTest> weakPtr2a = test; 125 WeakPtr<DestroyableTest> weakPtr2b(test); 126 EXPECT_EQ(test, weakPtr2a.get()); 127 EXPECT_EQ(test, weakPtr2b.get()); 128 129 // copy 130 WeakPtr<DestroyableTest> weakPtr3a = weakPtr2a; 131 WeakPtr<DestroyableTest> weakPtr3b(weakPtr2b); 132 EXPECT_EQ(test, weakPtr3a.get()); 133 EXPECT_EQ(test, weakPtr3b.get()); 134 135 // move 136 WeakPtr<DestroyableTest> weakPtr4a = std::move(weakPtr3a); 137 WeakPtr<DestroyableTest> weakPtr4b(std::move(weakPtr3b)); 138 EXPECT_EQ(test, weakPtr4a.get()); 139 EXPECT_EQ(test, weakPtr4b.get()); 140 141 // other 142 WeakPtr<Destroyable> weakPtr5a = weakPtr4a; 143 WeakPtr<Destroyable> weakPtr5b(weakPtr4b); 144 EXPECT_EQ(test, weakPtr5a.get()); 145 EXPECT_EQ(test, weakPtr5b.get()); 146 147 test->destroy(); 148 } 149 150 TEST(WeakPtrTest, TestAssignments) 151 { 152 DestroyableTest* test = new DestroyableTest(); 153 154 // pointer 155 WeakPtr<DestroyableTest> weakPtr1; 156 weakPtr1 = test; 157 EXPECT_EQ(test, weakPtr1.get()); 158 159 // copy 160 WeakPtr<DestroyableTest> weakPtr2; 161 weakPtr2 = weakPtr1; 162 EXPECT_EQ(test, weakPtr2.get()); 163 164 // move 165 WeakPtr<DestroyableTest> weakPtr3; 166 weakPtr3 = std::move(weakPtr2); 167 EXPECT_EQ(test, weakPtr3.get()); 168 169 // other 170 WeakPtr<Destroyable> weakPtr4; 171 weakPtr4 = weakPtr3; 172 EXPECT_EQ(test, weakPtr4.get()); 173 174 test->destroy(); 175 } 176 177 TEST(WeakPtrTest, TestWeakPtrInVector) 178 { 179 DestroyableTest* test = new DestroyableTest(); 180 181 std::vector<WeakPtr<DestroyableTest>> vector; 182 vector.push_back(test); 183 vector.push_back(test); 184 vector.push_back(test); 185 186 ASSERT_EQ(3, vector.size()); 187 EXPECT_EQ(test, vector[0].get()); 188 EXPECT_EQ(test, vector[1].get()); 189 EXPECT_EQ(test, vector[2].get()); 190 191 test->destroy(); 192 193 EXPECT_EQ(nullptr, vector[0].get()); 194 EXPECT_EQ(nullptr, vector[1].get()); 195 EXPECT_EQ(nullptr, vector[2].get()); 196 } 197 198 TEST(WeakPtrTest, TestReset) 199 { 200 DestroyableTest* test = new DestroyableTest(); 201 WeakPtr<DestroyableTest> weakPtr(test); 202 EXPECT_EQ(test, weakPtr.get()); 203 weakPtr.reset(); 204 EXPECT_EQ(nullptr, weakPtr.get()); 205 206 test->destroy(); 207 } 208 209 TEST(WeakPtrTest, TestSwap) 210 { 211 DestroyableTest* test1 = new DestroyableTest(); 212 DestroyableTest* test2 = new DestroyableTest(); 213 214 WeakPtr<DestroyableTest> weakPtr1(test1); 215 WeakPtr<DestroyableTest> weakPtr2(test2); 216 EXPECT_EQ(test1, weakPtr1.get()); 217 EXPECT_EQ(test2, weakPtr2.get()); 218 219 weakPtr1.swap(weakPtr2); 220 221 EXPECT_EQ(test2, weakPtr1.get()); 222 EXPECT_EQ(test1, weakPtr2.get()); 223 224 test1->destroy(); 225 test2->destroy(); 226 } 96 227 } -
code/trunk/test/core/singleton/ScopeTest.cc
r10544 r11071 26 26 { 27 27 public: 28 virtual void SetUp() 28 virtual void SetUp() override 29 29 { 30 30 new IdentifierManager(); … … 32 32 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 33 33 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::SCOPED_SINGLETON_WRAPPER); 34 Context::setRootContext(new Context( NULL));34 Context::setRootContext(new Context(nullptr)); 35 35 } 36 36 37 virtual void TearDown() 37 virtual void TearDown() override 38 38 { 39 39 Context::destroyRootContext();
Note: See TracChangeset
for help on using the changeset viewer.