!6900 [包管理] [分身强开] 添加determineCloneNum,以提高测试覆盖率

Merge pull request !6900 from chthollystar/master
This commit is contained in:
openharmony_ci 2024-09-09 06:39:20 +00:00 committed by Gitee
commit c7daad017d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -961,4 +961,23 @@ HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionKeyOperation_0002, Function | Smal
EXPECT_EQ(res, ERR_OK);
#endif
}
/**
* @tc.number: BmsExtensionDetermineCloneNum_0001
* @tc.name: DetermineCloneNum
* @tc.desc: DetermineCloneNum
*/
HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionDetermineCloneNum_0001, Function | SmallTest | Level0)
{
BundleMgrExtTest bundleMgrExtTest;
std::string bundleName = "com.tencent.qq";
std::string appIdentifier = "appIdentifier";
int32_t cloneNum = 0;
auto res = bundleMgrExtTest.DetermineCloneNum(bundleName, appIdentifier, cloneNum);
#ifdef USE_EXTENSION_DATA
EXPECT_NE(res, false);
#else
EXPECT_EQ(res, false);
#endif
}
} // OHOS