Merge pull request !16521 from 王瑞鲜/addAssert
This commit is contained in:
openharmony_ci 2024-10-30 08:27:03 +00:00 committed by Gitee
commit 95ac6bb9f6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -267,6 +267,7 @@ HWTEST_F(VSyncDistributorTest, SetHighPriorityVSyncRate002, Function | MediumTes
*/
HWTEST_F(VSyncDistributorTest, SetFrameIsRender001, Function | MediumTest| Level3)
{
ASSERT_EQ(VSyncDistributorTest::vsyncDistributor->IsDVsyncOn(), false);
VSyncDistributorTest::vsyncDistributor->SetFrameIsRender(true);
}
@ -279,6 +280,7 @@ HWTEST_F(VSyncDistributorTest, SetFrameIsRender001, Function | MediumTest| Level
*/
HWTEST_F(VSyncDistributorTest, SetFrameIsRender002, Function | MediumTest| Level3)
{
ASSERT_EQ(VSyncDistributorTest::vsyncDistributor->IsDVsyncOn(), false);
VSyncDistributorTest::vsyncDistributor->SetFrameIsRender(false);
}
@ -305,6 +307,9 @@ HWTEST_F(VSyncDistributorTest, GetRealTimeOffsetOfDvsync001, Function | MediumTe
*/
HWTEST_F(VSyncDistributorTest, MarkRSAnimate001, Function | MediumTest| Level3)
{
sptr<VSyncConnection> conn = new VSyncConnection(vsyncDistributor, "VSyncDistributorTest");
auto res = VSyncDistributorTest::vsyncDistributor->SetUiDvsyncSwitch(true, conn);
ASSERT_EQ(res, VSYNC_ERROR_OK);
VSyncDistributorTest::vsyncDistributor->MarkRSAnimate();
}
@ -317,6 +322,9 @@ HWTEST_F(VSyncDistributorTest, MarkRSAnimate001, Function | MediumTest| Level3)
*/
HWTEST_F(VSyncDistributorTest, UnmarkRSAnimate001, Function | MediumTest| Level3)
{
sptr<VSyncConnection> conn = new VSyncConnection(vsyncDistributor, "VSyncDistributorTest");
auto res = VSyncDistributorTest::vsyncDistributor->SetUiDvsyncSwitch(false, conn);
ASSERT_EQ(res, VSYNC_ERROR_OK);
VSyncDistributorTest::vsyncDistributor->UnmarkRSAnimate();
}
@ -344,7 +352,8 @@ HWTEST_F(VSyncDistributorTest, UpdatePendingReferenceTime001, Function | MediumT
{
int64_t timeStamp = 0;
sptr<VSyncConnection> conn = new VSyncConnection(vsyncDistributor, "VSyncDistributorTest");
VSyncDistributorTest::vsyncDistributor->SetUiDvsyncSwitch(true, conn);
auto res = VSyncDistributorTest::vsyncDistributor->SetUiDvsyncSwitch(true, conn);
ASSERT_EQ(res, VSYNC_ERROR_OK);
VSyncDistributorTest::vsyncDistributor->UpdatePendingReferenceTime(timeStamp);
}
@ -359,7 +368,8 @@ HWTEST_F(VSyncDistributorTest, SetHardwareTaskNum001, Function | MediumTest| Lev
{
uint32_t num = 0;
sptr<VSyncConnection> conn = new VSyncConnection(vsyncDistributor, "VSyncDistributorTest");
VSyncDistributorTest::vsyncDistributor->SetUiDvsyncSwitch(true, conn);
auto res = VSyncDistributorTest::vsyncDistributor->SetUiDvsyncSwitch(true, conn);
ASSERT_EQ(res, VSYNC_ERROR_OK);
VSyncDistributorTest::vsyncDistributor->SetHardwareTaskNum(num);
}