mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-27 09:11:04 +00:00
Split testcase that exceeds 50 lines
Signed-off-by: luyifan<842825214@qq.com>
This commit is contained in:
parent
9ab4a4743d
commit
374265e02a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user