Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 725) sorted by relevance

12345678910>>...29

/base/global/resource_management_lite/frameworks/resmgr_lite/test/unittest/lite/common/
Dresource_manager_test.cpp218 RState state; variable
226 state = rm->UpdateResConfig(*rc);
228 EXPECT_EQ(SUCCESS, state);
239 RState state; variable
245 state = rm->UpdateResConfig(*rc);
247 EXPECT_EQ(LOCALEINFO_IS_NULL, state);
258 RState state; variable
265 state = rm->UpdateResConfig(*rc);
267 EXPECT_EQ(LOCALEINFO_IS_NULL, state);
280 RState state; variable
[all …]
Dlocale_info_test.cpp174 RState state = SUCCESS; variable
175 LocaleInfo* localeInfo = BuildFromString("zh-CN", '-', state);
200 RState state = SUCCESS; variable
201 LocaleInfo* localeInfo = BuildFromString("zh-CN", '-', state);
216 localeInfo = BuildFromString("en-US", '-', state);
227 localeInfo = BuildFromString("en-Qaag-US", '-', state);
253 RState state = SUCCESS; variable
254 LocaleInfo* localeInfo = BuildFromString("zh-CN", '-', state);
271 RState state = SUCCESS; variable
272 LocaleInfo* localeInfo = BuildFromString("zh-CN", '-', state);
[all …]
/base/startup/init/test/benchmark/
Dparameter_benchmark.cpp128 static void BMCachedParameterGet(benchmark::State &state) in BMCachedParameterGet() argument
136 for (auto _ : state) { in BMCachedParameterGet()
139 state.SetItemsProcessed(state.iterations()); in BMCachedParameterGet()
147 static void BMCachedParameterGetChangedStatic(benchmark::State &state) in BMCachedParameterGetChangedStatic() argument
154 for (auto _ : state) { in BMCachedParameterGetChangedStatic()
160 state.SetItemsProcessed(state.iterations()); in BMCachedParameterGetChangedStatic()
168 static void BMCachedParameterGetChangedGlobal(benchmark::State &state) in BMCachedParameterGetChangedGlobal() argument
176 for (auto _ : state) { in BMCachedParameterGetChangedGlobal()
180 state.SetItemsProcessed(state.iterations()); in BMCachedParameterGetChangedGlobal()
188 static void BMCachedParameterGetChangedGlobal2(benchmark::State &state) in BMCachedParameterGetChangedGlobal2() argument
[all …]
/base/notification/distributed_notification_service/test/bechmarktest/notification_services_test/
Dnotification_service_test.cpp100 void SetUp(const ::benchmark::State &state) override in SetUp() argument
107 void TearDown(const ::benchmark::State &state) override in TearDown() argument
126 BENCHMARK_F(BenchmarkNotificationService, AddSlotTestCase)(benchmark::State &state) in BENCHMARK_F()
131 while (state.KeepRunning()) { in BENCHMARK_F()
134 state.SkipWithError("AddSlotTestCase failed."); in BENCHMARK_F()
145 BENCHMARK_F(BenchmarkNotificationService, RemoveSlotByTypeTestCase)(benchmark::State &state) in BENCHMARK_F()
150 while (state.KeepRunning()) { in BENCHMARK_F()
153 state.SkipWithError("RemoveSlotByTypeTestCase add failed."); in BENCHMARK_F()
158 state.SkipWithError("RemoveSlotByTypeTestCase remove failed."); in BENCHMARK_F()
169 BENCHMARK_F(BenchmarkNotificationService, SubscribeTestCase)(benchmark::State &state) in BENCHMARK_F()
[all …]
/base/msdp/device_status/utils/common/include/
Dutil_napi.h32 #define CHKRV(state, desc) \ argument
34 if ((state) != napi_ok) { \
40 #define CHKRP(state, desc) \ argument
42 if ((state) != napi_ok) { \
48 #define CHKRF(state, desc) \ argument
50 if ((state) != napi_ok) { \
56 #define CHKRV_SCOPE(env, state, desc, scope) \ argument
58 if ((state) != napi_ok) { \
65 #define CHKRF_SCOPE(env, state, desc, scope) \ argument
67 if ((state) != napi_ok) { \
[all …]
/base/global/resource_management/interfaces/js/innerkits/core/src/
Dresource_manager_napi_sync_impl.cpp106 RState state = dataContext->addon_->GetResMgr()->GetRawFileList(dataContext->path_.c_str(), in GetRawFileListSync() local
108 if (state != RState::SUCCESS || dataContext->arrayValue_.empty()) { in GetRawFileListSync()
130 RState state = dataContext->addon_->GetResMgr()->GetRawFileFromHap(dataContext->path_, in GetRawFileContentSync() local
132 if (state != SUCCESS) { in GetRawFileContentSync()
134 ResourceManagerNapiUtils::NapiThrow(env, state); in GetRawFileContentSync()
154 RState state = dataContext->addon_->GetResMgr()->GetRawFileDescriptorFromHap(dataContext->path_, in GetRawFdSync() local
156 if (state != RState::SUCCESS) { in GetRawFdSync()
158 ResourceManagerNapiUtils::NapiThrow(env, state); in GetRawFdSync()
177 RState state = dataContext->addon_->GetResMgr()->CloseRawFileDescriptor(dataContext->path_); in CloseRawFdSync() local
178 if (state != RState::SUCCESS) { in CloseRawFdSync()
[all …]
/base/global/resource_management/frameworks/resmgr/test/unittest/common/
Dlocale_info_test.cpp174 RState state = SUCCESS; variable
175 Locale *localeInfo = BuildFromString("zh-CN", '-', state);
199 RState state = SUCCESS; variable
200 Locale *localeInfo = BuildFromString("zh-CN", '-', state);
215 localeInfo = BuildFromString("en-US", '-', state);
226 localeInfo = BuildFromString("en-Qaag-US", '-', state);
252 RState state = SUCCESS; variable
253 Locale *localeInfo = BuildFromString("zh-CN", '-', state);
270 RState state = SUCCESS; variable
271 Locale *localeInfo = BuildFromString("zh-CN", '-', state);
[all …]
Dresource_manager_test_common.cpp177 RState state; in TestGetProfileById() local
180 state = rm->GetProfileById(id, outValue); in TestGetProfileById()
181 EXPECT_TRUE(state == SUCCESS); in TestGetProfileById()
192 RState state = rm->GetProfileByName("test_profile", outValue); in TestGetProfileByName() local
193 EXPECT_TRUE(state == SUCCESS); in TestGetProfileByName()
206 RState state = rm->GetMediaById(id, outValue); in TestGetMediaById() local
207 EXPECT_TRUE(state == SUCCESS); in TestGetMediaById()
232 RState state = rm->GetMediaById(id, outValue, density); in TestGetMediaWithDensityById() local
233 EXPECT_TRUE(state == SUCCESS); in TestGetMediaWithDensityById()
244 RState state = rm->GetMediaByName("icon1", outValue); in TestGetMediaByName() local
[all …]
Dresource_manager_test.cpp158 RState state; variable
166 state = rm->UpdateResConfig(*rc);
168 EXPECT_EQ(SUCCESS, state);
179 RState state; variable
185 state = rm->UpdateResConfig(*rc);
187 EXPECT_EQ(LOCALEINFO_IS_NULL, state);
198 RState state; variable
205 state = rm->UpdateResConfig(*rc);
207 EXPECT_EQ(LOCALEINFO_IS_NULL, state);
220 RState state; variable
[all …]
Dresource_manager_test_media.cpp90 RState state; variable
91 state = rm->GetMediaById(NON_EXIST_ID, outValue);
92 ASSERT_EQ(ERROR_CODE_RES_ID_NOT_FOUND, state);
136 RState state; variable
139 state = rm->GetMediaById(id, outValue, density);
140 EXPECT_TRUE(state == SUCCESS);
172 RState state; variable
175 state = rm->GetMediaById(id, outValue, density);
176 EXPECT_TRUE(state == SUCCESS);
208 RState state; variable
[all …]
Dresource_manager_test_hap.cpp565 RState state = rm->GetProfileDataById(id, len, outValue); variable
566 EXPECT_TRUE(state == SUCCESS);
581 RState state = rm->GetProfileDataByName("test_profile", len, outValue); variable
582 EXPECT_TRUE(state == SUCCESS);
596 RState state; variable
598 state = rm->GetMediaDataByName("icon1", len, outValue);
600 EXPECT_TRUE(state == SUCCESS);
614 RState state; variable
618 state = rm->GetMediaDataById(id, len, outValue);
620 EXPECT_TRUE(state == SUCCESS);
[all …]
/base/notification/common_event_service/test/benchmarktest/common_event_service_test/
Dcommon_event_manager_service_test.cpp44 void SetUp(const ::benchmark::State &state) override in SetUp() argument
46 void TearDown(const ::benchmark::State &state) override in TearDown() argument
68 …ARK_F(BenchmarkCommonEventManagerService, CommonEventSubscribeTestCase001)(benchmark::State &state) in BENCHMARK_F()
77 while (state.KeepRunning()) { in BENCHMARK_F()
81 state.SkipWithError("SubscribeCommonEvent failed."); in BENCHMARK_F()
92 …ARK_F(BenchmarkCommonEventManagerService, CommonEventSubscribeTestCase002)(benchmark::State &state) in BENCHMARK_F()
101 while (state.KeepRunning()) { in BENCHMARK_F()
105 state.SkipWithError("SubscribeCommonEvent failed."); in BENCHMARK_F()
116 …ARK_F(BenchmarkCommonEventManagerService, CommonEventSubscribeTestCase003)(benchmark::State &state) in BENCHMARK_F()
125 while (state.KeepRunning()) { in BENCHMARK_F()
[all …]
/base/useriam/user_auth_framework/services/base/src/
Dfinite_state_machine_builder.cpp40 …iteStateMachine::Builder> FiniteStateMachineBuilder::MakeTransition(uint32_t state, uint32_t event, in MakeTransition() argument
43 …auto ret = transitionMap_.try_emplace(FiniteStateMachineImpl::GetTransitionIndex(state, event), ne… in MakeTransition()
45 …OGE("%{public}s state %{public}u and event %{public}u insert failed", name_.c_str(), state, event); in MakeTransition()
51 …iteStateMachine::Builder> FiniteStateMachineBuilder::MakeTransition(uint32_t state, uint32_t event, in MakeTransition() argument
54 MakeTransition(state, event, nextState, nullptr); in MakeTransition()
58 …shared_ptr<FiniteStateMachine::Builder> FiniteStateMachineBuilder::MakeOnStateEnter(uint32_t state, in MakeOnStateEnter() argument
61 auto ret = enterMap_.try_emplace(state, action); in MakeOnStateEnter()
63 IAM_LOGE("%{public}s enter state action %{public}u insert failed", name_.c_str(), state); in MakeOnStateEnter()
69 …shared_ptr<FiniteStateMachine::Builder> FiniteStateMachineBuilder::MakeOnStateLeave(uint32_t state, in MakeOnStateLeave() argument
72 auto ret = leaveMap_.try_emplace(state, action); in MakeOnStateLeave()
[all …]
/base/useriam/face_auth/services_ex/src/
Dfinite_state_machine_builder.cpp40 …iteStateMachine::Builder> FiniteStateMachineBuilder::MakeTransition(uint32_t state, uint32_t event, in MakeTransition() argument
43 …auto ret = transitionMap_.try_emplace(FiniteStateMachineImpl::GetTransitionIndex(state, event), ne… in MakeTransition()
45 …OGE("%{public}s state %{public}u and event %{public}u insert failed", name_.c_str(), state, event); in MakeTransition()
51 …iteStateMachine::Builder> FiniteStateMachineBuilder::MakeTransition(uint32_t state, uint32_t event, in MakeTransition() argument
54 MakeTransition(state, event, nextState, nullptr); in MakeTransition()
58 …shared_ptr<FiniteStateMachine::Builder> FiniteStateMachineBuilder::MakeOnStateEnter(uint32_t state, in MakeOnStateEnter() argument
61 auto ret = enterMap_.try_emplace(state, action); in MakeOnStateEnter()
63 IAM_LOGE("%{public}s enter state action %{public}u insert failed", name_.c_str(), state); in MakeOnStateEnter()
69 …shared_ptr<FiniteStateMachine::Builder> FiniteStateMachineBuilder::MakeOnStateLeave(uint32_t state, in MakeOnStateLeave() argument
72 auto ret = leaveMap_.try_emplace(state, action); in MakeOnStateLeave()
[all …]
/base/powermgr/display_manager/service/native/src/
Dscreen_action.cpp62 DisplayState state = DisplayState::DISPLAY_UNKNOWN; in GetDisplayState() local
67 state = DisplayState::DISPLAY_ON; in GetDisplayState()
70 state = DisplayState::DISPLAY_DIM; in GetDisplayState()
73 state = DisplayState::DISPLAY_SUSPEND; in GetDisplayState()
76 state = DisplayState::DISPLAY_OFF; in GetDisplayState()
81 …DISPLAY_HILOGI(FEAT_STATE, "state=%{public}u displayId=%{public}u", static_cast<uint32_t>(state), … in GetDisplayState()
82 return state; in GetDisplayState()
85 bool ScreenAction::SetDisplayState(DisplayState state, const std::function<void(DisplayState)>& cal… in SetDisplayState() argument
88 displayId_, static_cast<uint32_t>(state)); in SetDisplayState()
91 switch (state) { in SetDisplayState()
[all …]
/base/powermgr/thermal_manager/application/protector/src/
Dthermal_protector_utils.cpp37 int32_t state = fseek(stream, 0, SEEK_SET); in WriteFile() local
38 if (state != ERR_OK) { in WriteFile()
40 return state; in WriteFile()
42 state = fclose(stream); in WriteFile()
43 if (state != ERR_OK) { in WriteFile()
44 return state; in WriteFile()
/base/notification/common_event_service/services/test/unittest/
Dcommon_event_dump_test.cpp111 …static void DumpInfoCount(const std::vector<std::string> &state, int desSubscribersCount, int desS…
217 std::vector<std::string> state; in ProcessSubscriberTest2Case1() local
218 …innerCommonEventManager_->DumpState(static_cast<int32_t>(DumpEventType::ALL), "", ALL_USER, state); in ProcessSubscriberTest2Case1()
219 CommonEventDumpTest::DumpInfoCount(state, in ProcessSubscriberTest2Case1()
406 void CommonEventDumpTest::DumpInfoCount(const std::vector<std::string> &state, int desSubscribersCo… in DumpInfoCount() argument
417 for (auto vec : state) { in DumpInfoCount()
687 std::vector<std::string> state; variable
688 …nnerCommonEventManager()->DumpState(static_cast<int32_t>(DumpEventType::ALL), "", ALL_USER, state);
689 GTEST_LOG_(INFO) << "get state size:" << state.size();
690 ASSERT_NE(state.size(), 0);
[all …]
/base/powermgr/thermal_manager/services/native/src/thermal_observer/state_machine/
Dstate_machine.cpp29 for (auto state = vState_.begin(); state != vState_.end(); state++) { in Init() local
30 THERMAL_HILOGI(COMP_SVC, "StateMachine name = %{public}s", state->name.c_str()); in Init()
31 … std::shared_ptr<IStateCollection> stateCollection = StateCollectionFactory::Create(state->name); in Init()
32 if (state->isExistParam) { in Init()
33 stateCollection->InitParam(state->params); in Init()
36 stateCollectionMap_.emplace(std::pair(state->name, stateCollection)); in Init()
/base/powermgr/power_manager/test/unittest/src/
Ddevice_state_action_native_test.cpp50 DisplayState state = DisplayState::DISPLAY_OFF; variable
52 EXPECT_TRUE(deviceStateAction->SetDisplayState(state, reason) == ActionResult::SUCCESS);
54 state = DisplayState::DISPLAY_DIM;
55 EXPECT_TRUE(deviceStateAction->SetDisplayState(state, reason) == ActionResult::SUCCESS);
57 state = DisplayState::DISPLAY_ON;
58 EXPECT_TRUE(deviceStateAction->SetDisplayState(state, reason) == ActionResult::SUCCESS);
60 state = DisplayState::DISPLAY_SUSPEND;
61 EXPECT_TRUE(deviceStateAction->SetDisplayState(state, reason) == ActionResult::SUCCESS);
63 state = DisplayState::DISPLAY_UNKNOWN;
64 EXPECT_TRUE(deviceStateAction->SetDisplayState(state, reason) == ActionResult::FAILED);
/base/notification/common_event_service/test/benchmarktest/common_event_publish_test/
Dcommon_event_publish_test.cpp39 void SetUp(const ::benchmark::State &state) override in SetUp() argument
42 void TearDown(const ::benchmark::State &state) override in TearDown() argument
64 BENCHMARK_F(BenchmarkCommonEventPublish, SubscribeCommonEventTestCase)(benchmark::State &state) in BENCHMARK_F()
71 while (state.KeepRunning()) { in BENCHMARK_F()
82 BENCHMARK_F(BenchmarkCommonEventPublish, UnsubscribeCommonEventTestCase)(benchmark::State &state) in BENCHMARK_F()
91 while (state.KeepRunning()) { in BENCHMARK_F()
104 BENCHMARK_F(BenchmarkCommonEventPublish, PublishCommonEventTestCase)(benchmark::State &state) in BENCHMARK_F()
116 while (state.KeepRunning()) { in BENCHMARK_F()
/base/location/frameworks/native/source/
Dlocation_data_handler.cpp59 int32_t state = DISABLED; in HandleSwitchStateChanged() local
60 rdbHelper->GetValue(locationDataEnableUri, LOCATION_DATA_COLUMN_ENABLE, state); in HandleSwitchStateChanged()
62 if (state != value) { in HandleSwitchStateChanged()
63 rdbHelper->SetValue(locationDataEnableUri, LOCATION_DATA_COLUMN_ENABLE, state); in HandleSwitchStateChanged()
66 locationDataManager->SetCachedSwitchState(state); in HandleSwitchStateChanged()
67 locationDataManager->ReportSwitchState(state); in HandleSwitchStateChanged()
/base/powermgr/battery_lite/frameworks/native/src/mini/
Dbattery_framework.c59 BatteryChargeState state = CHARGE_STATE_NONE; in GetChargingStatus() local
62 state = intf->GetChargingStatusFunc((IUnknown *)intf); in GetChargingStatus()
64 return state; in GetChargingStatus()
69 BatteryHealthState state = HEALTH_STATE_UNKNOWN; in GetHealthStatus() local
72 state = intf->GetHealthStatusFunc((IUnknown *)intf); in GetHealthStatus()
74 return state; in GetHealthStatus()
79 BatteryPluggedType state = PLUGGED_TYPE_NONE; in GetPluggedType() local
82 state = intf->GetPluggedTypeFunc((IUnknown *)intf); in GetPluggedType()
84 return state; in GetPluggedType()
/base/global/resource_management/frameworks/resmgr/src/
Dresource_manager_impl.cpp86 RState state = GetString(idItem, outValue); in GetStringById() local
87 if (state != SUCCESS && state != ERROR_CODE_RES_REF_TOO_MUCH) { in GetStringById()
90 return state; in GetStringById()
100 RState state = GetString(idItem, outValue); in GetStringByName() local
101 if (state != SUCCESS && state != ERROR_CODE_RES_REF_TOO_MUCH) { in GetStringByName()
104 return state; in GetStringByName()
163 RState state = GetStringArray(idItem, outValue); in GetStringArrayById() local
164 if (state != SUCCESS && state != ERROR_CODE_RES_REF_TOO_MUCH) { in GetStringArrayById()
167 return state; in GetStringArrayById()
177 RState state = GetStringArray(idItem, outValue); in GetStringArrayByName() local
[all …]
/base/notification/distributed_notification_service/test/bechmarktest/notification_publish_test/
Dnotification_publish_test.cpp47 void SetUp(const ::benchmark::State &state) override in SetUp() argument
50 void TearDown(const ::benchmark::State &state) override in TearDown() argument
122 BENCHMARK_F(BenchmarkNotificationPublish, PublishNotificationTestCase001)(benchmark::State &state) in BENCHMARK_F()
125 while (state.KeepRunning()) { in BENCHMARK_F()
137 BENCHMARK_F(BenchmarkNotificationPublish, CancelNotificationTestCase)(benchmark::State &state) in BENCHMARK_F()
140 while (state.KeepRunning()) { in BENCHMARK_F()
152 BENCHMARK_F(BenchmarkNotificationPublish, PublishNotificationTestCase002)(benchmark::State &state) in BENCHMARK_F()
155 while (state.KeepRunning()) { in BENCHMARK_F()
170 BENCHMARK_F(BenchmarkNotificationPublish, PublishNotificationTestCase003)(benchmark::State &state) in BENCHMARK_F()
173 while (state.KeepRunning()) { in BENCHMARK_F()
[all …]
/base/telephony/call_manager/services/call/src/
Dcall_policy.cpp77 TelCallState state = GetCallState(callId); in AnswerCallPolicy() local
78 if (state != TelCallState::CALL_STATUS_INCOMING && state != TelCallState::CALL_STATUS_WAITING) { in AnswerCallPolicy()
79 TELEPHONY_LOGE("current call state is:%{public}d, accept call not allowed", state); in AnswerCallPolicy()
91 TelCallState state = GetCallState(callId); in RejectCallPolicy() local
92 if (state != TelCallState::CALL_STATUS_INCOMING && state != TelCallState::CALL_STATUS_WAITING) { in RejectCallPolicy()
93 TELEPHONY_LOGE("current call state is:%{public}d, reject call not allowed", state); in RejectCallPolicy()
133 TelCallState state = GetCallState(callId); in HangUpPolicy() local
134 … if (state == TelCallState::CALL_STATUS_IDLE || state == TelCallState::CALL_STATUS_DISCONNECTING || in HangUpPolicy()
135 state == TelCallState::CALL_STATUS_DISCONNECTED) { in HangUpPolicy()
136 TELEPHONY_LOGE("current call state is:%{public}d, hang up call not allowed", state); in HangUpPolicy()
[all …]

12345678910>>...29