Changeset 9647 for code/branches/core6/test/core/class
- Timestamp:
- Aug 14, 2013, 10:39:32 AM (11 years ago)
- Location:
- code/branches/core6/test/core/class
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/test/core/class/SubclassIdentifierTest.cc
r9640 r9647 21 21 }; 22 22 23 RegisterClass(TestClass); 24 RegisterClass(TestSubclass); 23 // Fixture 24 class SubclassIdentifierTest : public ::testing::Test 25 { 26 public: 27 virtual void SetUp() 28 { 29 registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>()); 30 registerClass("TestClass", new ClassFactoryWithContext<TestClass>()); 31 registerClass("TestSubclass", new ClassFactoryWithContext<TestSubclass>()); 32 33 IdentifierManager::getInstance().createClassHierarchy(); 34 } 35 36 virtual void TearDown() 37 { 38 IdentifierManager::getInstance().destroyAllIdentifiers(); 39 } 40 }; 25 41 } 26 42 27 TEST (SubclassIdentifierTest, CanCreateIdentifier)43 TEST_F(SubclassIdentifierTest, CanCreateIdentifier) 28 44 { 29 45 TestSubclass test; … … 32 48 } 33 49 34 TEST (SubclassIdentifierTest, DefaultsToNormalIdentifier)50 TEST_F(SubclassIdentifierTest, DefaultsToNormalIdentifier) 35 51 { 36 52 TestSubclass test; … … 40 56 } 41 57 42 TEST (SubclassIdentifierTest, CanAssignIdentifierOfSubclass)58 TEST_F(SubclassIdentifierTest, CanAssignIdentifierOfSubclass) 43 59 { 44 60 TestSubclass test; 45 IdentifierManager::getInstance().createClassHierarchy();46 47 61 SubclassIdentifier<TestClass> subclassIdentifier; 48 62 subclassIdentifier = Class(TestSubclass); … … 50 64 } 51 65 52 TEST (SubclassIdentifierTest, CanCreateSubclass)66 TEST_F(SubclassIdentifierTest, CanCreateSubclass) 53 67 { 54 68 TestSubclass test; 55 IdentifierManager::getInstance().createClassHierarchy();56 57 69 SubclassIdentifier<TestClass> subclassIdentifier; 58 70 subclassIdentifier = Class(TestSubclass); -
code/branches/core6/test/core/class/SuperTest.cc
r9640 r9647 62 62 }; 63 63 64 RegisterClass(TestClass); 65 RegisterClass(TestSubclass); 64 // Fixture 65 class SuperTest : public ::testing::Test 66 { 67 public: 68 virtual void SetUp() 69 { 70 registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>()); 71 registerClass("BaseObject", new ClassFactoryWithContext<BaseObject>()); 72 registerClass("TestClass", new ClassFactoryWithContext<TestClass>()); 73 registerClass("TestSubclass", new ClassFactoryWithContext<TestSubclass>()); 74 75 IdentifierManager::getInstance().createClassHierarchy(); 76 } 77 78 virtual void TearDown() 79 { 80 IdentifierManager::getInstance().destroyAllIdentifiers(); 81 } 82 }; 66 83 } 67 84 68 TEST (SuberTest, SuperCallWithoutArguments)85 TEST_F(SuperTest, SuperCallWithoutArguments) 69 86 { 70 87 TestSubclass test; 71 IdentifierManager::getInstance().createClassHierarchy();72 88 73 89 EXPECT_FALSE(test.changedNameBase_); … … 80 96 } 81 97 82 TEST (SuberTest, SuperCallWithArguments)98 TEST_F(SuperTest, SuperCallWithArguments) 83 99 { 84 100 TestSubclass test; 85 IdentifierManager::getInstance().createClassHierarchy();86 101 87 102 EXPECT_FALSE(test.xmlPortBase_);
Note: See TracChangeset
for help on using the changeset viewer.