Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2015, 9:12:21 PM (9 years ago)
Author:
landauf
Message:

merged branch core7 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/test/core/class/SubclassIdentifierTest.cc

    r9659 r10624  
    44#include "core/class/SubclassIdentifier.h"
    55#include "core/class/OrxonoxClass.h"
     6#include "core/module/ModuleInstance.h"
    67
    78namespace orxonox
     
    2122        };
    2223
     24        RegisterClass(TestClass);
     25        RegisterClass(TestSubclass);
     26
    2327        // Fixture
    2428        class SubclassIdentifierTest : public ::testing::Test
     
    2731                virtual void SetUp()
    2832                {
    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!
    3337                    IdentifierManager::getInstance().createClassHierarchy();
    34 
    35                     Context::setRootContext(new Context(NULL));
    3638                }
    3739
    3840                virtual void TearDown()
    3941                {
    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();
    4346                }
    4447        };
Note: See TracChangeset for help on using the changeset viewer.