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/SubclassIdentifierTest.cc

    r9659 r10400  
    2121        };
    2222
     23        RegisterClass(TestClass);
     24        RegisterClass(TestSubclass);
     25
    2326        // Fixture
    2427        class SubclassIdentifierTest : public ::testing::Test
     
    2730                virtual void SetUp()
    2831                {
    29                     registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
    30                     registerClass("TestClass", new ClassFactoryWithContext<TestClass>());
    31                     registerClass("TestSubclass", new ClassFactoryWithContext<TestSubclass>());
    32 
    33                     IdentifierManager::getInstance().createClassHierarchy();
    34 
    3532                    Context::setRootContext(new Context(NULL));
    3633                }
     
    3936                {
    4037                    Context::setRootContext(NULL);
    41 
    42                     IdentifierManager::getInstance().destroyAllIdentifiers();
    4338                }
    4439        };
Note: See TracChangeset for help on using the changeset viewer.