diff --git a/test/pointer/cast_test.cpp b/test/pointer/cast_test.cpp index 78e38d2e..f45e9738 100644 --- a/test/pointer/cast_test.cpp +++ b/test/pointer/cast_test.cpp @@ -65,7 +65,7 @@ TEST(UniquePtr_DynamicPointerMoveTest, NullPtrSelfCast) { TEST(UniqueRef_DynamicPointerMoveTest, ValidParentToChildCast) { Child *obj = new Child(); unique_ref source(std::move(nullcheck(unique_ptr(obj)).get())); - unique_ref casted = std::move(dynamic_pointer_move(source).get()); + unique_ref casted = dynamic_pointer_move(source).value(); EXPECT_EQ(nullptr, source.get()); // source lost ownership EXPECT_EQ(obj, casted.get()); } @@ -113,7 +113,7 @@ TEST(UniquePtr_DynamicPointerMoveTest, InvalidParentToChildCast2) { TEST(UniqueRef_DynamicPointerMoveTest, ChildToParentCast) { Child *obj = new Child(); unique_ref source(std::move(nullcheck(unique_ptr(obj)).get())); - unique_ref casted = std::move(dynamic_pointer_move(source).get()); + unique_ref casted = dynamic_pointer_move(source).value(); EXPECT_EQ(nullptr, source.get()); // source lost ownership EXPECT_EQ(obj, casted.get()); } @@ -161,7 +161,7 @@ TEST_F(UniquePtr_DynamicPointerMoveDestructorTest, ChildInParentPtr) { TEST_F(UniqueRef_DynamicPointerMoveDestructorTest, ChildToParentCast) { unique_ref child = createChild(); - unique_ref parent = std::move(dynamic_pointer_move(child).get()); + unique_ref parent = dynamic_pointer_move(child).value(); EXPECT_CHILD_DESTRUCTOR_CALLED(); } @@ -173,7 +173,7 @@ TEST_F(UniquePtr_DynamicPointerMoveDestructorTest, ChildToParentCast) { TEST_F(UniqueRef_DynamicPointerMoveDestructorTest, ParentToChildCast) { unique_ref parent = createChild(); - unique_ref child = std::move(dynamic_pointer_move(parent).get()); + unique_ref child = dynamic_pointer_move(parent).value(); EXPECT_CHILD_DESTRUCTOR_CALLED(); }