return !is_running;
};
- WaitCondtion(engineChcker, duration);
+ WaitCondition(engineChcker, duration);
}
bool VcCommonTestUtility::IsVcFeatureSupported()
vc_setting_deinitialize();
}
-bool VcCommonTestUtility::WaitCondtion(std::function<bool(void)> checker, int duration)
+bool VcCommonTestUtility::WaitCondition(std::function<bool(void)> checker, int duration)
{
auto mainLoopQuitTimer = ecore_timer_add(static_cast<double>(duration), [](void *data) -> Eina_Bool {
ecore_main_loop_quit();
}, nullptr);
auto checkerTimer = ecore_timer_add(0.0, [](void *data) -> Eina_Bool {
- auto &checker = *reinterpret_cast<std::function<bool()> *>(data);
- if (false == checker()) {
+ auto &IsConditionSatisfied = *reinterpret_cast<std::function<bool()> *>(data);
+ if (false == IsConditionSatisfied()) {
return EINA_TRUE;
}
static void SetCurrentLanguage(const char *language);
static void EnableAutoLanguageSelection();
- static bool WaitCondtion(std::function<bool(void)> checker, int duration);
+ static bool WaitCondition(std::function<bool(void)> checker, int duration);
};
mCurrentServiceState = VC_SERVICE_STATE_NONE;
mDefaultCommandList = nullptr;
- mErrorOccured = false;
+ mErrorOccurred = false;
mGetErrorMessageReturn = VC_ERROR_OPERATION_FAILED;
mAllResultReceived = false;
mSetSelectedResultReturn = VC_ERROR_OPERATION_FAILED;
void VcMgrTestUtility::ErrorCallback(vc_error_e reason, void *user_data)
{
auto instance = reinterpret_cast<VcMgrTestUtility *>(user_data);
- instance->mErrorOccured = true;
+ instance->mErrorOccurred = true;
char *error = nullptr;
instance->mGetErrorMessageReturn = vc_mgr_get_error_message(&error);
return target == instance->mCurrentState;
}, this, targetState);
- return VcCommonTestUtility::WaitCondtion(stateChecker, duration);
+ return VcCommonTestUtility::WaitCondition(stateChecker, duration);
}
bool VcMgrTestUtility::IsServiceStateChanged(vc_service_state_e targetState, int duration)
return target == instance->mCurrentServiceState;
}, this, targetState);
- return VcCommonTestUtility::WaitCondtion(serviceStateChecker, duration);
+ return VcCommonTestUtility::WaitCondition(serviceStateChecker, duration);
}
bool VcMgrTestUtility::IsErrorOccurring(int duration)
{
auto errorChecker = std::bind([](VcMgrTestUtility *instance) {
- return instance->mErrorOccured;
+ return instance->mErrorOccurred;
}, this);
- return VcCommonTestUtility::WaitCondtion(errorChecker, duration);
+ return VcCommonTestUtility::WaitCondition(errorChecker, duration);
}
bool VcMgrTestUtility::IsAllResultReceived(int duration)
return instance->mAllResultReceived;
}, this);
- return VcCommonTestUtility::WaitCondtion(resultChecker, duration);
+ return VcCommonTestUtility::WaitCondition(resultChecker, duration);
}
bool VcMgrTestUtility::IsResultReceived(int duration)
return instance->mResultReceived;
}, this);
- return VcCommonTestUtility::WaitCondtion(resultChecker, duration);
+ return VcCommonTestUtility::WaitCondition(resultChecker, duration);
}
bool VcMgrTestUtility::IsSpeechDetected(int duration)
return instance->mSpeechDetected;
}, this);
- return VcCommonTestUtility::WaitCondtion(resultChecker, duration);
+ return VcCommonTestUtility::WaitCondition(resultChecker, duration);
}
bool VcMgrTestUtility::IsLanguageChanged(int duration)
return instance->mLanguageChanged;
}, this);
- return VcCommonTestUtility::WaitCondtion(resultChecker, duration);
+ return VcCommonTestUtility::WaitCondition(resultChecker, duration);
}
bool VcMgrTestUtility::Prepare()
vc_service_state_e mCurrentServiceState;
vc_cmd_list_h mDefaultCommandList;
- bool mErrorOccured;
+ bool mErrorOccurred;
int mGetErrorMessageReturn;
bool mAllResultReceived;
int mSetSelectedResultReturn;
{
mCurrentState = VC_STATE_NONE;
mCurrentServiceState = VC_SERVICE_STATE_NONE;
- mErrorOccured = false;
+ mErrorOccurred = false;
mResultReceived = false;
mLanguageChanged = false;
void VcTestUtility::ErrorCallback(vc_error_e reason, void *user_data)
{
auto instance = reinterpret_cast<VcTestUtility *>(user_data);
- instance->mErrorOccured = true;
+ instance->mErrorOccurred = true;
}
void VcTestUtility::ResultCallback(vc_result_event_e event, vc_cmd_list_h vc_cmd_list, const char* result, void *user_data)
return target == instance->mCurrentState;
}, this, targetState);
- return VcCommonTestUtility::WaitCondtion(stateChecker, duration);
+ return VcCommonTestUtility::WaitCondition(stateChecker, duration);
}
bool VcTestUtility::IsServiceStateChanged(vc_service_state_e targetState, int duration)
return target == instance->mCurrentServiceState;
}, this, targetState);
- return VcCommonTestUtility::WaitCondtion(serviceStateChecker, duration);
+ return VcCommonTestUtility::WaitCondition(serviceStateChecker, duration);
}
bool VcTestUtility::IsErrorOccurring(int duration)
{
auto errorChecker = std::bind([](VcTestUtility *instance) {
- return instance->mErrorOccured;
+ return instance->mErrorOccurred;
}, this);
- return VcCommonTestUtility::WaitCondtion(errorChecker, duration);
+ return VcCommonTestUtility::WaitCondition(errorChecker, duration);
}
bool VcTestUtility::IsResultReceived(int duration)
return instance->mResultReceived;
}, this);
- return VcCommonTestUtility::WaitCondtion(resultChecker, duration);
+ return VcCommonTestUtility::WaitCondition(resultChecker, duration);
}
bool VcTestUtility::IsLanguageChanged(int duration)
return instance->mLanguageChanged;
}, this);
- return VcCommonTestUtility::WaitCondtion(resultChecker, duration);
+ return VcCommonTestUtility::WaitCondition(resultChecker, duration);
}
bool VcTestUtility::Prepare()
vc_state_e mCurrentState;
vc_service_state_e mCurrentServiceState;
- bool mErrorOccured;
+ bool mErrorOccurred;
bool mResultReceived;
bool mLanguageChanged;