diff options
Diffstat (limited to 'base/scoped_comptr_win_unittest.cc')
-rw-r--r-- | base/scoped_comptr_win_unittest.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/scoped_comptr_win_unittest.cc b/base/scoped_comptr_win_unittest.cc index 96ebcc6..5e4ad3d 100644 --- a/base/scoped_comptr_win_unittest.cc +++ b/base/scoped_comptr_win_unittest.cc @@ -29,6 +29,11 @@ TEST(ScopedComPtrTest, ScopedComPtr) { EXPECT_TRUE(copy1.IsSameObject(mem_alloc)); EXPECT_FALSE(copy1.IsSameObject(unk2)); // unk2 is valid but different EXPECT_FALSE(copy1.IsSameObject(unk)); // unk is NULL + + IMalloc* naked_copy = copy1.Detach(); + copy1 = naked_copy; // Test the =(T*) operator. + naked_copy->Release(); + copy1.Release(); EXPECT_FALSE(copy1.IsSameObject(unk2)); // unk2 is valid, copy1 is not |