mirror of
https://gitee.com/openharmony/msdp_device_status
synced 2024-12-03 13:21:04 +00:00
commit
32c1242829
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user