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

File:
1 edited

Legend:

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

    r10372 r10400  
    6262        };
    6363
     64        RegisterClass(TestClass);
     65        RegisterClass(TestSubclass);
     66
    6467       // Fixture
    6568        class SuperTest : public ::testing::Test
     
    6871                virtual void SetUp()
    6972                {
    70                     IdentifierManager::getInstance().destroyAllIdentifiers();
    71 
    72                     registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
    73                     registerClass("BaseObject", new ClassFactoryWithContext<BaseObject>());
    74                     registerClass("TestClass", new ClassFactoryWithContext<TestClass>());
    75                     registerClass("TestSubclass", new ClassFactoryWithContext<TestSubclass>());
    76 
    77                     IdentifierManager::getInstance().createClassHierarchy();
    78 
    7973                    Context::setRootContext(new Context(NULL));
    8074                }
     
    8377                {
    8478                    Context::setRootContext(NULL);
    85 
    86                     IdentifierManager::getInstance().destroyAllIdentifiers();
    8779                }
    8880        };
Note: See TracChangeset for help on using the changeset viewer.