Split testcase that exceeds 50 lines

Signed-off-by: luyifan<842825214@qq.com>
This commit is contained in:
luyifan 2024-08-06 14:39:38 +08:00
parent 9ab4a4743d
commit 374265e02a

View File

@ -856,24 +856,6 @@ HWTEST_F(AppSpawnAppMgrTest, App_Spawn_AppSpawningCtx_Msg_001, TestSize.Level0)
bundleName = GetBundleName(nullptr);
EXPECT_EQ(nullptr, bundleName);
// IsDeveloperModeOn
ret = IsDeveloperModeOn(appCtx);
EXPECT_EQ(ret, 0);
appCtx->client.flags |= APP_DEVELOPER_MODE;
ret = IsDeveloperModeOn(appCtx);
EXPECT_EQ(ret, 1);
ret = IsDeveloperModeOn(nullptr);
EXPECT_EQ(ret, 0);
//IsJitFortModeOn
ret = IsJitFortModeOn(appCtx);
EXPECT_EQ(ret, 0);
appCtx->client.flags |= APP_JITFORT_MODE;
ret = IsJitFortModeOn(appCtx);
EXPECT_EQ(ret, 1);
ret = IsJitFortModeOn(nullptr);
EXPECT_EQ(ret, 0);
DeleteAppSpawningCtx(appCtx);
DeleteAppSpawnMgr(mgr);
}
@ -1096,4 +1078,30 @@ HWTEST_F(AppSpawnAppMgrTest, App_Spawn_AppSpawningCtx_Msg_006, TestSize.Level0)
DeleteAppSpawningCtx(appCtx);
DeleteAppSpawnMgr(mgr);
}
HWTEST_F(AppSpawnAppMgrTest, App_Spawn_AppSpawningCtx_Msg_007, TestSize.Level0)
{
AppSpawningCtx *appCtx = CreateAppSpawningCtx();
EXPECT_EQ(appCtx != nullptr, 1);
// IsDeveloperModeOn
int ret = IsDeveloperModeOn(appCtx);
EXPECT_EQ(ret, 0);
appCtx->client.flags |= APP_DEVELOPER_MODE;
ret = IsDeveloperModeOn(appCtx);
EXPECT_EQ(ret, 1);
ret = IsDeveloperModeOn(nullptr);
EXPECT_EQ(ret, 0);
//IsJitFortModeOn
ret = IsJitFortModeOn(appCtx);
EXPECT_EQ(ret, 0);
appCtx->client.flags |= APP_JITFORT_MODE;
ret = IsJitFortModeOn(appCtx);
EXPECT_EQ(ret, 1);
ret = IsJitFortModeOn(nullptr);
EXPECT_EQ(ret, 0);
DeleteAppSpawningCtx(appCtx);
}
} // namespace OHOS