From 4a00c849b7189f05d09909f71fecad7023b1afdb Mon Sep 17 00:00:00 2001 From: wangweihao <927595184@qq.com> Date: Sun, 10 Nov 2024 18:27:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DFormRenderTest=20TDD=E7=94=A8?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweihao <927595184@qq.com> --- test/unittest/interfaces/form_render_test.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/unittest/interfaces/form_render_test.cpp b/test/unittest/interfaces/form_render_test.cpp index 1246e3c5a4c..7c998c7ad69 100644 --- a/test/unittest/interfaces/form_render_test.cpp +++ b/test/unittest/interfaces/form_render_test.cpp @@ -268,12 +268,10 @@ HWTEST_F(FormRenderTest, FormRenderTest002, TestSize.Level1) */ auto formRendererDispatcher = formRenderer->formRendererDispatcherImpl_; EXPECT_TRUE(formRendererDispatcher); - OHOS::Rosen::WindowSizeChangeReason type = static_cast(0); - const std::shared_ptr& rsTransaction = nullptr; EXPECT_CALL(*((MockUIContent*)(formRenderer->uiContent_.get())), SetFormWidth(FORM_WIDTH_2)).WillOnce(Return()); EXPECT_CALL(*((MockUIContent*)(formRenderer->uiContent_.get())), SetFormHeight(FORM_HEIGHT_2)).WillOnce(Return()); EXPECT_CALL(*((MockUIContent*)(formRenderer->uiContent_.get())), OnFormSurfaceChange(FORM_WIDTH_2, FORM_HEIGHT_2, - type, rsTransaction)).WillOnce(Return()); + _, _)).WillOnce(Return()); formRendererDispatcher->DispatchSurfaceChangeEvent(FORM_WIDTH_2, FORM_HEIGHT_2); std::this_thread::sleep_for(std::chrono::seconds(1)); EXPECT_EQ(onSurfaceChangeEventKey, CHECK_KEY); @@ -282,7 +280,7 @@ HWTEST_F(FormRenderTest, FormRenderTest002, TestSize.Level1) EXPECT_CALL(*((MockUIContent*)(formRenderer->uiContent_.get())), SetFormWidth(FORM_WIDTH_2)).WillOnce(Return()); EXPECT_CALL(*((MockUIContent*)(formRenderer->uiContent_.get())), SetFormHeight(FORM_HEIGHT_2)).WillOnce(Return()); EXPECT_CALL(*((MockUIContent*)(formRenderer->uiContent_.get())), OnFormSurfaceChange(FORM_WIDTH_2, FORM_HEIGHT_2, - type, rsTransaction)).WillOnce(Return()); + _, _)).WillOnce(Return()); onSurfaceChangeEventKey = ""; formRendererDispatcher->DispatchSurfaceChangeEvent(FORM_WIDTH_2, FORM_HEIGHT_2); std::this_thread::sleep_for(std::chrono::seconds(1));