2024/11/8:新增TDD用例001

Signed-off-by: c00680103 <chenzhihua24@hisilicon.com>
This commit is contained in:
c00680103 2024-11-08 10:52:33 +08:00
parent 2e3065428c
commit a464f03564
2 changed files with 132 additions and 0 deletions

View File

@ -220,6 +220,69 @@ HWTEST_F(RootSceneTest, SetUiDvsyncSwitchErr, Function | SmallTest | Level3)
ASSERT_EQ(1, rootScene.GetWindowId());
}
/**
* @tc.name: IsLastFrameLayoutFinished
* @tc.desc: IsLastFrameLayoutFinished Test
* @tc.type: FUNC
*/
HWTEST_F(RootSceneTest, IsLastFrameLayoutFinished, Function | SmallTest | Level3)
{
RootScene rootScene;
auto ret = rootScene.IsLastFrameLayoutFinished();
ASSERT_EQ(ret,false);
ASSERT_EQ(1, rootScene.GetWindowId());
}
/**
* @tc.name: OnFlushUIParams
* @tc.desc: OnFlushUIParams Test
* @tc.type: FUNC
*/
HWTEST_F(RootSceneTest, OnFlushUIParams, Function | SmallTest | Level3)
{
RootScene rootScene;
rootScene.OnFlushUIParams();
ASSERT_EQ(1, rootScene.GetWindowId());
}
/**
* @tc.name: OnBundleUpdated
* @tc.desc: OnBundleUpdated Test
* @tc.type: FUNC
*/
HWTEST_F(RootSceneTest, OnBundleUpdated, Function | SmallTest | Level3)
{
RootScene rootScene;
rootScene.OnBundleUpdated();
ASSERT_EQ(1, rootScene.GetWindowId());
}
/**
* @tc.name: SetDisplayOrientation
* @tc.desc: SetDisplayOrientation Test01
* @tc.type: FUNC
*/
HWTEST_F(RootSceneTest, SetDisplayOrientationTest01, Function | SmallTest | Level3)
{
RootScene rootScene;
int32_t orientation = 0;
rootScene.SetDisplayOrientation(orientation);
ASSERT_EQ(1, rootScene.GetWindowId());
}
/**
* @tc.name: SetDisplayOrientation
* @tc.desc: SetDisplayOrientation Test02
* @tc.type: FUNC
*/
HWTEST_F(RootSceneTest, SetDisplayOrientationTest02, Function | SmallTest | Level3)
{
RootScene rootScene;
int32_t orientation = 100;
rootScene.SetDisplayOrientation(orientation);
ASSERT_EQ(1, rootScene.GetWindowId());
}
/**
* @tc.name: GetSessionRectByType
* @tc.desc: GetSessionRectByType Test err

View File

@ -146,6 +146,75 @@ HWTEST_F(ScreenSceneTest, FlushFrameRate, Function | SmallTest | Level3)
ASSERT_EQ(1, screenScene.GetWindowId());
}
/**
* @tc.name: OnBundleUpdated
* @tc.desc: OnBundleUpdated Test
* @tc.type: FUNC
*/
HWTEST_F(ScreenSceneTest, OnBundleUpdated, Function | SmallTest | Level3)
{
ScreenScene screenScene("UNKNOWN");
std::string bundleName = "test";
screenScene.OnBundleUpdated(bundleName);
ASSERT_EQ(1, screenScene.GetWindowId());
}
/**
* @tc.name: GetDisplayId & SetDisplayId
* @tc.desc: GetDisplayId & SetDisplayId Test01
* @tc.type: FUNC
*/
HWTEST_F(ScreenSceneTest, DisplayIdTest01, Function | SmallTest | Level3)
{
ScreenScene screenScene("UNKNOWN");
DisplayId setDisplayId = 0;
screenScene.SetDisplayId(setDisplayId);
auto getDisplayId = screenScene.GetDisplayId();
ASSERT_EQ(getDisplayId, setDisplayId);
ASSERT_EQ(1, screenScene.GetWindowId());
}
/**
* @tc.name: GetDisplayId & SetDisplayId
* @tc.desc: GetDisplayId & SetDisplayId Test02
* @tc.type: FUNC
*/
HWTEST_F(ScreenSceneTest, DisplayIdTest02, Function | SmallTest | Level3)
{
ScreenScene screenScene("UNKNOWN");
DisplayId setDisplayId = 100;
screenScene.SetDisplayId(setDisplayId);
auto getDisplayId = screenScene.GetDisplayId();
ASSERT_EQ(getDisplayId, setDisplayId);
ASSERT_EQ(1, screenScene.GetWindowId());
}
/**
* @tc.name: SetDisplayOrientation
* @tc.desc: SetDisplayOrientation Test01
* @tc.type: FUNC
*/
HWTEST_F(ScreenSceneTest, SetDisplayOrientation01, Function | SmallTest | Level3)
{
ScreenScene screenScene("UNKNOWN");
int32_t orientation = 0;
screenScene.SetDisplayOrientation(orientation);
ASSERT_EQ(1, screenScene.GetWindowId());
}
/**
* @tc.name: SetDisplayOrientation
* @tc.desc: SetDisplayOrientation Test02
* @tc.type: FUNC
*/
HWTEST_F(ScreenSceneTest, SetDisplayOrientation02, Function | SmallTest | Level3)
{
ScreenScene screenScene("UNKNOWN");
int32_t orientation = 100;
screenScene.SetDisplayOrientation(orientation);
ASSERT_EQ(1, screenScene.GetWindowId());
}
/**
* @tc.name: SetFrameLayoutFinishCallback
* @tc.desc: SetFrameLayoutFinishCallback Test