From ed211d4d6269fe852e8b0d8e2de5aa0439f217eb Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Tue, 18 Jul 2023 17:54:13 +0900 Subject: [PATCH] Fix typo in function and variable names Change-Id: I7a1c67d688c0903064ccb539e72477a4205b9b04 Signed-off-by: Suyeon Hwang --- tests/src/vc_common_test_util.cpp | 8 ++++---- tests/src/vc_common_test_util.h | 2 +- tests/src/vc_mgr_test_util.cpp | 20 ++++++++++---------- tests/src/vc_mgr_test_util.h | 2 +- tests/src/vc_test_util.cpp | 16 ++++++++-------- tests/src/vc_test_util.h | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/src/vc_common_test_util.cpp b/tests/src/vc_common_test_util.cpp index a230eba..4ab7867 100644 --- a/tests/src/vc_common_test_util.cpp +++ b/tests/src/vc_common_test_util.cpp @@ -104,7 +104,7 @@ void VcCommonTestUtility::WaitUntilEngineTerminated(int duration) return !is_running; }; - WaitCondtion(engineChcker, duration); + WaitCondition(engineChcker, duration); } bool VcCommonTestUtility::IsVcFeatureSupported() @@ -161,7 +161,7 @@ void VcCommonTestUtility::EnableAutoLanguageSelection() vc_setting_deinitialize(); } -bool VcCommonTestUtility::WaitCondtion(std::function checker, int duration) +bool VcCommonTestUtility::WaitCondition(std::function checker, int duration) { auto mainLoopQuitTimer = ecore_timer_add(static_cast(duration), [](void *data) -> Eina_Bool { ecore_main_loop_quit(); @@ -169,8 +169,8 @@ bool VcCommonTestUtility::WaitCondtion(std::function checker, int du }, nullptr); auto checkerTimer = ecore_timer_add(0.0, [](void *data) -> Eina_Bool { - auto &checker = *reinterpret_cast *>(data); - if (false == checker()) { + auto &IsConditionSatisfied = *reinterpret_cast *>(data); + if (false == IsConditionSatisfied()) { return EINA_TRUE; } diff --git a/tests/src/vc_common_test_util.h b/tests/src/vc_common_test_util.h index c37c1ac..70fac59 100644 --- a/tests/src/vc_common_test_util.h +++ b/tests/src/vc_common_test_util.h @@ -39,7 +39,7 @@ public: static void SetCurrentLanguage(const char *language); static void EnableAutoLanguageSelection(); - static bool WaitCondtion(std::function checker, int duration); + static bool WaitCondition(std::function checker, int duration); }; diff --git a/tests/src/vc_mgr_test_util.cpp b/tests/src/vc_mgr_test_util.cpp index db17219..009f342 100644 --- a/tests/src/vc_mgr_test_util.cpp +++ b/tests/src/vc_mgr_test_util.cpp @@ -28,7 +28,7 @@ VcMgrTestUtility::VcMgrTestUtility() mCurrentServiceState = VC_SERVICE_STATE_NONE; mDefaultCommandList = nullptr; - mErrorOccured = false; + mErrorOccurred = false; mGetErrorMessageReturn = VC_ERROR_OPERATION_FAILED; mAllResultReceived = false; mSetSelectedResultReturn = VC_ERROR_OPERATION_FAILED; @@ -72,7 +72,7 @@ void VcMgrTestUtility::ServiceStateChangedCallback(vc_service_state_e previous, void VcMgrTestUtility::ErrorCallback(vc_error_e reason, void *user_data) { auto instance = reinterpret_cast(user_data); - instance->mErrorOccured = true; + instance->mErrorOccurred = true; char *error = nullptr; instance->mGetErrorMessageReturn = vc_mgr_get_error_message(&error); @@ -165,7 +165,7 @@ bool VcMgrTestUtility::IsStateChanged(vc_state_e targetState, int duration) 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) @@ -174,16 +174,16 @@ bool VcMgrTestUtility::IsServiceStateChanged(vc_service_state_e targetState, int 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) @@ -192,7 +192,7 @@ bool VcMgrTestUtility::IsAllResultReceived(int duration) return instance->mAllResultReceived; }, this); - return VcCommonTestUtility::WaitCondtion(resultChecker, duration); + return VcCommonTestUtility::WaitCondition(resultChecker, duration); } bool VcMgrTestUtility::IsResultReceived(int duration) @@ -201,7 +201,7 @@ bool VcMgrTestUtility::IsResultReceived(int duration) return instance->mResultReceived; }, this); - return VcCommonTestUtility::WaitCondtion(resultChecker, duration); + return VcCommonTestUtility::WaitCondition(resultChecker, duration); } bool VcMgrTestUtility::IsSpeechDetected(int duration) @@ -210,7 +210,7 @@ bool VcMgrTestUtility::IsSpeechDetected(int duration) return instance->mSpeechDetected; }, this); - return VcCommonTestUtility::WaitCondtion(resultChecker, duration); + return VcCommonTestUtility::WaitCondition(resultChecker, duration); } bool VcMgrTestUtility::IsLanguageChanged(int duration) @@ -219,7 +219,7 @@ bool VcMgrTestUtility::IsLanguageChanged(int duration) return instance->mLanguageChanged; }, this); - return VcCommonTestUtility::WaitCondtion(resultChecker, duration); + return VcCommonTestUtility::WaitCondition(resultChecker, duration); } bool VcMgrTestUtility::Prepare() diff --git a/tests/src/vc_mgr_test_util.h b/tests/src/vc_mgr_test_util.h index c0db4ad..5dc2267 100644 --- a/tests/src/vc_mgr_test_util.h +++ b/tests/src/vc_mgr_test_util.h @@ -66,7 +66,7 @@ public: vc_service_state_e mCurrentServiceState; vc_cmd_list_h mDefaultCommandList; - bool mErrorOccured; + bool mErrorOccurred; int mGetErrorMessageReturn; bool mAllResultReceived; int mSetSelectedResultReturn; diff --git a/tests/src/vc_test_util.cpp b/tests/src/vc_test_util.cpp index b150f73..ed836b5 100644 --- a/tests/src/vc_test_util.cpp +++ b/tests/src/vc_test_util.cpp @@ -25,7 +25,7 @@ VcTestUtility::VcTestUtility() { mCurrentState = VC_STATE_NONE; mCurrentServiceState = VC_SERVICE_STATE_NONE; - mErrorOccured = false; + mErrorOccurred = false; mResultReceived = false; mLanguageChanged = false; @@ -60,7 +60,7 @@ void VcTestUtility::ServiceStateChangedCallback(vc_service_state_e previous, vc_ void VcTestUtility::ErrorCallback(vc_error_e reason, void *user_data) { auto instance = reinterpret_cast(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) @@ -99,7 +99,7 @@ bool VcTestUtility::IsStateChanged(vc_state_e targetState, int duration) 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) @@ -108,16 +108,16 @@ bool VcTestUtility::IsServiceStateChanged(vc_service_state_e targetState, int du 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) @@ -126,7 +126,7 @@ bool VcTestUtility::IsResultReceived(int duration) return instance->mResultReceived; }, this); - return VcCommonTestUtility::WaitCondtion(resultChecker, duration); + return VcCommonTestUtility::WaitCondition(resultChecker, duration); } bool VcTestUtility::IsLanguageChanged(int duration) @@ -135,7 +135,7 @@ bool VcTestUtility::IsLanguageChanged(int duration) return instance->mLanguageChanged; }, this); - return VcCommonTestUtility::WaitCondtion(resultChecker, duration); + return VcCommonTestUtility::WaitCondition(resultChecker, duration); } bool VcTestUtility::Prepare() diff --git a/tests/src/vc_test_util.h b/tests/src/vc_test_util.h index 4de8dc8..7ca3e5f 100644 --- a/tests/src/vc_test_util.h +++ b/tests/src/vc_test_util.h @@ -51,7 +51,7 @@ public: vc_state_e mCurrentState; vc_service_state_e mCurrentServiceState; - bool mErrorOccured; + bool mErrorOccurred; bool mResultReceived; bool mLanguageChanged; -- 2.34.1