[UTC][capi-ui-gesture][ACR-1585][Add test case for supporting gesture recognition] 91/242191/3
authorSungwook Park <sungwook79.park@samsung.com>
Tue, 25 Aug 2020 01:42:15 +0000 (10:42 +0900)
committerSungwook Park <sungwook79.park@samsung.com>
Thu, 27 Aug 2020 01:23:39 +0000 (10:23 +0900)
Change-Id: I679e4d709eae26d14e8f1b5b1452d57d3bca86f6
Signed-off-by: Sungwook Park <sungwook79.park@samsung.com>
packaging/utc/core-capi-ui-gesture-tests.spec [new file with mode: 0755]
packaging/utc/core-capi-ui-gesture-tests.xml [new file with mode: 0755]
src/utc/capi-ui-gesture/CMakeLists.txt [new file with mode: 0755]
src/utc/capi-ui-gesture/public.list [new file with mode: 0755]
src/utc/capi-ui-gesture/tct-capi-ui-gesture-core.c [new file with mode: 0755]
src/utc/capi-ui-gesture/tct-capi-ui-gesture-core_wearable.h [new file with mode: 0755]
src/utc/capi-ui-gesture/utc-capi-ui-gesture.c [new file with mode: 0755]
tct_unsupported.txt

diff --git a/packaging/utc/core-capi-ui-gesture-tests.spec b/packaging/utc/core-capi-ui-gesture-tests.spec
new file mode 100755 (executable)
index 0000000..a8fa277
--- /dev/null
@@ -0,0 +1,78 @@
+%define MODULE_NAME capi-ui-gesture
+%define MODULE_LIBNAME capi-ui-gesture
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires: pkgconfig(%{MODULE_LIBNAME})
+BuildRequires: pkgconfig(bundle)
+BuildRequires: cmake
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(glib-2.0)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+%if %{?ASAN_BUILD:1}0
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="tizeniot" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+%else
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="tizeniot" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+%endif
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/usr/share/license
+cp LICENSE %{buildroot}/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+mkdir -p %{buildroot}/usr/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/usr/share/packages/
+mkdir -p %{buildroot}/usr/apps/%{name}/bin
+#cp templates/external_wrapper.sh %{buildroot}/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/usr/apps/%{name}/*
+/usr/share/packages/%{name}.xml
+/usr/share/license/%{name}
diff --git a/packaging/utc/core-capi-ui-gesture-tests.xml b/packaging/utc/core-capi-ui-gesture-tests.xml
new file mode 100755 (executable)
index 0000000..39108cf
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-capi-ui-gesture-tests" version="0.1.0" install-location="internal-only" api-version="6.0">
+    <label>CoreCapiUiGestureTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.capi-ui-gesture-tests" exec="/usr/apps/core-capi-ui-gesture-tests/bin/tct-capi-ui-gesture-core" nodisplay="false" multiple="false" type="capp" taskmanage="true">
+    <background-category value="background-network"/>
+       <background-category value="download"/>
+       <background-category value="iot-communication"/>
+       <background-category value="location"/>
+       <background-category value="media"/>
+       <background-category value="sensor"/>
+    </ui-application>
+    <privileges>
+       <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+       <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+    </privileges>
+</manifest>
diff --git a/src/utc/capi-ui-gesture/CMakeLists.txt b/src/utc/capi-ui-gesture/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..44a0760
--- /dev/null
@@ -0,0 +1,40 @@
+SET(PKG_NAME "capi-ui-gesture")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-ui-gesture-client")
+SET(TC_SOURCES
+    utc-capi-ui-gesture.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+    ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       capi-system-info
+    bundle
+    dlog elementary
+)
+
+INCLUDE_DIRECTORIES(
+    ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+    ${${CAPI_LIB}_LIBRARIES}
+    bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+    DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+IF( DEFINED ASAN )
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -pie -g -fsanitize=address -fsanitize-recover=address -U_FORTIFY_SOURCE -fno-omit-frame-pointer")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -Wl,-fsanitize=address")
+ELSE()
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+ENDIF()
diff --git a/src/utc/capi-ui-gesture/public.list b/src/utc/capi-ui-gesture/public.list
new file mode 100755 (executable)
index 0000000..fee263a
--- /dev/null
@@ -0,0 +1,9 @@
+hand_gesture_is_supported_type
+hand_gesture_create
+hand_gesture_destroy
+hand_gesture_set_option
+hand_gesture_start_recognition
+hand_gesture_stop_recognition
+hand_gesture_get_engine_info
+hand_gesture_set_error_cb
+hand_gesture_unset_error_cb
diff --git a/src/utc/capi-ui-gesture/tct-capi-ui-gesture-core.c b/src/utc/capi-ui-gesture/tct-capi-ui-gesture-core.c
new file mode 100755 (executable)
index 0000000..9d58cc7
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2020 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <stdio.h>
+#include <string.h>
+#include "tct_common.h"
+#include <bundle.h>
+
+#ifdef WEARABLE
+#include "tct-capi-ui-gesture-core_wearable.h"
+#endif
+
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+#include <Elementary.h>
+
+typedef struct appdata {
+       Evas_Object *win;
+       Evas_Object *conform;
+       Evas_Object *label;
+} appdata_s;
+
+static bool app_create(void *data)
+{
+       return true;
+}
+
+static void app_control(app_control_h app_control, void *data)
+{
+       char* pszGetTCName = NULL;
+       int i=0, result=0, nRet=0;
+       nRet = app_control_get_extra_data(app_control, "testcase_name", &pszGetTCName);
+       if(nRet != APP_CONTROL_ERROR_NONE)
+       {
+               dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] app_control_get_extra_data returns error = %d", __FUNCTION__, __LINE__, nRet);
+               PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to fetch test case name: app_control_get_extra_data API call fails\\n", __FILE__, __LINE__);
+               PRINT_TC_RESULT("%d",1);
+               FREE_MEMORY_TC(pszGetTCName);
+               return;
+       }
+
+       dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, pszGetTCName);
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( 0 == strncmp(pszGetTCName, tc_array[i].name, strlen(pszGetTCName)) )
+               {
+                       DUMP_UTC_ERRLOG();
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup begin", pszGetTCName);
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup end", pszGetTCName);
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body begin", pszGetTCName);
+                       result = tc_array[i].function();
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s returns value = %d", pszGetTCName, result);
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body end", pszGetTCName);
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup begin", pszGetTCName);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup end", pszGetTCName);
+
+                       CLOSE_UTC_ERRLOG();
+                       PRINT_TC_RESULT("%d",result);
+                       FREE_MEMORY_TC(pszGetTCName);
+                       return;
+               }
+       }
+
+       dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] Unable to execute %s : Unknown Test Case Name", __FUNCTION__, __LINE__, pszGetTCName);
+       PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to execute %s : Unknown Test Case Name\\n", __FILE__, __LINE__, pszGetTCName);
+       PRINT_TC_RESULT("%d",1);
+       FREE_MEMORY_TC(pszGetTCName);
+       return;
+}
+
+static void app_terminate(void *data)
+{
+       dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is now Terminating", __FUNCTION__, __LINE__);
+}
+
+int main(int argc, char *argv[])
+{
+       int ret = 0;
+       appdata_s ad = {0,};
+
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       event_callback.terminate = app_terminate;
+       event_callback.app_control = app_control;
+
+       //setting gcda file location for coverage
+       setenv("GCOV_PREFIX","/tmp",1);
+       dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Coverage *.gcda File location set to /tmp/home/abuild/rpmbuild/BUILD/ ", __FUNCTION__, __LINE__);
+
+       dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Main Function is Invoked", __FUNCTION__, __LINE__);
+       ret = ui_app_main(argc, argv, &event_callback, &ad);
+       if (ret != APP_ERROR_NONE)
+       {
+               dlog_print(DLOG_ERROR, "NativeTCT", "Application ui_app_main call gets failed. err = %d", ret);
+               PRINT_UTC_LOG("\\n[%s][Line : %d]Application ui_app_main call gets failed. err = %d\\n", __FILE__, __LINE__, ret);
+               PRINT_TC_RESULT("%d",1);
+               return ret;
+       }
+
+       dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is Terminated", __FUNCTION__, __LINE__);
+       return ret;
+}
diff --git a/src/utc/capi-ui-gesture/tct-capi-ui-gesture-core_wearable.h b/src/utc/capi-ui-gesture/tct-capi-ui-gesture-core_wearable.h
new file mode 100755 (executable)
index 0000000..c52c752
--- /dev/null
@@ -0,0 +1,66 @@
+//
+// Copyright (c) 2020 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAPI-UI-GESTURE-NATIVE_H__
+#define __TCT_CAPI-UI-GESTURE-NATIVE_H__
+
+#include "testcase.h"
+#include "tct_common.h"
+
+extern void utc_capi_ui_gesture_startup(void);
+extern void utc_capi_ui_gesture_cleanup(void);
+
+extern int utc_hand_gesture_is_supported_type_p(void);
+extern int utc_hand_gesture_is_supported_type_n(void);
+extern int utc_hand_gesture_create_p(void);
+extern int utc_hand_gesture_create_n(void);
+extern int utc_hand_gesture_destroy_p(void);
+extern int utc_hand_gesture_destroy_n(void);
+extern int utc_hand_gesture_set_option_p(void);
+extern int utc_hand_gesture_set_option_n(void);
+extern int utc_hand_gesture_start_recognition_p(void);
+extern int utc_hand_gesture_start_recognition_n(void);
+extern int utc_hand_gesture_stop_recognition_p(void);
+extern int utc_hand_gesture_stop_recognition_n(void);
+extern int utc_hand_gesture_get_engine_info_p(void);
+extern int utc_hand_gesture_get_engine_info_n(void);
+extern int utc_hand_gesture_set_error_cb_p(void);
+extern int utc_hand_gesture_set_error_cb_n(void);
+extern int utc_hand_gesture_unset_error_cb_p(void);
+extern int utc_hand_gesture_unset_error_cb_n(void);
+
+testcase tc_array[] = {
+       {"utc_hand_gesture_is_supported_type_p",utc_hand_gesture_is_supported_type_p,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_is_supported_type_n",utc_hand_gesture_is_supported_type_n,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_create_p",utc_hand_gesture_create_p,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_create_n",utc_hand_gesture_create_n,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_destroy_p",utc_hand_gesture_destroy_p,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_destroy_n",utc_hand_gesture_destroy_n,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_set_option_p",utc_hand_gesture_set_option_p,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_set_option_n",utc_hand_gesture_set_option_n,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_start_recognition_p",utc_hand_gesture_start_recognition_p,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_start_recognition_n",utc_hand_gesture_start_recognition_n,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_stop_recognition_p",utc_hand_gesture_stop_recognition_p,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_stop_recognition_n",utc_hand_gesture_stop_recognition_n,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_get_engine_info_p",utc_hand_gesture_get_engine_info_p,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_get_engine_info_n",utc_hand_gesture_get_engine_info_n,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_set_error_cb_p",utc_hand_gesture_set_error_cb_p,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_set_error_cb_n",utc_hand_gesture_set_error_cb_n,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_unset_error_cb_p",utc_hand_gesture_unset_error_cb_p,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {"utc_hand_gesture_unset_error_cb_n",utc_hand_gesture_unset_error_cb_n,utc_capi_ui_gesture_startup,utc_capi_ui_gesture_cleanup},
+       {NULL, NULL}
+};
+
+#endif // __TCT_CAPI-UI-GESTURE-NATIVE_H__
diff --git a/src/utc/capi-ui-gesture/utc-capi-ui-gesture.c b/src/utc/capi-ui-gesture/utc-capi-ui-gesture.c
new file mode 100755 (executable)
index 0000000..ac929f6
--- /dev/null
@@ -0,0 +1,320 @@
+//
+// Copyright (c) 2020 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <string.h>
+#include <gesture.h>
+#include <gesture_common.h>
+
+
+/**
+ * @function           utc_capi_ui_gesture_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return             NA
+ */
+void utc_capi_ui_gesture_startup(void)
+{
+}
+
+/**
+ * @function           utc_capi_ui_gesture_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return             NA
+ */
+void utc_capi_ui_gesture_cleanup(void)
+{
+}
+
+
+static void gesture_cb(hand_gesture_h handle, hand_gesture_type_e gesture, double timestamp, hand_gesture_error_e error, void *user_data)
+{
+}
+
+static void gesture_error_cb(hand_gesture_h handle, hand_gesture_error_e error, const char* msg, void *user_data)
+{
+}
+
+
+/**
+ * @testcase           utc_hand_gesture_is_supported_type_p
+ * @since_tizen                6.0
+ * @description                Positive UTC of the function that checks whether the gesture is supported or not.
+ */
+int utc_hand_gesture_is_supported_type_p(void)
+{
+    int ret = 0;
+    bool supported = true;
+    hand_gesture_h handle = NULL;
+    ret = hand_gesture_create(&handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+
+    ret = hand_gesture_is_supported_type(handle, HAND_GESTURE_WRIST_UP, &supported);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_create_p
+ * @since_tizen                6.0
+ * @description                Positive UTC of the function that request to create a gesture handle.
+ */
+int utc_hand_gesture_create_p(void)
+{
+    int ret = 0;
+    hand_gesture_h handle = NULL;
+    ret = hand_gesture_create(&handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_destroy_p
+ * @since_tizen                6.0
+ * @description                Positive UTC of the function that request to destroy a gesture handle.
+ */
+int utc_hand_gesture_destroy_p(void)
+{
+    int ret = 0;
+    hand_gesture_h handle = NULL;
+    ret = hand_gesture_create(&handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+
+    ret = hand_gesture_destroy(handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_set_option_p
+ * @since_tizen                6.0
+ * @description                Positive UTC of the function that set option for gesture engine.
+ */
+int utc_hand_gesture_set_option_p(void)
+{
+    int ret = 0;
+    hand_gesture_h handle = NULL;
+    ret = hand_gesture_create(&handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+
+    ret = hand_gesture_set_option(handle, HAND_GESTURE_OPTION_DEFAULT);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_start_recognition_p
+ * @since_tizen                6.0
+ * @description                Positive UTC of the function that request to start engine recognition for receiving gesture event.
+ */
+int utc_hand_gesture_start_recognition_p(void)
+{
+    int ret = 0;
+    hand_gesture_h handle = NULL;
+    ret = hand_gesture_create(&handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+
+    ret = hand_gesture_start_recognition(handle, HAND_GESTURE_WRIST_UP, gesture_cb, NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_stop_recognition_p
+ * @since_tizen                6.0
+ * @description                Positive UTC of the function that request to stop engine recognition.
+ */
+int utc_hand_gesture_stop_recognition_p(void)
+{
+    int ret = 0;
+    hand_gesture_h handle = NULL;
+    ret = hand_gesture_create(&handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+
+    ret = hand_gesture_stop_recognition(handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_get_engine_info_p
+ * @since_tizen                6.0
+ * @description                Positive UTC of the function that request to get a current active engine information.
+ */
+int utc_hand_gesture_get_engine_info_p(void)
+{
+    int ret = 0;
+    hand_gesture_h handle = NULL;
+    ret = hand_gesture_create(&handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+
+    char *engine_app_id = "appid";
+    char *engine_name = "name";
+
+    ret = hand_gesture_get_engine_info(handle, &engine_app_id, &engine_name);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+    assert(engine_app_id);
+    assert(engine_name);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_set_error_cb_p
+ * @since_tizen                6.0
+ * @description                Positive UTC of the function that set error callback function.
+ */
+int utc_hand_gesture_set_error_cb_p(void)
+{
+    int ret = 0;
+    hand_gesture_h handle = NULL;
+    ret = hand_gesture_create(&handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+
+    ret = hand_gesture_set_error_cb(handle, gesture_error_cb, NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_unset_error_cb_p
+ * @since_tizen                6.0
+ * @description                Positive UTC of the function that unset error callback function.
+ */
+int utc_hand_gesture_unset_error_cb_p(void)
+{
+    int ret = 0;
+    hand_gesture_h handle = NULL;
+    ret = hand_gesture_create(&handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+
+    ret = hand_gesture_unset_error_cb(handle);
+    assert_eq(ret, HAND_GESTURE_ERROR_NONE);
+    return 0;
+}
+
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+
+
+
+/**
+ * @testcase           utc_hand_gesture_is_supported_type_n
+ * @since_tizen                6.0
+ * @description                Negative UTC of the function that checks whether the gesture is supported or not.
+ */
+int utc_hand_gesture_is_supported_type_n(void)
+{
+    int ret = hand_gesture_is_supported_type(NULL, HAND_GESTURE_WRIST_UP, NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_create_n
+ * @since_tizen                6.0
+ * @description                Negative UTC of the function that request to create a gesture handle.
+ */
+int utc_hand_gesture_create_n(void)
+{
+    int ret = hand_gesture_create(NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_destroy_n
+ * @since_tizen                6.0
+ * @description                Negative UTC of the function that request to destroy a gesture handle.
+ */
+int utc_hand_gesture_destroy_n(void)
+{
+    int ret = hand_gesture_destroy(NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_set_option_n
+ * @since_tizen                6.0
+ * @description                Negative UTC of the function that set option for gesture engine.
+ */
+int utc_hand_gesture_set_option_n(void)
+{
+    int ret = hand_gesture_set_option(NULL, HAND_GESTURE_OPTION_DEFAULT);
+    assert_eq(ret, HAND_GESTURE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_start_recognition_n
+ * @since_tizen                6.0
+ * @description                Negative UTC of the function that request to start engine recognition for receiving gesture event.
+ */
+int utc_hand_gesture_start_recognition_n(void)
+{
+    int ret = hand_gesture_start_recognition(NULL, HAND_GESTURE_WRIST_UP, NULL, NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_stop_recognition_n
+ * @since_tizen                6.0
+ * @description                Negative UTC of the function that request to stop engine recognition.
+ */
+int utc_hand_gesture_stop_recognition_n(void)
+{
+    int ret = hand_gesture_stop_recognition(NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_get_engine_info_n
+ * @since_tizen                6.0
+ * @description                Negative UTC of the function that request to get a current active engine information.
+ */
+int utc_hand_gesture_get_engine_info_n(void)
+{
+    int ret = hand_gesture_get_engine_info(NULL, NULL, NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_set_error_cb_n
+ * @since_tizen                6.0
+ * @description                Negative UTC of the function that set error callback function.
+ */
+int utc_hand_gesture_set_error_cb_n(void)
+{
+    int ret = hand_gesture_set_error_cb(NULL, NULL, NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @testcase           utc_hand_gesture_unset_error_cb_n
+ * @since_tizen                6.0
+ * @description                Negative UTC of the function that unset error callback function.
+ */
+int utc_hand_gesture_unset_error_cb_n(void)
+{
+    int ret = hand_gesture_unset_error_cb(NULL);
+    assert_eq(ret, HAND_GESTURE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
index c85b684d2449a121ed079ae00801b9c64688c6e1..662d98c266bf63c72c915a44ab21055437a7265b 100755 (executable)
@@ -40,6 +40,10 @@ mobile:x86:utc:battery-monitor;
 mobile:x86_64:utc:battery-monitor;
 mobile:armv7l:utc:ui-viewmgr;
 mobile:aarch64:utc:ui-viewmgr;
+mobile:armv7l:utc:capi-ui-gesture;
+mobile:aarch64:utc:capi-ui-gesture;
+mobile:x86:utc:capi-ui-gesture;
+mobile:x86_64:utc:capi-ui-gesture;
 
 ## itc ##
 mobile:armv7l:itc:appcore-watch;
@@ -64,6 +68,10 @@ mobile:armv7l:itc:battery-monitor;
 mobile:aarch64:itc:battery-monitor;
 mobile:x86:itc:battery-monitor;
 mobile:x86_64:itc:battery-monitor;
+mobile:armv7l:itc:capi-ui-gesture;
+mobile:aarch64:itc:capi-ui-gesture;
+mobile:x86:itc:capi-ui-gesture;
+mobile:x86_64:itc:capi-ui-gesture;
 
 ## ctc ##
 
@@ -201,6 +209,10 @@ wearable:armv7l:itc:usb-host;
 wearable:aarch64:itc:usb-host;
 wearable:x86:itc:usb-host;
 wearable:x86_64:itc:usb-host;
+wearable:armv7l:itc:capi-ui-gesture;
+wearable:aarch64:itc:capi-ui-gesture;
+wearable:x86:itc:capi-ui-gesture;
+wearable:x86_64:itc:capi-ui-gesture;
 
 ## ctc ##
 wearable:armv7l:ctc:video-util;
@@ -215,6 +227,11 @@ wearable:armv7l:ctc:vulkan;
 wearable:aarch64:ctc:vulkan;
 wearable:x86:ctc:vulkan;
 wearable:x86_64:ctc:vulkan;
+wearable:armv7l:ctc:capi-ui-gesture;
+wearable:aarch64:ctc:capi-ui-gesture;
+wearable:x86:ctc:capi-ui-gesture;
+wearable:x86_64:ctc:capi-ui-gesture;
+
 
 ##################
 #### tizeniot ####
@@ -241,6 +258,10 @@ tizeniot:armv7l:utc:ui-viewmgr;
 tizeniot:aarch64:utc:ui-viewmgr;
 tizeniot:x86:utc:ui-viewmgr;
 tizeniot:x86_64:utc:ui-viewmgr;
+tizeniot:armv7l:utc:capi-ui-gesture;
+tizeniot:aarch64:utc:capi-ui-gesture;
+tizeniot:x86:utc:capi-ui-gesture;
+tizeniot:x86_64:utc:capi-ui-gesture;
 
 ## itc ##
 tizeniot:armv7l:itc:appcore-watch;
@@ -259,6 +280,10 @@ tizeniot:armv7l:itc:battery-monitor;
 tizeniot:aarch64:itc:battery-monitor;
 tizeniot:x86:itc:battery-monitor;
 tizeniot:x86_64:itc:battery-monitor;
+tizeniot:armv7l:itc:capi-ui-gesture;
+tizeniot:aarch64:itc:capi-ui-gesture;
+tizeniot:x86:itc:capi-ui-gesture;
+tizeniot:x86_64:itc:capi-ui-gesture;
 
 ## ctc ##
 tizeniot:armv7l:ctc:platform-permission;
@@ -277,3 +302,7 @@ tizeniot:armv7l:ctc:vulkan;
 tizeniot:aarch64:ctc:vulkan;
 tizeniot:x86:ctc:vulkan;
 tizeniot:x86_64:ctc:vulkan;
+tizeniot:armv7l:ctc:capi-ui-gesture;
+tizeniot:aarch64:ctc:capi-ui-gesture;
+tizeniot:x86:ctc:capi-ui-gesture;
+tizeniot:x86_64:ctc:capi-ui-gesture;