Changeset 9650 for code/branches/core6/test
- Timestamp:
- Aug 14, 2013, 7:04:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/test/core/object/ContextTest.cc
r9649 r9650 58 58 EXPECT_EQ(1u, context.getObjectList<SubclassContext>()->size()); 59 59 } 60 61 TEST_F(ContextTest, ContextIsAddedToItsOwnObjectList) 62 { 63 Context context(NULL); 64 ASSERT_EQ(1u, context.getObjectList<Context>()->size()); 65 EXPECT_TRUE(context.getObjectList<Context>()->begin()->objectBase_ == static_cast<Listable*>(&context)); 66 } 67 68 TEST_F(ContextTest, ContextIsAddedToObjectListOfBaseContext) 69 { 70 Context baseContext(NULL); 71 Context subContext(&baseContext); 72 73 ASSERT_EQ(1u, subContext.getObjectList<Context>()->size()); 74 EXPECT_TRUE(subContext.getObjectList<Context>()->begin()->objectBase_ == static_cast<Listable*>(&subContext)); 75 76 ASSERT_EQ(2u, baseContext.getObjectList<Context>()->size()); 77 EXPECT_TRUE(baseContext.getObjectList<Context>()->begin()->objectBase_ == static_cast<Listable*>(&baseContext)); 78 EXPECT_TRUE(baseContext.getObjectList<Context>()->begin()->next_->objectBase_ == static_cast<Listable*>(&subContext)); 79 } 60 80 }
Note: See TracChangeset
for help on using the changeset viewer.