Fix typo in function and variable names 63/296663/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Tue, 18 Jul 2023 08:54:13 +0000 (17:54 +0900)
committerTizen AI <ai.tzn.sec@samsung.com>
Thu, 3 Aug 2023 01:46:05 +0000 (10:46 +0900)
Change-Id: I7a1c67d688c0903064ccb539e72477a4205b9b04
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
tests/src/vc_common_test_util.cpp
tests/src/vc_common_test_util.h
tests/src/vc_mgr_test_util.cpp
tests/src/vc_mgr_test_util.h
tests/src/vc_test_util.cpp
tests/src/vc_test_util.h

index a230eba..4ab7867 100644 (file)
@@ -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<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();
@@ -169,8 +169,8 @@ bool VcCommonTestUtility::WaitCondtion(std::function<bool(void)> checker, int du
        }, 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;
                }
 
index c37c1ac..70fac59 100644 (file)
@@ -39,7 +39,7 @@ public:
        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);
 };
 
 
index db17219..009f342 100644 (file)
@@ -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<VcMgrTestUtility *>(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()
index c0db4ad..5dc2267 100644 (file)
@@ -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;
index b150f73..ed836b5 100644 (file)
@@ -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<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)
@@ -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()
index 4de8dc8..7ca3e5f 100644 (file)
@@ -51,7 +51,7 @@ public:
        vc_state_e mCurrentState;
        vc_service_state_e mCurrentServiceState;
 
-       bool mErrorOccured;
+       bool mErrorOccurred;
        bool mResultReceived;
        bool mLanguageChanged;