From b8c2b77171f6a955e94f700df7c5de234d70960d Mon Sep 17 00:00:00 2001 From: MisterE Date: Tue, 19 Nov 2024 22:06:10 +0800 Subject: [PATCH] codecheck Signed-off-by: MisterE --- .../test/unittest/continue/dsched_continue_test.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/dtbschedmgr/test/unittest/continue/dsched_continue_test.cpp b/services/dtbschedmgr/test/unittest/continue/dsched_continue_test.cpp index 215b42e2..cf6f39ee 100644 --- a/services/dtbschedmgr/test/unittest/continue/dsched_continue_test.cpp +++ b/services/dtbschedmgr/test/unittest/continue/dsched_continue_test.cpp @@ -628,33 +628,38 @@ HWTEST_F(DSchedContinueTest, DSchedContinueTest_0017_2, TestSize.Level0) auto conti = std::make_shared(subType, direction, callback, info); conti->Init(); auto cmd = std::make_shared(); - EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); // no continueType, diff module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); cmd->continueType_ = CONTINUE_TYPE1; cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_SAME_AS_CONTINUE_TYPE, MODULE_NAME2); int32_t ret = conti->UpdateElementInfo(cmd); EXPECT_EQ(ret, CAN_NOT_FOUND_MODULE_ERR); // no continueType, same module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); cmd->continueType_ = CONTINUE_TYPE1; cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_SAME_AS_CONTINUE_TYPE, MODULE_NAME1); ret = conti->UpdateElementInfo(cmd); EXPECT_EQ(ret, ERR_OK); // no continueType with quick start, same module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); cmd->continueType_ = CONTINUE_TYPE1_QUICK; cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_SAME_AS_CONTINUE_TYPE, MODULE_NAME1); ret = conti->UpdateElementInfo(cmd); EXPECT_EQ(ret, ERR_OK); // has continueType, same module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); cmd->continueType_ = CONTINUE_TYPE2; cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_DIFF_AS_CONTINUE_TYPE, MODULE_NAME2); ret = conti->UpdateElementInfo(cmd); EXPECT_EQ(ret, ERR_OK); // has continueType, diff module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); cmd->continueType_ = CONTINUE_TYPE2; cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_DIFF_AS_CONTINUE_TYPE, MODULE_NAME1); ret = conti->UpdateElementInfo(cmd); EXPECT_EQ(ret, ERR_OK); // has continueType, no module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); cmd->continueType_ = CONTINUE_TYPE2; cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_DIFF_AS_CONTINUE_TYPE, MODULE_NAME3); ret = conti->UpdateElementInfo(cmd);