From e5eeac181244a78cc0ea0160e327adaba69a91c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E6=9D=B0?= Date: Mon, 9 Sep 2024 11:02:32 +0800 Subject: [PATCH] Issue:#IAPHG3 Description: determineCloneNum tdd coverage Sig: SIG_ApplicaitonFramework Feature or Bugfix: Bugfix Binary Source: No Signed-off-by: renjie84 renjie84@huawei.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 任杰 --- .../bms_extension_data_mgr_test.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp b/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp index a346872cd..153d4affc 100644 --- a/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp +++ b/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp @@ -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 \ No newline at end of file