From 7e57ab5b75b93766c98036c191448e743266d5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B3=8A=E8=BF=9Cyg?= Date: Tue, 21 Mar 2023 10:58:12 +0000 Subject: [PATCH] =?UTF-8?q?update=20ipc/native/test/unittest/common/iremot?= =?UTF-8?q?e=5Fobject=5Funitest.cpp.=20Signed-off-by:=20=E5=BC=A0=E6=B3=8A?= =?UTF-8?q?=E8=BF=9Cyg=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张泊远yg --- .../test/unittest/common/iremote_object_unitest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ipc/native/test/unittest/common/iremote_object_unitest.cpp b/ipc/native/test/unittest/common/iremote_object_unitest.cpp index 671d582..b85dd19 100644 --- a/ipc/native/test/unittest/common/iremote_object_unitest.cpp +++ b/ipc/native/test/unittest/common/iremote_object_unitest.cpp @@ -67,9 +67,9 @@ HWTEST_F(IRemoteObjectTest, CheckObjectLegalityTest001, TestSize.Level1) */ HWTEST_F(IRemoteObjectTest, IsObjectDeadTest001, TestSize.Level1) { - IPCObjectProxy object(1); + sptr object = new IPCObjectProxy(16); - auto ret = object.IsObjectDead(); + auto ret = object->IsObjectDead(); ASSERT_FALSE(ret); } @@ -80,7 +80,7 @@ HWTEST_F(IRemoteObjectTest, IsObjectDeadTest001, TestSize.Level1) */ HWTEST_F(IRemoteObjectTest, GetInterfaceDescriptorTest001, TestSize.Level1) { - IPCObjectProxy object(1); + sptr object = new IPCObjectProxy(0); - EXPECT_NE(object.descriptor_, object.GetInterfaceDescriptor()); + EXPECT_EQ(object->descriptor_, object->GetInterfaceDescriptor()); } -- GitLab