Changeset 10624 for code/trunk/test/core/class/SubclassIdentifierTest.cc
- Timestamp:
- Oct 4, 2015, 9:12:21 PM (10 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
code/trunk/test/core/class/SubclassIdentifierTest.cc
r9659 r10624 4 4 #include "core/class/SubclassIdentifier.h" 5 5 #include "core/class/OrxonoxClass.h" 6 #include "core/module/ModuleInstance.h" 6 7 7 8 namespace orxonox … … 21 22 }; 22 23 24 RegisterClass(TestClass); 25 RegisterClass(TestSubclass); 26 23 27 // Fixture 24 28 class SubclassIdentifierTest : public ::testing::Test … … 27 31 virtual void SetUp() 28 32 { 29 registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());30 registerClass("TestClass", new ClassFactoryWithContext<TestClass>());31 registerClass("TestSubclass", new ClassFactoryWithContext<TestSubclass>());32 33 new IdentifierManager(); 34 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 35 Context::setRootContext(new Context(NULL)); 36 Identifier::initConfigValues_s = false; // TODO: hack! 33 37 IdentifierManager::getInstance().createClassHierarchy(); 34 35 Context::setRootContext(new Context(NULL));36 38 } 37 39 38 40 virtual void TearDown() 39 41 { 40 Context::setRootContext(NULL); 41 42 IdentifierManager::getInstance().destroyAllIdentifiers(); 42 IdentifierManager::getInstance().destroyClassHierarchy(); 43 Context::destroyRootContext(); 44 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER); 45 delete &IdentifierManager::getInstance(); 43 46 } 44 47 };
Note: See TracChangeset
for help on using the changeset viewer.