Merge pull request !1545 from wuliangdong/fix_tdd_0430
This commit is contained in:
openharmony_ci 2024-05-03 08:46:00 +00:00 committed by Gitee
commit 32c1242829
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 21 additions and 1 deletions

View File

@ -2180,7 +2180,7 @@ HWTEST_F(InteractionManagerTest, GetDragAction_002, TestSize.Level1)
DragAction dragAction { DragAction::INVALID };
ret = InteractionManager::GetInstance()->GetDragAction(dragAction);
EXPECT_EQ(ret, RET_OK);
EXPECT_EQ(dragAction, DragAction::COPY);
EXPECT_EQ(dragAction, DragAction::MOVE);
PrintDragAction(dragAction);
SimulateUpKeyEvent(MMI::KeyEvent::KEYCODE_CTRL_LEFT);
ret = InteractionManager::GetInstance()->GetDragAction(dragAction);

View File

@ -80,9 +80,13 @@ HWTEST_F(DeviceStatusModuleTest, GetDeviceStatusDataTest001, TestSize.Level0)
Data data = stationaryManager->GetDeviceStatusData(type);
GTEST_LOG_(INFO) << "type: " << data.type;
GTEST_LOG_(INFO) << "value: " << data.value;
#ifdef OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
GTEST_LOG_(INFO) << "INTENTION_FRAMEWORK, UNSUPPORTED " << data.value;
#else
EXPECT_EQ(true, data.type == g_moduleTest &&
data.value >= OnChangedValue::VALUE_INVALID &&
data.value <= OnChangedValue::VALUE_EXIT) << "GetDeviceStatusData failed";
#endif // OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
}
/**
@ -99,9 +103,13 @@ HWTEST_F(DeviceStatusModuleTest, GetDeviceStatusDataTest002, TestSize.Level0)
Data data = stationaryManager->GetDeviceStatusData(type);
GTEST_LOG_(INFO) << "type: " << data.type;
GTEST_LOG_(INFO) << "value: " << data.value;
#ifdef OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
GTEST_LOG_(INFO) << "INTENTION_FRAMEWORK, UNSUPPORTED " << data.value;
#else
EXPECT_EQ(true, data.type == g_moduleTest &&
data.value >= OnChangedValue::VALUE_INVALID &&
data.value <= OnChangedValue::VALUE_EXIT) << "GetDeviceStatusData failed";
#endif // OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
}
/**
@ -118,9 +126,13 @@ HWTEST_F(DeviceStatusModuleTest, GetDeviceStatusDataTest003, TestSize.Level0)
Data data = stationaryManager->GetDeviceStatusData(type);
GTEST_LOG_(INFO) << "type: " << data.type;
GTEST_LOG_(INFO) << "value: " << data.value;
#ifdef OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
GTEST_LOG_(INFO) << "INTENTION_FRAMEWORK, UNSUPPORTED " << data.value;
#else
EXPECT_EQ(true, data.type == g_moduleTest &&
data.value >= OnChangedValue::VALUE_INVALID &&
data.value <= OnChangedValue::VALUE_EXIT) << "GetDeviceStatusData failed";
#endif // OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
}
/**
@ -136,9 +148,13 @@ HWTEST_F(DeviceStatusModuleTest, GetDeviceStatusDataTest004, TestSize.Level0)
Data data = StationaryManager::GetInstance()->GetDeviceStatusData(type);
GTEST_LOG_(INFO) << "type: " << data.type;
GTEST_LOG_(INFO) << "value: " << data.value;
#ifdef OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
GTEST_LOG_(INFO) << "INTENTION_FRAMEWORK, UNSUPPORTED " << data.value;
#else
EXPECT_EQ(true, data.type == g_moduleTest &&
data.value >= OnChangedValue::VALUE_INVALID &&
data.value <= OnChangedValue::VALUE_EXIT) << "GetDeviceStatusData failed";
#endif // OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
}
} // namespace
} // namespace DeviceStatus

View File

@ -99,6 +99,9 @@ HWTEST_F(DeviceStatusClientTest, DeviceStatusCallbackTest001, TestSize.Level0)
HWTEST_F(DeviceStatusClientTest, GetDeviceStatusDataTest001, TestSize.Level0)
{
CALL_TEST_DEBUG;
#ifdef OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
GTEST_LOG_(INFO) << "INTENTION_FRAMEWORK, UNSUPPORTED ";
#else
auto stationaryMgr = StationaryManager::GetInstance();
OnChangedValue invalidValue = OnChangedValue::VALUE_INVALID;
OnChangedValue exitValue = OnChangedValue::VALUE_EXIT;
@ -126,6 +129,7 @@ HWTEST_F(DeviceStatusClientTest, GetDeviceStatusDataTest001, TestSize.Level0)
type = static_cast<Type>(10);
data = stationaryMgr->GetDeviceStatusData(type);
EXPECT_TRUE(data.type == type && data.value >= invalidValue && data.value <= exitValue);
#endif // OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
}
} // namespace DeviceStatus
} // namespace Msdp