Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2015, 4:16:49 PM (9 years ago)
Author:
landauf
Message:

added function to destroy the class hierarchy (i.e. reset all information about parents and children in Identifiers).
tests now use a fixture to create and destroy class hierarchy. this makes them independent of the order of execution (and also fixes the three *_NoFixture tests)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/test/core/class/SubclassIdentifierTest.cc

    r10400 r10403  
    44#include "core/class/SubclassIdentifier.h"
    55#include "core/class/OrxonoxClass.h"
     6#include "core/module/ModuleInstance.h"
    67
    78namespace orxonox
     
    3031                virtual void SetUp()
    3132                {
     33                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
     34                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
     35                    Identifier::initConfigValues_s = false; // TODO: hack!
     36                    IdentifierManager::getInstance().createClassHierarchy();
     37
    3238                    Context::setRootContext(new Context(NULL));
    3339                }
     
    3642                {
    3743                    Context::setRootContext(NULL);
     44
     45                    IdentifierManager::getInstance().destroyClassHierarchy();
    3846                }
    3947        };
Note: See TracChangeset for help on using the changeset viewer.