Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2015, 3:22:27 PM (9 years ago)
Author:
landauf
Message:

fixed tests. however there are some open issues:

  • the class-hierarchy must be built exactly 1 times in core_test. this is currently done in CommandTest.cc because that's the first test to run in core_test which actually needs the class hierarchy. the order of tests is not guaranteed though, so this should be solved more generic
  • during creation of class hierarchy, config values are used. this fails in the tests, so it had to be disabled with a static flag in Identifier. this should be solved in a cleaner way.
  • because the class hierarchy is now statically generated for all tests in core_test in CommandTest.cc, there is no way to test identifiers in an uninitialized state. because of this, three tests had to be disabled (*_NoFixture tests)

⇒ make the creation of the class hierarchy more modular and fix these issues

Location:
code/branches/core7/src/libraries/core/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/class/Identifier.cc

    r10399 r10400  
    4444namespace orxonox
    4545{
     46    bool Identifier::initConfigValues_s = true;
     47
    4648    // ###############################
    4749    // ###       Identifier        ###
  • code/branches/core7/src/libraries/core/class/Identifier.h

    r10399 r10400  
    207207            virtual bool canDynamicCastObjectToIdentifierClass(Identifiable* object) const = 0;
    208208
     209            static bool initConfigValues_s; // TODO: this is a hack - remove it as soon as possible
     210
    209211        protected:
    210212            virtual void createSuperFunctionCaller() const = 0;
     
    330332            IdentifierManager::getInstance().createdObject(object);
    331333
    332             this->setConfigValues(object, object);
     334            if (Identifier::initConfigValues_s)
     335                this->setConfigValues(object, object);
     336
    333337            return true;
    334338        }
Note: See TracChangeset for help on using the changeset viewer.