未验证 提交 d1eccdba 编写于 作者: O openharmony_ci 提交者: Gitee

!1510 修复init ut空指针判断问题

Merge pull request !1510 from Mupceet/master_cc_fix_init_ut
......@@ -172,7 +172,9 @@ HWTEST_F(DeviceInfoUnittest, TestInterface, TestSize.Level1)
HWTEST_F(DeviceInfoUnittest, TestDeviceInfoProxy1, TestSize.Level1)
{
auto remote = device_info::DeviceInfoKits::GetInstance().GetService()->AsObject();
auto remotePtr = device_info::DeviceInfoKits::GetInstance().GetService();
ASSERT_NE(remotePtr, nullptr);
auto remote = remotePtr->AsObject();
sptr<device_info::DeviceInfoProxy> proxy = new(std::nothrow) device_info::DeviceInfoProxy(remote);
ASSERT_NE(proxy, nullptr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册