From: Suyeon Hwang Date: Tue, 18 Jul 2023 08:48:02 +0000 (+0900) Subject: Fix typo in function and variable names X-Git-Tag: accepted/tizen/unified/20230726.020702~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8425491e774f02244a889990a123098621e2148;p=platform%2Fcore%2Fuifw%2Fstt.git Fix typo in function and variable names Change-Id: I39bf65c30a2d95b8e4d10f97f77890140a88340d Signed-off-by: Suyeon Hwang --- diff --git a/tests/src/test_util.cpp b/tests/src/test_util.cpp index f52b074..865ca96 100644 --- a/tests/src/test_util.cpp +++ b/tests/src/test_util.cpp @@ -29,7 +29,7 @@ SttTestUtility::SttTestUtility() { mHandle = nullptr; mCurrentState = STT_STATE_CREATED; - mErrorOccured = false; + mErrorOccurred = false; mResultReceived = false; mErrorMessage = nullptr; @@ -61,7 +61,7 @@ void SttTestUtility::StateChangedCallback(stt_h tts, stt_state_e previous, stt_s void SttTestUtility::ErrorCallback(stt_h stt, stt_error_e reason, void *user_data) { auto instance = reinterpret_cast(user_data); - instance->mErrorOccured = true; + instance->mErrorOccurred = true; char *errorMessage = nullptr; ASSERT_EQ(stt_get_error_message(instance->mHandle, &errorMessage), STT_ERROR_NONE); @@ -103,7 +103,7 @@ void SttTestUtility::WaitUntilEngineTerminated(int duration) return !is_running; }; - WaitCondtion(engineChcker, duration); + WaitCondition(engineChcker, duration); } bool SttTestUtility::IsFeatureSupported() @@ -203,16 +203,16 @@ bool SttTestUtility::IsStateChanged(stt_state_e targetState, int duration) return target == instance->mCurrentState; }, this, targetState); - return WaitCondtion(stateChecker, duration); + return WaitCondition(stateChecker, duration); } bool SttTestUtility::IsErrorOccurring(int duration) { auto errorChecker = std::bind([](SttTestUtility *instance) { - return instance->mErrorOccured; + return instance->mErrorOccurred; }, this); - return WaitCondtion(errorChecker, duration); + return WaitCondition(errorChecker, duration); } bool SttTestUtility::IsResultReceived(int duration) @@ -221,7 +221,7 @@ bool SttTestUtility::IsResultReceived(int duration) return instance->mResultReceived; }, this); - return WaitCondtion(resultChecker, duration); + return WaitCondition(resultChecker, duration); } bool SttTestUtility::Prepare() @@ -285,7 +285,7 @@ bool SttTestUtility::Cancel() } -bool SttTestUtility::WaitCondtion(std::function checker, int duration) +bool SttTestUtility::WaitCondition(std::function checker, int duration) { auto mainLoopQuitTimer = ecore_timer_add(static_cast(duration), [](void *data) -> Eina_Bool { ecore_main_loop_quit(); @@ -293,8 +293,8 @@ bool SttTestUtility::WaitCondtion(std::function checker, int duratio }, 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/test_util.h b/tests/src/test_util.h index dc9d185..84006f6 100644 --- a/tests/src/test_util.h +++ b/tests/src/test_util.h @@ -63,7 +63,7 @@ public: stt_h mHandle; stt_state_e mCurrentState; - bool mErrorOccured; + bool mErrorOccurred; bool mResultReceived; char *mErrorMessage; @@ -71,7 +71,7 @@ public: size_t mPCMSize; private: - static bool WaitCondtion(std::function checker, int duration); + static bool WaitCondition(std::function checker, int duration); };