From 76ce54a4648e4fd8ec048f516baded7b4152b3bb Mon Sep 17 00:00:00 2001 From: xinking129 Date: Mon, 10 Jul 2023 20:39:15 +0800 Subject: [PATCH] fix ut bug Signed-off-by: xinking129 --- services/ans/test/unittest/push_callback_stub_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/ans/test/unittest/push_callback_stub_test.cpp b/services/ans/test/unittest/push_callback_stub_test.cpp index 2cd61e113..9d00e8c5c 100644 --- a/services/ans/test/unittest/push_callback_stub_test.cpp +++ b/services/ans/test/unittest/push_callback_stub_test.cpp @@ -74,10 +74,10 @@ HWTEST_F(PushCallBackStubTest, PushCallBackStubTest_00200, Function | SmallTest MessageParcel reply; MessageOption option = {MessageOption::TF_SYNC}; - TestPushCallBackStub testPushCallBackStub; - data.WriteInterfaceToken(testPushCallBackStub.GetDescriptor()); + sptr testPushCallBackStub = new TestPushCallBackStub(); + data.WriteInterfaceToken(testPushCallBackStub->GetDescriptor()); - int ret = testPushCallBackStub.OnRemoteRequest(code, data, reply, option); + int ret = testPushCallBackStub->OnRemoteRequest(code, data, reply, option); EXPECT_EQ(ret, (int)NO_ERROR); } -- Gitee