diff --git a/frameworks/inner_api/security_component/test/unittest/src/sec_comp_kit_test.cpp b/frameworks/inner_api/security_component/test/unittest/src/sec_comp_kit_test.cpp index ea8108856d1719d28e914fc5c5b839d3be962ce6..cad834b214fc76b026443ca5f0d58dec238f727f 100644 --- a/frameworks/inner_api/security_component/test/unittest/src/sec_comp_kit_test.cpp +++ b/frameworks/inner_api/security_component/test/unittest/src/sec_comp_kit_test.cpp @@ -121,7 +121,6 @@ HWTEST_F(SecCompKitTest, ExceptCall001, TestSize.Level1) int32_t scId = -1; std::string jsonStr = jsonRes.dump(); ASSERT_NE(SC_OK, SecCompKit::RegisterSecurityComponent(LOCATION_COMPONENT, jsonStr, scId)); - ASSERT_EQ(-1, scId); ASSERT_NE(SC_OK, SecCompKit::UpdateSecurityComponent(scId, jsonStr)); struct SecCompClickEvent touch = { diff --git a/services/security_component_service/sa/test/unittest/src/sec_comp_perm_manager_test.cpp b/services/security_component_service/sa/test/unittest/src/sec_comp_perm_manager_test.cpp index bf2a052285787597865937b6d1fc231fb3dd82b0..5efee238c2f1911cb1273eb88d31ccad311fa340 100644 --- a/services/security_component_service/sa/test/unittest/src/sec_comp_perm_manager_test.cpp +++ b/services/security_component_service/sa/test/unittest/src/sec_comp_perm_manager_test.cpp @@ -100,7 +100,12 @@ HWTEST_F(SecCompPermManagerTest, RevokeTempSavePermissionCount001, TestSize.Leve permMgr.applySaveCountMap_[id] = 1; permMgr.RevokeTempSavePermissionCount(static_cast(0)); - ASSERT_EQ(permMgr.applySaveCountMap_[id], 1); + permMgr.saveTaskDequeMap_[id].push_back("test"); + permMgr.RevokeTempSavePermissionCount(static_cast(0)); + + permMgr.secHandler_ = std::make_shared(nullptr); + permMgr.RevokeTempSavePermissionCount(static_cast(0)); + ASSERT_EQ(permMgr.applySaveCountMap_[id], 0); } /**