ut断言整改

Signed-off-by: 师皓杰 <shihaojie10@huawei.com>
This commit is contained in:
师皓杰 2024-09-06 14:14:28 +08:00
parent 02a11e9434
commit 73d90607e2
2 changed files with 4 additions and 4 deletions

View File

@ -404,7 +404,7 @@ HWTEST_F(BundleManagerInternalTest, GetBundleNameListFromBms_001, TestSize.Level
DTEST_LOG << "BundleManagerCallBackTest GetBundleNameListFromBms_001 begin" << std::endl;
const std::string bundleName = "com.ohos.permissionmanager";
int32_t uid = BundleManagerInternal::GetUidFromBms(bundleName);
ASSERT_TRUE(uid>0);
ASSERT_TRUE(uid > 0);
std::vector<std::u16string> u16BundleNameList;
BundleManagerInternal::GetBundleNameListFromBms(uid, u16BundleNameList);
EXPECT_TRUE(!u16BundleNameList.empty());
@ -424,7 +424,7 @@ HWTEST_F(BundleManagerInternalTest, GetBundleNameListFromBms_002, TestSize.Level
DTEST_LOG << "BundleManagerCallBackTest GetBundleNameListFromBms_002 begin" << std::endl;
const std::string bundleName = "com.ohos.permissionmanager";
int32_t uid = BundleManagerInternal::GetUidFromBms(bundleName);
ASSERT_TRUE(uid>0);
ASSERT_TRUE(uid > 0);
std::vector<std::u16string> u16BundleNameList;
bool ret1 = BundleManagerInternal::GetBundleNameListFromBms(uid, u16BundleNameList);
EXPECT_EQ(ret1, true);
@ -444,7 +444,7 @@ HWTEST_F(BundleManagerInternalTest, GetCallerAppIdFromBms_001, TestSize.Level3)
DTEST_LOG << "BundleManagerInternalTest GetCallerAppIdFromBms_001 begin" << std::endl;
const std::string bundleName = "com.ohos.permissionmanager";
int32_t uid = BundleManagerInternal::GetUidFromBms(bundleName);
ASSERT_TRUE(uid>0);
ASSERT_TRUE(uid > 0);
string appId;
bool ret = BundleManagerInternal::GetCallerAppIdFromBms(uid, appId);
EXPECT_EQ(ret, true);

View File

@ -843,7 +843,7 @@ HWTEST_F(DMSContinueManagerTest, testSetStateSendEvent_001, TestSize.Level1)
HWTEST_F(DMSContinueManagerTest, testGetContinueLaunchMissionInfo_001, TestSize.Level1)
{
DTEST_LOG << "DMSContinueManagerTest testGetContinueLaunchMissionInfo_001 start" << std::endl;
ContinueLaunchMissionInfo missionInfo = {"com.test.demo", "MainAbility"};
ContinueLaunchMissionInfo missionInfo = {"com.test.missionInfo", "MainAbility"};
DMSContinueSendMgr::GetInstance().continueLaunchMission_.clear();
int32_t ret = DMSContinueSendMgr::GetInstance().GetContinueLaunchMissionInfo(MISSIONID_01, missionInfo);
EXPECT_EQ(ret, INVALID_PARAMETERS_ERR);