!10838 modified tdd_smells_bad

Merge pull request !10838 from tanyuhang/master
This commit is contained in:
openharmony_ci 2024-11-18 03:44:11 +00:00 committed by Gitee
commit a9e9dad28f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -117,14 +117,14 @@ HWTEST_F(WindowSnapshotTest, GetSnapshot04, Function | SmallTest | Level3)
sptr<IRemoteObject> iRemoteObjectMocker = new IRemoteObjectMocker();
node->abilityToken_ = iRemoteObjectMocker;
sptr<SnapshotController> snapshotController_ = new SnapshotController(root, handler);
AAFwk::Snapshot snapshot_;
sptr<SnapshotController> snapshotController = new SnapshotController(root, handler);
AAFwk::Snapshot snapshot;
ASSERT_EQ(static_cast<int32_t>(WMError::WM_ERROR_NULLPTR),
snapshotController_->GetSnapshot(iRemoteObjectMocker, snapshot_));
snapshotController->GetSnapshot(iRemoteObjectMocker, snapshot));
sptr<IRemoteObject> iRemoteObjectMockerInvalid = new IRemoteObjectMocker();
ASSERT_EQ(static_cast<int32_t>(WMError::WM_ERROR_NULLPTR),
snapshotController_->GetSnapshot(iRemoteObjectMockerInvalid, snapshot_));
snapshotController->GetSnapshot(iRemoteObjectMockerInvalid, snapshot));
}
}
} // namespace Rosen