!6894 TDD用例修复

Merge pull request !6894 from 黄师伟/master
This commit is contained in:
openharmony_ci 2023-11-16 02:48:32 +00:00 committed by Gitee
commit bd91691600
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 8 additions and 9 deletions

View File

@ -27,7 +27,7 @@ using namespace testing::ext;
namespace OHOS {
namespace AbilityRuntime {
namespace {
constexpr int32_t DEFAULT_BLOCKLIST_EXTENSION_NUM = 17;
constexpr int32_t DEFAULT_BLOCKLIST_EXTENSION_NUM = 18;
constexpr int32_t EXTENSION_TYPE_FORM = 0;
constexpr int32_t EXTENSION_TYPE_WORK_SCHEDULER = 1;
constexpr int32_t EXTENSION_TYPE_INPUTMETHOD = 2;

View File

@ -186,7 +186,7 @@ HWTEST_F(MissionListManagerTest, StartAbility_002, TestSize.Level1)
EXPECT_EQ(0, result2);
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::SINGLETON;
auto result3 = missionListManager->StartAbility(abilityRequest);
EXPECT_NE(0, result3);
EXPECT_EQ(0, result3);
missionListManager.reset();
}
@ -785,7 +785,7 @@ HWTEST_F(MissionListManagerTest, CreateOrReusedMissionInfo_002, TestSize.Level1)
auto missionListManager = std::make_shared<MissionListManager>(userId);
AbilityRequest abilityRequest;
InnerMissionInfo info;
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::SPECIFIED;
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::STANDARD;
abilityRequest.abilityInfo.applicationInfo.isLauncherApp = true;
bool res = missionListManager->CreateOrReusedMissionInfo(abilityRequest, info);
EXPECT_FALSE(res);
@ -806,7 +806,7 @@ HWTEST_F(MissionListManagerTest, CreateOrReusedMissionInfo_003, TestSize.Level1)
auto missionListManager = std::make_shared<MissionListManager>(userId);
AbilityRequest abilityRequest;
InnerMissionInfo info;
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::SPECIFIED;
abilityRequest.abilityInfo.launchMode = AppExecFwk::LaunchMode::STANDARD;
abilityRequest.abilityInfo.applicationInfo.isLauncherApp = false;
info.missionInfo.id = 0;
bool res = missionListManager->CreateOrReusedMissionInfo(abilityRequest, info);
@ -832,7 +832,7 @@ HWTEST_F(MissionListManagerTest, CreateOrReusedMissionInfo_004, TestSize.Level1)
abilityRequest.abilityInfo.applicationInfo.isLauncherApp = false;
info.missionInfo.id = 1;
bool res = missionListManager->CreateOrReusedMissionInfo(abilityRequest, info);
EXPECT_FALSE(res);
EXPECT_TRUE(res);
missionListManager.reset();
}

View File

@ -138,9 +138,8 @@ HWTEST_F(UserControllerTest, StopUserTest_0300, TestSize.Level0)
HWTEST_F(UserControllerTest, LogoutUserTest_0100, TestSize.Level0)
{
UserController userController;
userController.LogoutUser(-1);
userController.LogoutUser(0);
EXPECT_TRUE(userController.LogoutUser(100) == -1);
auto result = userController.LogoutUser(-1);
EXPECT_EQ(result, INVALID_USERID_VALUE);
}
/**
@ -152,7 +151,7 @@ HWTEST_F(UserControllerTest, LogoutUserTest_0100, TestSize.Level0)
HWTEST_F(UserControllerTest, LogoutUserTest_0200, TestSize.Level0)
{
UserController userController;
EXPECT_TRUE(userController.LogoutUser(666) == -1);
EXPECT_TRUE(userController.LogoutUser(666) == INVALID_USERID_VALUE);
}
/**