- Timestamp:
- Aug 14, 2013, 5:44:53 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/test/core/class/SuperTest.cc
r9647 r9648 68 68 virtual void SetUp() 69 69 { 70 IdentifierManager::getInstance().destroyAllIdentifiers(); 71 70 72 registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>()); 71 73 registerClass("BaseObject", new ClassFactoryWithContext<BaseObject>()); … … 81 83 } 82 84 }; 85 } 86 87 TEST_F(SuperTest, ClassHierarchyIsCorrect) 88 { 89 { 90 Identifier* identifier = Class(TestSubclass); 91 92 EXPECT_EQ(0u, identifier->getDirectChildren().size()); 93 94 EXPECT_EQ(1u, identifier->getDirectParents().size()); 95 EXPECT_TRUE(identifier->getDirectParents().find(Class(TestClass)) != identifier->getDirectParents().end()); 96 } 97 { 98 Identifier* identifier = Class(TestClass); 99 100 EXPECT_EQ(1u, identifier->getDirectChildren().size()); 101 EXPECT_TRUE(identifier->getDirectChildren().find(Class(TestSubclass)) != identifier->getDirectChildren().end()); 102 103 EXPECT_EQ(1u, identifier->getDirectParents().size()); 104 EXPECT_TRUE(identifier->getDirectParents().find(Class(BaseObject)) != identifier->getDirectParents().end()); 105 } 83 106 } 84 107
Note: See TracChangeset
for help on using the changeset viewer.