diff options
Diffstat (limited to 'AK/Tests/TestNonnullRefPtr.cpp')
-rw-r--r-- | AK/Tests/TestNonnullRefPtr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/AK/Tests/TestNonnullRefPtr.cpp b/AK/Tests/TestNonnullRefPtr.cpp index 99421223ef..19d43fc2e2 100644 --- a/AK/Tests/TestNonnullRefPtr.cpp +++ b/AK/Tests/TestNonnullRefPtr.cpp @@ -15,7 +15,7 @@ struct Object : public RefCounted<Object> { TEST_CASE(basics) { - auto object = adopt(*new Object); + auto object = adopt_ref(*new Object); EXPECT(object.ptr() != nullptr); EXPECT_EQ(object->ref_count(), 1u); object->ref(); @@ -33,7 +33,7 @@ TEST_CASE(basics) TEST_CASE(assign_reference) { - auto object = adopt(*new Object); + auto object = adopt_ref(*new Object); EXPECT_EQ(object->ref_count(), 1u); object = *object; EXPECT_EQ(object->ref_count(), 1u); @@ -45,8 +45,8 @@ TEST_CASE(assign_owner_of_self) RefPtr<Object> parent; }; - auto parent = adopt(*new Object); - auto child = adopt(*new Object); + auto parent = adopt_ref(*new Object); + auto child = adopt_ref(*new Object); child->parent = move(parent); child = *child->parent; @@ -55,7 +55,7 @@ TEST_CASE(assign_owner_of_self) TEST_CASE(swap_with_self) { - auto object = adopt(*new Object); + auto object = adopt_ref(*new Object); swap(object, object); EXPECT_EQ(object->ref_count(), 1u); } |