summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_weak_ptr_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_weak_ptr_unittest.cpp')
-rw-r--r--core/fxcrt/cfx_weak_ptr_unittest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fxcrt/cfx_weak_ptr_unittest.cpp b/core/fxcrt/cfx_weak_ptr_unittest.cpp
index 11dd8bb3c0..47f63c35b2 100644
--- a/core/fxcrt/cfx_weak_ptr_unittest.cpp
+++ b/core/fxcrt/cfx_weak_ptr_unittest.cpp
@@ -121,13 +121,13 @@ TEST(fxcrt, WeakPtrResetNonNull) {
EXPECT_EQ(1, thing2.delete_count());
}
-TEST(fxcrt, WeakPtrClear) {
+TEST(fxcrt, WeakPtrDeleteObject) {
PseudoDeletable thing;
{
UniquePtr unique(&thing);
WeakPtr ptr1(std::move(unique));
WeakPtr ptr2 = ptr1;
- ptr1.Clear();
+ ptr1.DeleteObject();
EXPECT_FALSE(ptr1);
EXPECT_EQ(nullptr, ptr1.Get());
EXPECT_FALSE(ptr2);
@@ -155,7 +155,7 @@ TEST(fxcrt, WeakPtrCyclic) {
EXPECT_EQ(0, thing2.delete_count());
}
-TEST(fxcrt, WeakPtrCyclicClear) {
+TEST(fxcrt, WeakPtrCyclicDeleteObject) {
PseudoDeletable thing1;
PseudoDeletable thing2;
{
@@ -165,7 +165,7 @@ TEST(fxcrt, WeakPtrCyclicClear) {
WeakPtr ptr2(std::move(unique2));
ptr1->SetNext(ptr2);
ptr2->SetNext(ptr1);
- ptr1.Clear();
+ ptr1.DeleteObject();
EXPECT_EQ(1, thing1.delete_count());
EXPECT_EQ(0, thing2.delete_count());
}