+++ /dev/null
-%define MODULE_NAME cairo
-%define MODULE_LIBNAME cairo
-Name: native-%{MODULE_NAME}-itc
-Summary: Native API Integration TC (%{name})
-Version: 0.1
-Release: 0
-Group: Development/Tools
-License: Apache-2.0
-Source0: %{name}-%{version}.tar.gz
-BuildRequires: pkgconfig(%{MODULE_LIBNAME})
-BuildRequires: pkgconfig(capi-appfw-application)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: cmake
-BuildRequires: pkgconfig(bundle)
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(gobject-2.0)
-BuildRequires: pkgconfig(capi-base-common)
-BuildRequires: pkgconfig(cairo)
-BuildRequires: pkgconfig(evas)
-BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(capi-system-info)
-
-%description
-Native API Integration 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="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_TV:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tizeniot" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
-%else
- %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_TV:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
- %endif
- %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0
- cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -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}/usr/share/packages/
-cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/usr/share/packages/
-mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
-#cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
-%post
-
-%postun
-
-
-%files
-%{APP_PATH}%{name}/*
-/usr/share/packages/native-%{MODULE_NAME}-itc.xml
-/usr/share/license/%{name}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="native-cairo-itc" version="0.1.0" install-location="internal-only" api-version="6.0">
- <label>CoreCairoTest</label>
- <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
- <description>Native API test Application</description>
- <ui-application appid="native.cairo-itc" exec="/usr/apps/native-cairo-itc/bin/tct-cairo-native" 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>
-</manifest>
+++ /dev/null
-%define MODULE_NAME cairo
-%define MODULE_LIBNAME cairo
-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, Samsung Properietary
-Source0: %{name}-%{version}.tar.gz
-BuildRequires: pkgconfig(%{MODULE_LIBNAME})
-BuildRequires: pkgconfig(bundle)
-BuildRequires: pkgconfig(cairo)
-BuildRequires: pkgconfig(evas)
-BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: cmake
-BuildRequires: pkgconfig(capi-appfw-application)
-BuildRequires: pkgconfig(capi-system-info)
-%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}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="core-cairo-tests" version="0.1.0" api-version="6.0">
- <label>CoreCairoTest</label>
- <author email="test@samsung.com" href="www.samsung.com">test</author>
- <description>Core API test Application</description>
- <ui-application appid="core.cairo-tests" exec="/usr/apps/core-cairo-tests/bin/tct-cairo-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>
-</manifest>
+++ /dev/null
-SET(PKG_NAME "cairo")
-
-SET(EXEC_NAME "tct-${PKG_NAME}-native")
-SET(RPM_NAME "native-${PKG_NAME}-itc")
-
-SET(CAPI_LIB "cairo")
-SET(TC_SOURCES
- ITs-cairo-common.c
- ITs-cairo.c
-)
-
-PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
- ${CAPI_LIB}
- capi-appfw-application
- bundle
- capi-base-common
- dlog
- gthread-2.0
- glib-2.0
- gobject-2.0
- cairo
- evas
- capi-system-info
-)
-
-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()
+++ /dev/null
-//
-// Copyright (c) 2014 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 "ITs-cairo-common.h"
-
-//Add helper function definitions here
-/**
- * @function CairoGetError
- * @description Maps error enums to string values
- * @parameter nRet : error code returned
- * @return error string
- */
-char* CairoGetError(int nRet)
-{
- char *pszErrorVal = NULL;
- switch ( nRet )
- {
- case CAIRO_STATUS_SUCCESS:
- pszErrorVal = "CAIRO_STATUS_SUCCESS";
- break;
- case CAIRO_STATUS_NO_MEMORY:
- pszErrorVal = "CAIRO_STATUS_NO_MEMORY";
- break;
- case CAIRO_STATUS_INVALID_RESTORE:
- pszErrorVal = "CAIRO_STATUS_INVALID_RESTORE";
- break;
- case CAIRO_STATUS_INVALID_POP_GROUP:
- pszErrorVal = "CAIRO_STATUS_INVALID_POP_GROUP";
- break;
- case CAIRO_STATUS_NO_CURRENT_POINT:
- pszErrorVal = "CAIRO_STATUS_NO_CURRENT_POINT";
- break;
- case CAIRO_STATUS_INVALID_MATRIX:
- pszErrorVal = "CAIRO_STATUS_INVALID_MATRIX";
- break;
- case CAIRO_STATUS_INVALID_STATUS:
- pszErrorVal = "CAIRO_STATUS_INVALID_STATUS";
- break;
- case CAIRO_STATUS_NULL_POINTER:
- pszErrorVal = "CAIRO_STATUS_NULL_POINTER";
- break;
- case CAIRO_STATUS_INVALID_STRING:
- pszErrorVal = "CAIRO_STATUS_INVALID_STRING";
- break;
- case CAIRO_STATUS_INVALID_PATH_DATA:
- pszErrorVal = "CAIRO_STATUS_INVALID_PATH_DATA";
- break;
- case CAIRO_STATUS_READ_ERROR:
- pszErrorVal = "CAIRO_STATUS_READ_ERROR";
- break;
- case CAIRO_STATUS_WRITE_ERROR:
- pszErrorVal = "CAIRO_STATUS_WRITE_ERROR";
- break;
- case CAIRO_STATUS_SURFACE_FINISHED:
- pszErrorVal = "CAIRO_STATUS_SURFACE_FINISHED";
- break;
- case CAIRO_STATUS_SURFACE_TYPE_MISMATCH:
- pszErrorVal = "CAIRO_STATUS_SURFACE_TYPE_MISMATCH";
- break;
- case CAIRO_STATUS_PATTERN_TYPE_MISMATCH:
- pszErrorVal = "CAIRO_STATUS_PATTERN_TYPE_MISMATCH";
- break;
- case CAIRO_STATUS_INVALID_CONTENT:
- pszErrorVal = "CAIRO_STATUS_INVALID_CONTENT";
- break;
- case CAIRO_STATUS_INVALID_FORMAT:
- pszErrorVal = "CAIRO_STATUS_INVALID_FORMAT";
- break;
- case CAIRO_STATUS_INVALID_VISUAL:
- pszErrorVal = "CAIRO_STATUS_INVALID_VISUAL";
- break;
- case CAIRO_STATUS_FILE_NOT_FOUND:
- pszErrorVal = "CAIRO_STATUS_FILE_NOT_FOUND";
- break;
- case CAIRO_STATUS_INVALID_DASH:
- pszErrorVal = "CAIRO_STATUS_INVALID_DASH";
- break;
- case CAIRO_STATUS_INVALID_DSC_COMMENT:
- pszErrorVal = "CAIRO_STATUS_INVALID_DSC_COMMENT";
- break;
- case CAIRO_STATUS_INVALID_INDEX:
- pszErrorVal = "CAIRO_STATUS_INVALID_INDEX";
- break;
- case CAIRO_STATUS_CLIP_NOT_REPRESENTABLE:
- pszErrorVal = "CAIRO_STATUS_CLIP_NOT_REPRESENTABLE";
- break;
- case CAIRO_STATUS_TEMP_FILE_ERROR:
- pszErrorVal = "CAIRO_STATUS_TEMP_FILE_ERROR";
- break;
- case CAIRO_STATUS_INVALID_STRIDE:
- pszErrorVal = "CAIRO_STATUS_INVALID_STRIDE";
- break;
- case CAIRO_STATUS_FONT_TYPE_MISMATCH:
- pszErrorVal = "CAIRO_STATUS_FONT_TYPE_MISMATCH";
- break;
- case CAIRO_STATUS_USER_FONT_IMMUTABLE:
- pszErrorVal = "CAIRO_STATUS_USER_FONT_IMMUTABLE";
- break;
- case CAIRO_STATUS_USER_FONT_ERROR:
- pszErrorVal = "CAIRO_STATUS_USER_FONT_ERROR";
- break;
- case CAIRO_STATUS_NEGATIVE_COUNT:
- pszErrorVal = "CAIRO_STATUS_NEGATIVE_COUNT";
- break;
- case CAIRO_STATUS_INVALID_CLUSTERS:
- pszErrorVal = "CAIRO_STATUS_INVALID_CLUSTERS";
- break;
- case CAIRO_STATUS_INVALID_SLANT:
- pszErrorVal = "CAIRO_STATUS_INVALID_SLANT";
- break;
- case CAIRO_STATUS_INVALID_WEIGHT:
- pszErrorVal = "CAIRO_STATUS_INVALID_WEIGHT";
- break;
- case CAIRO_STATUS_INVALID_SIZE:
- pszErrorVal = "CAIRO_STATUS_INVALID_SIZE";
- break;
- case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED:
- pszErrorVal = "CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED";
- break;
- case CAIRO_STATUS_DEVICE_TYPE_MISMATCH:
- pszErrorVal = "CAIRO_STATUS_DEVICE_TYPE_MISMATCH";
- break;
- case CAIRO_STATUS_DEVICE_ERROR:
- pszErrorVal = "CAIRO_STATUS_DEVICE_ERROR";
- break;
- case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION:
- pszErrorVal = "CAIRO_STATUS_INVALID_MESH_CONSTRUCTION";
- break;
- case CAIRO_STATUS_DEVICE_FINISHED:
- pszErrorVal = "CAIRO_STATUS_DEVICE_FINISHED";
- break;
- case CAIRO_STATUS_LAST_STATUS:
- pszErrorVal = "CAIRO_STATUS_LAST_STATUS";
- break;
- default:
- pszErrorVal = "Unknown Error";
- break;
- }
-
- return pszErrorVal;
-}
+++ /dev/null
-//
-// Copyright (c) 2014 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 _ITS_CAIRO_COMMON_H_
-#define _ITS_CAIRO_COMMON_H_
-#include "tct_common.h"
-#include <cairo.h>
-#include <cairo-evas-gl.h>
-#include <Evas_GL.h>
-#include <Elementary.h>
-#include <stdbool.h>
-#include <system_info.h>
-#include <tizen.h>
-
-//Add test package related includes here
-#define API_NAMESPACE "ITC_Cairo"
-#define WIDTH 300
-#define HEIGHT 300
-#define CAIRO_FEATURE "http://tizen.org/feature/opengles.version.2_0"
-
-#define START_TEST {\
- FPRINTF("[Line No : %d][%s]Starting test : %s\\n", __LINE__,API_NAMESPACE, __FUNCTION__);\
- if (!g_nEvas_state) {\
- FPRINTF("[Line No : %d][%s] Precondition failed in startup \\n", __LINE__,API_NAMESPACE);\
- return 1;\
- }\
- CHECK_FEATURE;\
-}
-
-#define PRINT_RESULT_CAIRO(nRetVal, API, bIsSupported) {\
- if(!bIsSupported) {\
- if (nRetVal == TIZEN_ERROR_NOT_SUPPORTED)\
- {\
- FPRINTF( "[Line : %d] [%s] %s passed \\n",__LINE__, API_NAMESPACE, API);\
- return 0;\
- }\
- else {\
- FPRINTF( " [Line : %d] [%s] %s failed. Mismatch in value. Expected = TIZEN_ERROR_NOT_SUPPORTED, returned = %s \\n",__LINE__, API_NAMESPACE, API, CairoGetError(nRetVal));\
- return 1;\
- }\
- }\
- if (nRetVal == CAIRO_STATUS_SUCCESS)\
- {\
- FPRINTF( " [Line : %d] [%s] %s passed\\n",__LINE__, API_NAMESPACE, API);\
- }\
- else \
- {\
- FPRINTF( " [Line : %d] [%s] %s failed, error returned = %s \\n",__LINE__, API_NAMESPACE, API, CairoGetError(nRetVal));\
- return 1;\
- }\
-}
-
-#define CHECK_FEATURE {\
- bIsSupported = TCTCheckSystemInfoFeatureSupported(CAIRO_FEATURE, API_NAMESPACE);\
- if (!bIsSupported) {\
- FPRINTF(" [Line No : %d][%s] Feature : %s is not supported \\n", __LINE__,API_NAMESPACE, CAIRO_FEATURE);\
- }\
-}
-
-//Add helper function declarations here
-char* CairoGetError(int nRet);
-#endif //_ITS_CAIRO_COMMON_H_
+++ /dev/null
-//
-// Copyright (c) 2014 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 "ITs-cairo-common.h"
-
-Evas_Object *g_pWin;
-Evas_GL *g_pEvas_gl;
-Evas_GL_Config *g_pEvas_gl_config;
-Evas_GL_Surface *g_pEvas_gl_surface;
-Evas_GL_Context *g_pEvas_gl_context;
-cairo_device_t *g_pCairo_device = NULL;
-cairo_surface_t *g_pSurface = NULL;
-
-int g_nEvas_state = 1;
-
-//& set: Cairo
-
-/**
- * @function ITs_cairo_startup
- * @description Called before each test
- * @parameter NA
- * @return NA
- */
-void ITs_cairo_startup(void)
-{
- struct stat stBuff;
- if ( stat(ERR_LOG, &stBuff) == 0 )
- {
- remove(ERR_LOG);
- }
-
- g_nEvas_state = 1;
-
- elm_init(0,NULL);
- elm_config_accel_preference_set("opengl");
-
- g_pWin = elm_win_add(NULL, "test cairo", ELM_WIN_BASIC);
- if(g_pWin == NULL)
- {
- g_nEvas_state = 0;
- FPRINTF( " [Line : %d] [%s] elm_win_add failed, error returned = Handle is NULL \\n",__LINE__, API_NAMESPACE);
- }
- else
- {
- elm_win_title_set(g_pWin, "test cairo");
- evas_object_show(g_pWin);
-
- g_pEvas_gl = evas_gl_new(evas_object_evas_get(g_pWin));
- if(g_pEvas_gl == NULL)
- {
- g_nEvas_state = 0;
- FPRINTF( " [Line : %d] [%s] evas_gl_new failed, error returned = Handle is NULL \\n",__LINE__, API_NAMESPACE);
- }
-
- g_pEvas_gl_config = evas_gl_config_new();
- if(g_pEvas_gl_config == NULL)
- {
- g_nEvas_state = 0;
- FPRINTF( " [Line : %d] [%s] evas_gl_config_new failed, error returned = Handle is NULL \\n",__LINE__, API_NAMESPACE);
- }
- else
- {
- g_pEvas_gl_config->color_format = EVAS_GL_RGBA_8888;
- }
-
- if(g_nEvas_state)
- {
- g_pEvas_gl_surface = evas_gl_surface_create(g_pEvas_gl, g_pEvas_gl_config, WIDTH, HEIGHT);
- if(g_pEvas_gl_surface == NULL)
- {
- g_nEvas_state = 0;
- FPRINTF( " [Line : %d] [%s] evas_gl_surface_create failed, error returned = Handle is NULL \\n",__LINE__, API_NAMESPACE);
- }
-
- g_pEvas_gl_context = evas_gl_context_create(g_pEvas_gl, NULL);
- if(g_pEvas_gl_context == NULL)
- {
- g_nEvas_state = 0;
- FPRINTF( " [Line : %d] [%s] evas_gl_context_create failed, error returned = Handle is NULL \\n",__LINE__, API_NAMESPACE);
- }
- setenv("CAIRO_GL_COMPOSITOR", "msaa", 1);
- }
- }
- return;
-}
-
-
-/**
- * @function ITs_cairo_cleanup
- * @description Called after each test
- * @parameter NA
- * @return NA
- */
-void ITs_cairo_cleanup(void)
-{
-
- if(g_pSurface != NULL)
- {
- cairo_surface_destroy (g_pSurface);
- g_pSurface = NULL;
- }
-
- if(g_pCairo_device != NULL )
- {
- cairo_device_destroy(g_pCairo_device);
- g_pCairo_device = NULL;
- }
-
- if(g_pEvas_gl_surface != NULL )
- {
- evas_gl_make_current(g_pEvas_gl, NULL, NULL);
- evas_gl_surface_destroy(g_pEvas_gl, g_pEvas_gl_surface);
- g_pEvas_gl_surface = NULL;
- }
-
- if(g_pEvas_gl_context != NULL )
- {
- evas_gl_make_current(g_pEvas_gl, NULL, NULL);
- evas_gl_context_destroy(g_pEvas_gl, g_pEvas_gl_context);
- g_pEvas_gl_context = NULL;
- }
-
- if(g_pEvas_gl_config != NULL )
- {
- evas_gl_config_free(g_pEvas_gl_config);
- g_pEvas_gl_config = NULL;
- }
-
- if(g_pEvas_gl != NULL )
- {
- evas_gl_free(g_pEvas_gl);
- g_pEvas_gl = NULL;
- }
-
- if(g_pWin != NULL )
- {
- evas_object_del(g_pWin);
- g_pWin = NULL;
- }
-
- elm_shutdown();
-
- return;
-}
-
-//& purpose: Creates and returns a new cairo_device structure for interface to underlying rendering system.
-//& type: auto
-/**
- * @testcase ITc_cairo_evas_gl_device_create_p
- * @since_tizen 2.3.1
- * @author SRID(ajay.kr1)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Creates and returns a new cairo_device structure.
- * @scenario Creates and returns a new cairo_device.
- * @apicovered cairo_evas_gl_device_create
- * @passcase When cairo_evas_gl_device_create are execute successful and return 0
- * @failcase If target api cairo_evas_gl_device_create are return negative number.
- * @precondition NA
- * @postcondition NA
- *
- */
-int ITc_cairo_evas_gl_device_create_p(void)
-{
- bool bIsSupported = false;
- START_TEST;
- int nRetVal = -1;
-
- g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT_CAIRO(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
- return 0;
-}
-
-
-//& purpose: Creates and returns a new cairo_surface structure for representing Evas_GL_Surface object that cairo can render to.
-//& type: auto
-/**
- * @testcase ITc_cairo_gl_surface_create_for_evas_gl_p
- * @since_tizen 2.3.1
- * @author SRID(ajay.kr1)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Creates and returns a new cairo_surface structure.
- * @scenario Creates and returns a new cairo_surface.
- * @apicovered cairo_gl_surface_create_for_evas_gl
- * @passcase When cairo_gl_surface_create_for_evas_gl are execute successful and return 0
- * @failcase If target api cairo_gl_surface_create_for_evas_gl are return negative number.
- * @precondition cairo_evas_gl_device_create
- * @postcondition NA
- *
- */
-int ITc_cairo_gl_surface_create_for_evas_gl_p(void)
-{
- bool bIsSupported = false;
- START_TEST;
- int nRetVal = -1;
-
- g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT_CAIRO(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
-
- g_pSurface = (cairo_surface_t *)cairo_gl_surface_create_for_evas_gl(g_pCairo_device, g_pEvas_gl_surface, g_pEvas_gl_config, WIDTH, HEIGHT);
- nRetVal = cairo_surface_status(g_pSurface);
- PRINT_RESULT(CAIRO_STATUS_SUCCESS, nRetVal, "cairo_gl_surface_create_for_evas_gl", CairoGetError(nRetVal));
- return 0;
-}
-
-//& purpose: Returns the underlying EvasGL object used to create cairo device object.
-//& type: auto
-/**
- * @testcase ITc_cairo_evas_gl_device_get_gl_p
- * @since_tizen 2.3.1
- * @author SRID(ajay.kr1)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Returns the underlying EvasGL object used to create cairo device object.
- * @scenario Get underlying EvasGL object.
- * @apicovered cairo_evas_gl_device_get_gl
- * @passcase When cairo_evas_gl_device_get_gl executes successfully.
- * @failcase If target api cairo_evas_gl_device_get_gl returns NULL.
- * @precondition cairo_evas_gl_device_create
- * @postcondition NA
- *
- */
-int ITc_cairo_evas_gl_device_get_gl_p(void)
-{
- bool bIsSupported = false;
- START_TEST;
- int nRetVal = -1;
- Evas_GL *pRetEvasGl = NULL;
-
- g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT_CAIRO(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
-
- pRetEvasGl = cairo_evas_gl_device_get_gl(g_pCairo_device);
- CHECK_HANDLE(pRetEvasGl, "cairo_evas_gl_device_get_gl");
- return 0;
-}
-
-//& purpose: Returns the underlying Evasl_GL_Context object used to create cairo device object.
-//& type: auto
-/**
- * @testcase ITc_cairo_evas_gl_device_get_context_p
- * @since_tizen 2.3.1
- * @author SRID(ajay.kr1)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Returns the underlying Evasl_GL_Context object used to create cairo device object.
- * @scenario Get underlying Evasl_GL_Context object.
- * @apicovered cairo_evas_gl_device_get_context
- * @passcase When cairo_evas_gl_device_get_context executes successfully.
- * @failcase If target api cairo_evas_gl_device_get_context returns NULL.
- * @precondition cairo_evas_gl_device_create
- * @postcondition NA
- *
- */
-int ITc_cairo_evas_gl_device_get_context_p(void)
-{
- bool bIsSupported = false;
- START_TEST;
- int nRetVal = -1;
- Evas_GL_Context *pRetEvasGlContext;
-
- g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT_CAIRO(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
-
- pRetEvasGlContext = cairo_evas_gl_device_get_context(g_pCairo_device);
- CHECK_HANDLE(pRetEvasGlContext, "cairo_evas_gl_device_get_context");
- return 0;
-}
-
-//& purpose: Create a cairo GL surface using the device as the underlying rendering system
-//& type: auto
-/**
- * @testcase ITc_cairo_gl_surface_create_p
- * @since_tizen 2.3.1
- * @author SRID(ajay.kr1)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Create a cairo GL surface using the device as the underlying rendering system
- * @scenario Create a cairo GL surface
- * @apicovered cairo_evas_gl_device_create, cairo_gl_surface_create
- * @passcase When cairo_gl_surface_create are execute successful and return 0
- * @failcase If target api cairo_gl_surface_create returns negative number.
- * @precondition cairo_evas_gl_device_create
- * @postcondition NA
- *
- */
-int ITc_cairo_gl_surface_create_p(void)
-{
- bool bIsSupported = false;
- START_TEST;
- int nRetVal = -1;
-
- g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT_CAIRO(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
-
- g_pSurface = (cairo_surface_t *)cairo_gl_surface_create(g_pCairo_device, CAIRO_CONTENT_COLOR_ALPHA, WIDTH, HEIGHT);
- nRetVal = cairo_surface_status(g_pSurface);
- PRINT_RESULT(CAIRO_STATUS_SUCCESS, nRetVal, "cairo_gl_surface_create", CairoGetError(nRetVal));
-
- return 0;
-}
-
-//& purpose: Create a cairo GL surface using the texture as the render target, and the device as the underlying rendering system
-//& type: auto
-/**
- * @testcase ITc_cairo_gl_surface_create_for_texture_p
- * @since_tizen 2.3.1
- * @author SRID(ajay.kr1)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Create a cairo GL surface using the texture as the render target, and the device as the underlying rendering system
- * @scenario Create a cairo GL surface using the texture
- * @apicovered cairo_evas_gl_device_create, cairo_gl_surface_create_for_texture
- * @passcase When cairo_gl_surface_create_for_texture are execute successful and return 0
- * @failcase If target api cairo_gl_surface_create_for_texture returns negative number.
- * @precondition cairo_evas_gl_device_create
- * @postcondition NA
- *
- */
-int ITc_cairo_gl_surface_create_for_texture_p(void)
-{
- bool bIsSupported = false;
- START_TEST;
- int nRetVal = -1;
-
- g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT_CAIRO(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
-
- g_pSurface = (cairo_surface_t *)cairo_gl_surface_create_for_texture(g_pCairo_device, CAIRO_CONTENT_COLOR_ALPHA, 0, WIDTH, HEIGHT);
- nRetVal = cairo_surface_status(g_pSurface);
- PRINT_RESULT(CAIRO_STATUS_SUCCESS, nRetVal, "cairo_gl_surface_create_for_texture", CairoGetError(nRetVal));
-
- return 0;
-}
-
-//& purpose: Get width of given cairo surface object
-//& type: auto
-/**
- * @testcase ITc_cairo_gl_surface_get_width_p
- * @since_tizen 2.3.1
- * @author SRID(ajay.kr1)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Get width of given cairo surface object
- * @scenario Get width of given cairo surface object
- * @apicovered cairo_evas_gl_device_create, cairo_gl_surface_create, cairo_gl_surface_get_width
- * @passcase When cairo_gl_surface_get_width executes successfully and return the set width
- * @failcase If target api cairo_gl_surface_get_width returns value different than the set width value
- * @precondition cairo_evas_gl_device_create
- * @postcondition NA
- *
- */
-int ITc_cairo_gl_surface_get_width_p(void)
-{
- bool bIsSupported = false;
- START_TEST;
- int nRetVal = -1;
-
- g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create(g_pEvas_gl, g_pEvas_gl_context);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT_CAIRO(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
-
- g_pSurface = (cairo_surface_t *)cairo_gl_surface_create(g_pCairo_device, CAIRO_CONTENT_COLOR_ALPHA, WIDTH, HEIGHT);
- nRetVal = cairo_surface_status(g_pSurface);
- PRINT_RESULT(CAIRO_STATUS_SUCCESS, nRetVal, "cairo_gl_surface_create", CairoGetError(nRetVal));
-
- nRetVal = cairo_gl_surface_get_width(g_pSurface);
- if( nRetVal != WIDTH)
- {
- FPRINTF( " [Line : %d] [%s] cairo_gl_surface_get_width failed, width returned = %d \\n",__LINE__, API_NAMESPACE, nRetVal);
- return 1;
- }
-
- return 0;
-}
-
-//& purpose: Get height of given cairo surface object
-//& type: auto
-/**
- * @testcase ITc_cairo_gl_surface_get_height_p
- * @since_tizen 2.3.1
- * @author SRID(ajay.kr1)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Get height of given cairo surface object
- * @scenario Get height of given cairo surface object
- * @apicovered cairo_evas_gl_device_create, cairo_gl_surface_create, cairo_gl_surface_get_height
- * @passcase When cairo_gl_surface_get_height executes successfully and return the set height
- * @failcase If target api cairo_gl_surface_get_height returns value different than the set height value
- * @precondition cairo_evas_gl_device_create
- * @postcondition NA
- *
- */
-int ITc_cairo_gl_surface_get_height_p(void)
-{
- bool bIsSupported = false;
- START_TEST;
- int nRetVal = -1;
-
- g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create(g_pEvas_gl, g_pEvas_gl_context);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT_CAIRO(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
-
- g_pSurface = (cairo_surface_t *)cairo_gl_surface_create(g_pCairo_device, CAIRO_CONTENT_COLOR_ALPHA, WIDTH, HEIGHT);
- nRetVal = cairo_surface_status(g_pSurface);
- PRINT_RESULT(CAIRO_STATUS_SUCCESS, nRetVal, "cairo_gl_surface_create", CairoGetError(nRetVal));
-
- nRetVal = cairo_gl_surface_get_height(g_pSurface);
- if( nRetVal != HEIGHT)
- {
- FPRINTF( " [Line : %d] [%s] cairo_gl_surface_get_height failed, height returned = %d \\n",__LINE__, API_NAMESPACE, nRetVal);
- return 1;
- }
-
- return 0;
-}
-
-//& purpose: Cairo can be used in multithreaded environment
-//& type: auto
-/**
- * @testcase ITc_cairo_gl_device_set_thread_aware_p
- * @since_tizen 2.3.1
- * @author SRID(ajay.kr1)
- * @reviewer SRID(gupta.sanjay)
- * @type auto
- * @description Cairo can be used in multithreaded environment
- * @scenario Cairo used for multithreaded environment
- * @apicovered cairo_evas_gl_device_create, cairo_gl_device_set_thread_aware
- * @passcase When cairo_gl_device_set_thread_aware are execute successful and return 0
- * @failcase If target api cairo_gl_device_set_thread_aware returns negative number.
- * @precondition cairo_evas_gl_device_create
- * @postcondition NA
- *
- */
-int ITc_cairo_gl_device_set_thread_aware_p(void)
-{
- bool bIsSupported = false;
- START_TEST;
- int nRetVal = -1;
-
- g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT_CAIRO(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
-
- cairo_gl_device_set_thread_aware(g_pCairo_device, 0);
- nRetVal = cairo_device_status(g_pCairo_device);
- PRINT_RESULT(CAIRO_STATUS_SUCCESS, nRetVal, "cairo_gl_device_set_thread_aware", CairoGetError(nRetVal));
-
- return 0;
-}
+++ /dev/null
-//
-// Copyright (c) 2014 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"
-
-#ifdef MOBILE //Starts MOBILE
-#include "tct-cairo-native_mobile.h"
-#endif //MOBILE //End MOBILE
-
-#ifdef WEARABLE //Starts WEARABLE
-#include "tct-cairo-native_wearable.h"
-#endif //WEARABLE //End WEARABLE
-
-#ifdef TV //Starts TV
-#include "tct-cairo-native_tv.h"
-#endif //TV //End TV
-
-#ifdef TIZENIOT //Starts TIZENIOT
-#include "tct-cairo-native_tizeniot.h"
-#endif //TIZENIOT //End TIZENIOT
-
-
-#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 <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <errno.h>
-
-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)) )
- {
- 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);
-
- 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;
-
- 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, NULL);
- 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;
-}
+++ /dev/null
-//
-// Copyright (c) 2014 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_CAIRO-NATIVE_H__
-#define __TCT_CAIRO-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void ITs_cairo_startup(void);
-extern void ITs_cairo_cleanup(void);
-
-extern int ITc_cairo_evas_gl_device_create_p(void);
-extern int ITc_cairo_gl_surface_create_for_evas_gl_p(void);
-extern int ITc_cairo_evas_gl_device_get_gl_p(void);
-extern int ITc_cairo_evas_gl_device_get_context_p(void);
-extern int ITc_cairo_gl_surface_create_p(void);
-extern int ITc_cairo_gl_surface_create_for_texture_p(void);
-extern int ITc_cairo_gl_surface_get_width_p(void);
-extern int ITc_cairo_gl_surface_get_height_p(void);
-extern int ITc_cairo_gl_device_set_thread_aware_p(void);
-
-testcase tc_array[] = {
- {"ITc_cairo_evas_gl_device_create_p",ITc_cairo_evas_gl_device_create_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_for_evas_gl_p",ITc_cairo_gl_surface_create_for_evas_gl_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_evas_gl_device_get_gl_p",ITc_cairo_evas_gl_device_get_gl_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_evas_gl_device_get_context_p",ITc_cairo_evas_gl_device_get_context_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_p",ITc_cairo_gl_surface_create_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_for_texture_p",ITc_cairo_gl_surface_create_for_texture_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_get_width_p",ITc_cairo_gl_surface_get_width_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_get_height_p",ITc_cairo_gl_surface_get_height_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_device_set_thread_aware_p",ITc_cairo_gl_device_set_thread_aware_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_CAIRO-NATIVE_H__
+++ /dev/null
-//
-// Copyright (c) 2014 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_CAIRO-NATIVE_H__
-#define __TCT_CAIRO-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void ITs_cairo_startup(void);
-extern void ITs_cairo_cleanup(void);
-
-extern int ITc_cairo_evas_gl_device_create_p(void);
-extern int ITc_cairo_gl_surface_create_for_evas_gl_p(void);
-extern int ITc_cairo_evas_gl_device_get_gl_p(void);
-extern int ITc_cairo_evas_gl_device_get_context_p(void);
-extern int ITc_cairo_gl_surface_create_p(void);
-extern int ITc_cairo_gl_surface_create_for_texture_p(void);
-extern int ITc_cairo_gl_surface_get_width_p(void);
-extern int ITc_cairo_gl_surface_get_height_p(void);
-extern int ITc_cairo_gl_device_set_thread_aware_p(void);
-
-testcase tc_array[] = {
- {"ITc_cairo_evas_gl_device_create_p",ITc_cairo_evas_gl_device_create_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_for_evas_gl_p",ITc_cairo_gl_surface_create_for_evas_gl_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_evas_gl_device_get_gl_p",ITc_cairo_evas_gl_device_get_gl_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_evas_gl_device_get_context_p",ITc_cairo_evas_gl_device_get_context_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_p",ITc_cairo_gl_surface_create_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_for_texture_p",ITc_cairo_gl_surface_create_for_texture_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_get_width_p",ITc_cairo_gl_surface_get_width_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_get_height_p",ITc_cairo_gl_surface_get_height_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_device_set_thread_aware_p",ITc_cairo_gl_device_set_thread_aware_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_CAIRO-NATIVE_H__
+++ /dev/null
-//
-// Copyright (c) 2014 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_CAIRO-NATIVE_H__
-#define __TCT_CAIRO-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void ITs_cairo_startup(void);
-extern void ITs_cairo_cleanup(void);
-
-extern int ITc_cairo_evas_gl_device_create_p(void);
-extern int ITc_cairo_gl_surface_create_for_evas_gl_p(void);
-extern int ITc_cairo_evas_gl_device_get_gl_p(void);
-extern int ITc_cairo_evas_gl_device_get_context_p(void);
-extern int ITc_cairo_gl_surface_create_p(void);
-extern int ITc_cairo_gl_surface_create_for_texture_p(void);
-extern int ITc_cairo_gl_surface_get_width_p(void);
-extern int ITc_cairo_gl_surface_get_height_p(void);
-extern int ITc_cairo_gl_device_set_thread_aware_p(void);
-
-testcase tc_array[] = {
- {"ITc_cairo_evas_gl_device_create_p",ITc_cairo_evas_gl_device_create_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_for_evas_gl_p",ITc_cairo_gl_surface_create_for_evas_gl_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_evas_gl_device_get_gl_p",ITc_cairo_evas_gl_device_get_gl_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_evas_gl_device_get_context_p",ITc_cairo_evas_gl_device_get_context_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_p",ITc_cairo_gl_surface_create_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_for_texture_p",ITc_cairo_gl_surface_create_for_texture_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_get_width_p",ITc_cairo_gl_surface_get_width_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_get_height_p",ITc_cairo_gl_surface_get_height_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_device_set_thread_aware_p",ITc_cairo_gl_device_set_thread_aware_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_CAIRO-NATIVE_H__
+++ /dev/null
-//
-// Copyright (c) 2014 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_CAIRO-NATIVE_H__
-#define __TCT_CAIRO-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void ITs_cairo_startup(void);
-extern void ITs_cairo_cleanup(void);
-
-extern int ITc_cairo_evas_gl_device_create_p(void);
-extern int ITc_cairo_gl_surface_create_for_evas_gl_p(void);
-extern int ITc_cairo_evas_gl_device_get_gl_p(void);
-extern int ITc_cairo_evas_gl_device_get_context_p(void);
-extern int ITc_cairo_gl_surface_create_p(void);
-extern int ITc_cairo_gl_surface_create_for_texture_p(void);
-extern int ITc_cairo_gl_surface_get_width_p(void);
-extern int ITc_cairo_gl_surface_get_height_p(void);
-extern int ITc_cairo_gl_device_set_thread_aware_p(void);
-
-testcase tc_array[] = {
- {"ITc_cairo_evas_gl_device_create_p",ITc_cairo_evas_gl_device_create_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_for_evas_gl_p",ITc_cairo_gl_surface_create_for_evas_gl_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_evas_gl_device_get_gl_p",ITc_cairo_evas_gl_device_get_gl_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_evas_gl_device_get_context_p",ITc_cairo_evas_gl_device_get_context_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_p",ITc_cairo_gl_surface_create_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_create_for_texture_p",ITc_cairo_gl_surface_create_for_texture_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_get_width_p",ITc_cairo_gl_surface_get_width_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_surface_get_height_p",ITc_cairo_gl_surface_get_height_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {"ITc_cairo_gl_device_set_thread_aware_p",ITc_cairo_gl_device_set_thread_aware_p,ITs_cairo_startup,ITs_cairo_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_CAIRO-NATIVE_H__
+++ /dev/null
-SET(PKG_NAME "cairo")
-
-SET(EXEC_NAME "tct-${PKG_NAME}-core")
-SET(RPM_NAME "core-${PKG_NAME}-tests")
-
-SET(CAPI_LIB "cairo")
-SET(TC_SOURCES
- utc-cairo.c
-)
-
-PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
- ${CAPI_LIB}
- glib-2.0
- capi-appfw-application
- capi-system-info
- cairo
- evas
- elementary
- 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()
+++ /dev/null
-cairo_evas_gl_device_create
-cairo_gl_surface_create_for_evas_gl
-cairo_evas_gl_device_get_gl
-cairo_evas_gl_device_get_context
+++ /dev/null
-//
-// Copyright (c) 2014 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 <sys/stat.h>
-#include "tct_common.h"
-#include <app.h>
-#include <dlog.h>
-
-#include <malloc.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <glib.h>
-#include <stdbool.h>
-
-#ifdef MOBILE
-#include "tct-cairo-core_mobile.h"
-#endif
-
-#ifdef WEARABLE
-#include "tct-cairo-core_wearable.h"
-#endif
-
-#ifdef TV
-#include "tct-cairo-core_tv.h"
-#endif
-
-#ifdef TIZENIOT
-#include "tct-cairo-core_tizeniot.h"
-#endif
-
-
-static char* key;
-static char* fname;
-static int nNum;
-
-int run_testcases()
-{
- int result = -1;
- int i;
- gsize byte_size;
- const gchar* encoded_byte;
- guchar* byte = NULL;
-
- static const size_t sz_byte_len = sizeof(size_t);
- static const size_t sz_type = sizeof(int);
- static const size_t sz_keysize = sizeof(size_t);
- static const size_t sz_size = sizeof(size_t);
-
- char* func_name = fname;//argv[1];
- if (nNum > 2)
- {
- encoded_byte = key;//argv[3];
- byte = g_base64_decode(encoded_byte,&byte_size);
- byte += sz_byte_len; byte += sz_type;
- size_t keysize = *((size_t *)byte); byte += sz_keysize;
- byte += keysize;
- size_t size = *((size_t *)byte); byte += sz_size;
- void *val = (void *)byte; byte += size;
- func_name = strdup((char *)val);
- }
-
- dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, func_name);
-
- for (i = 0; tc_array[i].name; i++)
- {
- if (!strncmp(func_name, tc_array[i].name, strlen(func_name)))
- {
- DUMP_UTC_ERRLOG();
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup begin", func_name);
- if (tc_array[i].startup){
- tc_array[i].startup();
- }
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup end", func_name);
-
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Body begin", func_name);
- result = tc_array[i].function();
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Body end", func_name);
-
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup begin", func_name);
- if (tc_array[i].cleanup){
- tc_array[i].cleanup();
- }
- dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup end", func_name);
-
- CLOSE_UTC_ERRLOG();
- FILE *fres = fopen("/tmp/tcresult","w");
- fprintf(fres, "%d", result);
- fclose(fres);
- FREE_MEMORY_TC(func_name);
- return result;
-
- }
- }
-
- dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] Unable to execute %s : Unknown Test Case Name", __FUNCTION__, __LINE__, func_name);
- printf("Unknown testcase name: \"%s\"\n", func_name);
- FREE_MEMORY_TC(func_name);
- return 2;
-}
-
-
-static bool app_create(void *data)
-{
- run_testcases();
- return false; // quit app
-}
-
-int main(int argc, char *argv[])
-{
- int ret = 0;
- fname = argv[1];
- key = argv[3];
- nNum = argc;
- ui_app_lifecycle_callback_s event_callback = {0,};
- event_callback.create = app_create;
-
- //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__);
-
- ret = ui_app_main(argc, argv, &event_callback, NULL);
- if (ret != APP_ERROR_NONE)
- {
- printf("\n[Line No : %d]Unable to execute test cases: ui_app_main API call gets failed\n", __LINE__);
- }
- return ret;
-}
+++ /dev/null
-//
-// Copyright (c) 2014 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_CAIRO-NATIVE_H__
-#define __TCT_CAIRO-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void utc_cairo_startup(void);
-extern void utc_cairo_cleanup(void);
-
-extern int utc_cairo_evas_gl_device_create_n(void);
-extern int utc_cairo_evas_gl_device_create_n1(void);
-extern int utc_cairo_evas_gl_device_create_p(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n1(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n2(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n3(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_p(void);
-extern int utc_cairo_evas_gl_device_get_gl_n(void);
-extern int utc_cairo_evas_gl_device_get_gl_n1(void);
-extern int utc_cairo_evas_gl_device_get_gl_p(void);
-extern int utc_cairo_evas_gl_device_get_context_n(void);
-extern int utc_cairo_evas_gl_device_get_context_n1(void);
-extern int utc_cairo_evas_gl_device_get_context_p(void);
-extern int utc_cairo_gl_surface_create_n(void);
-extern int utc_cairo_gl_surface_create_p(void);
-extern int utc_cairo_gl_surface_create_for_texture_n(void);
-extern int utc_cairo_gl_surface_create_for_texture_p(void);
-extern int utc_cairo_gl_surface_get_width_n(void);
-extern int utc_cairo_gl_surface_get_width_p(void);
-extern int utc_cairo_gl_surface_get_height_n(void);
-extern int utc_cairo_gl_surface_get_height_p(void);
-extern int utc_cairo_gl_device_set_thread_aware_n(void);
-extern int utc_cairo_gl_device_set_thread_aware_p(void);
-
-testcase tc_array[] = {
- {"utc_cairo_evas_gl_device_create_n",utc_cairo_evas_gl_device_create_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_create_n1",utc_cairo_evas_gl_device_create_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_create_p",utc_cairo_evas_gl_device_create_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n",utc_cairo_gl_surface_create_for_evas_gl_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n1",utc_cairo_gl_surface_create_for_evas_gl_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n2",utc_cairo_gl_surface_create_for_evas_gl_n2,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n3",utc_cairo_gl_surface_create_for_evas_gl_n3,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_p",utc_cairo_gl_surface_create_for_evas_gl_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_n",utc_cairo_evas_gl_device_get_gl_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_n1",utc_cairo_evas_gl_device_get_gl_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_p",utc_cairo_evas_gl_device_get_gl_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_n",utc_cairo_evas_gl_device_get_context_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_n1",utc_cairo_evas_gl_device_get_context_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_p",utc_cairo_evas_gl_device_get_context_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_n",utc_cairo_gl_surface_create_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_p",utc_cairo_gl_surface_create_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_texture_n",utc_cairo_gl_surface_create_for_texture_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_texture_p",utc_cairo_gl_surface_create_for_texture_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_width_n",utc_cairo_gl_surface_get_width_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_width_p",utc_cairo_gl_surface_get_width_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_height_n",utc_cairo_gl_surface_get_height_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_height_p",utc_cairo_gl_surface_get_height_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_device_set_thread_aware_n",utc_cairo_gl_device_set_thread_aware_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_device_set_thread_aware_p",utc_cairo_gl_device_set_thread_aware_p,utc_cairo_startup,utc_cairo_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_CAIRO-NATIVE_H__
+++ /dev/null
-//
-// Copyright (c) 2014 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_CAIRO-NATIVE_H__
-#define __TCT_CAIRO-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void utc_cairo_startup(void);
-extern void utc_cairo_cleanup(void);
-
-extern int utc_cairo_evas_gl_device_create_n(void);
-extern int utc_cairo_evas_gl_device_create_n1(void);
-extern int utc_cairo_evas_gl_device_create_p(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n1(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n2(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n3(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_p(void);
-extern int utc_cairo_evas_gl_device_get_gl_n(void);
-extern int utc_cairo_evas_gl_device_get_gl_n1(void);
-extern int utc_cairo_evas_gl_device_get_gl_p(void);
-extern int utc_cairo_evas_gl_device_get_context_n(void);
-extern int utc_cairo_evas_gl_device_get_context_n1(void);
-extern int utc_cairo_evas_gl_device_get_context_p(void);
-extern int utc_cairo_gl_surface_create_n(void);
-extern int utc_cairo_gl_surface_create_p(void);
-extern int utc_cairo_gl_surface_create_for_texture_n(void);
-extern int utc_cairo_gl_surface_create_for_texture_p(void);
-extern int utc_cairo_gl_surface_get_width_n(void);
-extern int utc_cairo_gl_surface_get_width_p(void);
-extern int utc_cairo_gl_surface_get_height_n(void);
-extern int utc_cairo_gl_surface_get_height_p(void);
-extern int utc_cairo_gl_device_set_thread_aware_n(void);
-extern int utc_cairo_gl_device_set_thread_aware_p(void);
-
-testcase tc_array[] = {
- {"utc_cairo_evas_gl_device_create_n",utc_cairo_evas_gl_device_create_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_create_n1",utc_cairo_evas_gl_device_create_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_create_p",utc_cairo_evas_gl_device_create_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n",utc_cairo_gl_surface_create_for_evas_gl_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n1",utc_cairo_gl_surface_create_for_evas_gl_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n2",utc_cairo_gl_surface_create_for_evas_gl_n2,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n3",utc_cairo_gl_surface_create_for_evas_gl_n3,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_p",utc_cairo_gl_surface_create_for_evas_gl_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_n",utc_cairo_evas_gl_device_get_gl_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_n1",utc_cairo_evas_gl_device_get_gl_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_p",utc_cairo_evas_gl_device_get_gl_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_n",utc_cairo_evas_gl_device_get_context_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_n1",utc_cairo_evas_gl_device_get_context_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_p",utc_cairo_evas_gl_device_get_context_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_n",utc_cairo_gl_surface_create_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_p",utc_cairo_gl_surface_create_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_texture_n",utc_cairo_gl_surface_create_for_texture_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_texture_p",utc_cairo_gl_surface_create_for_texture_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_width_n",utc_cairo_gl_surface_get_width_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_width_p",utc_cairo_gl_surface_get_width_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_height_n",utc_cairo_gl_surface_get_height_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_height_p",utc_cairo_gl_surface_get_height_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_device_set_thread_aware_n",utc_cairo_gl_device_set_thread_aware_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_device_set_thread_aware_p",utc_cairo_gl_device_set_thread_aware_p,utc_cairo_startup,utc_cairo_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_CAIRO-NATIVE_H__
+++ /dev/null
-//
-// Copyright (c) 2014 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_CAIRO-NATIVE_H__
-#define __TCT_CAIRO-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void utc_cairo_startup(void);
-extern void utc_cairo_cleanup(void);
-
-extern int utc_cairo_evas_gl_device_create_n(void);
-extern int utc_cairo_evas_gl_device_create_n1(void);
-extern int utc_cairo_evas_gl_device_create_p(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n1(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n2(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n3(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_p(void);
-extern int utc_cairo_evas_gl_device_get_gl_n(void);
-extern int utc_cairo_evas_gl_device_get_gl_n1(void);
-extern int utc_cairo_evas_gl_device_get_gl_p(void);
-extern int utc_cairo_evas_gl_device_get_context_n(void);
-extern int utc_cairo_evas_gl_device_get_context_n1(void);
-extern int utc_cairo_evas_gl_device_get_context_p(void);
-extern int utc_cairo_gl_surface_create_n(void);
-extern int utc_cairo_gl_surface_create_p(void);
-extern int utc_cairo_gl_surface_create_for_texture_n(void);
-extern int utc_cairo_gl_surface_create_for_texture_p(void);
-extern int utc_cairo_gl_surface_get_width_n(void);
-extern int utc_cairo_gl_surface_get_width_p(void);
-extern int utc_cairo_gl_surface_get_height_n(void);
-extern int utc_cairo_gl_surface_get_height_p(void);
-extern int utc_cairo_gl_device_set_thread_aware_n(void);
-extern int utc_cairo_gl_device_set_thread_aware_p(void);
-
-testcase tc_array[] = {
- {"utc_cairo_evas_gl_device_create_n",utc_cairo_evas_gl_device_create_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_create_n1",utc_cairo_evas_gl_device_create_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_create_p",utc_cairo_evas_gl_device_create_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n",utc_cairo_gl_surface_create_for_evas_gl_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n1",utc_cairo_gl_surface_create_for_evas_gl_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n2",utc_cairo_gl_surface_create_for_evas_gl_n2,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n3",utc_cairo_gl_surface_create_for_evas_gl_n3,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_p",utc_cairo_gl_surface_create_for_evas_gl_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_n",utc_cairo_evas_gl_device_get_gl_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_n1",utc_cairo_evas_gl_device_get_gl_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_p",utc_cairo_evas_gl_device_get_gl_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_n",utc_cairo_evas_gl_device_get_context_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_n1",utc_cairo_evas_gl_device_get_context_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_p",utc_cairo_evas_gl_device_get_context_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_n",utc_cairo_gl_surface_create_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_p",utc_cairo_gl_surface_create_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_texture_n",utc_cairo_gl_surface_create_for_texture_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_texture_p",utc_cairo_gl_surface_create_for_texture_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_width_n",utc_cairo_gl_surface_get_width_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_width_p",utc_cairo_gl_surface_get_width_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_height_n",utc_cairo_gl_surface_get_height_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_height_p",utc_cairo_gl_surface_get_height_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_device_set_thread_aware_n",utc_cairo_gl_device_set_thread_aware_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_device_set_thread_aware_p",utc_cairo_gl_device_set_thread_aware_p,utc_cairo_startup,utc_cairo_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_CAIRO-NATIVE_H__
+++ /dev/null
-//
-// Copyright (c) 2014 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_CAIRO-NATIVE_H__
-#define __TCT_CAIRO-NATIVE_H__
-
-#include "testcase.h"
-#include "tct_common.h"
-
-extern void utc_cairo_startup(void);
-extern void utc_cairo_cleanup(void);
-
-extern int utc_cairo_evas_gl_device_create_n(void);
-extern int utc_cairo_evas_gl_device_create_n1(void);
-extern int utc_cairo_evas_gl_device_create_p(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n1(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n2(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_n3(void);
-extern int utc_cairo_gl_surface_create_for_evas_gl_p(void);
-extern int utc_cairo_evas_gl_device_get_gl_n(void);
-extern int utc_cairo_evas_gl_device_get_gl_n1(void);
-extern int utc_cairo_evas_gl_device_get_gl_p(void);
-extern int utc_cairo_evas_gl_device_get_context_n(void);
-extern int utc_cairo_evas_gl_device_get_context_n1(void);
-extern int utc_cairo_evas_gl_device_get_context_p(void);
-extern int utc_cairo_gl_surface_create_n(void);
-extern int utc_cairo_gl_surface_create_p(void);
-extern int utc_cairo_gl_surface_create_for_texture_n(void);
-extern int utc_cairo_gl_surface_create_for_texture_p(void);
-extern int utc_cairo_gl_surface_get_width_n(void);
-extern int utc_cairo_gl_surface_get_width_p(void);
-extern int utc_cairo_gl_surface_get_height_n(void);
-extern int utc_cairo_gl_surface_get_height_p(void);
-extern int utc_cairo_gl_device_set_thread_aware_n(void);
-extern int utc_cairo_gl_device_set_thread_aware_p(void);
-
-testcase tc_array[] = {
- {"utc_cairo_evas_gl_device_create_n",utc_cairo_evas_gl_device_create_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_create_n1",utc_cairo_evas_gl_device_create_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_create_p",utc_cairo_evas_gl_device_create_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n",utc_cairo_gl_surface_create_for_evas_gl_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n1",utc_cairo_gl_surface_create_for_evas_gl_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n2",utc_cairo_gl_surface_create_for_evas_gl_n2,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_n3",utc_cairo_gl_surface_create_for_evas_gl_n3,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_evas_gl_p",utc_cairo_gl_surface_create_for_evas_gl_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_n",utc_cairo_evas_gl_device_get_gl_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_n1",utc_cairo_evas_gl_device_get_gl_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_gl_p",utc_cairo_evas_gl_device_get_gl_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_n",utc_cairo_evas_gl_device_get_context_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_n1",utc_cairo_evas_gl_device_get_context_n1,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_evas_gl_device_get_context_p",utc_cairo_evas_gl_device_get_context_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_n",utc_cairo_gl_surface_create_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_p",utc_cairo_gl_surface_create_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_texture_n",utc_cairo_gl_surface_create_for_texture_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_create_for_texture_p",utc_cairo_gl_surface_create_for_texture_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_width_n",utc_cairo_gl_surface_get_width_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_width_p",utc_cairo_gl_surface_get_width_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_height_n",utc_cairo_gl_surface_get_height_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_surface_get_height_p",utc_cairo_gl_surface_get_height_p,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_device_set_thread_aware_n",utc_cairo_gl_device_set_thread_aware_n,utc_cairo_startup,utc_cairo_cleanup},
- {"utc_cairo_gl_device_set_thread_aware_p",utc_cairo_gl_device_set_thread_aware_p,utc_cairo_startup,utc_cairo_cleanup},
- {NULL, NULL}
-};
-
-#endif // __TCT_CAIRO-NATIVE_H__
+++ /dev/null
-//
-// Copyright (c) 2014 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 "assert.h"
-#include <cairo.h>
-#include <cairo-evas-gl.h>
-#include <Evas_GL.h>
-#include <Elementary.h>
-
-#include <system_info.h>
-
-#define OPENGL_VERSION_1_FEATURE "tizen.org/feature/opengles.version.1_1"
-#define OPENGL_VERSION_2_FEATURE "tizen.org/feature/opengles.version.2_0"
-
-Evas_Object *win;
-Evas_GL *evas_gl;
-Evas_GL_Config *evas_gl_config;
-Evas_GL_Surface *evas_gl_surface;
-Evas_GL_Context *evas_gl_context;
-cairo_device_t *cairo_device = NULL;
-cairo_surface_t *surface = NULL;
-
-int is_supported = 1;
-int evas_state = 1;
-
-/**
- * @function utc_cairo_startup
- * @description Called before each test
- * @parameter NA
- * @return NA
- */
-void utc_cairo_startup(void)
-{
- int ret = -1;
- evas_state = 1;
- bool bOpenGLVersion1 = false, bOpenGLVersion2 = false;
- ret = system_info_get_platform_bool(OPENGL_VERSION_1_FEATURE,&bOpenGLVersion1);
- if ( ret != SYSTEM_INFO_ERROR_NONE )
- {
- fprintf(stderr, "\\n[Line : %d] system_info_get_platform_bool is failed.\\n", __LINE__);
- is_supported = 0;
- }
- if (!bOpenGLVersion1 )
- {
- fprintf(stderr, "\\n[Line : %d] OpenGL version.1_1 is not Supported\\n", __LINE__);
- is_supported = 0;
- }
- ret = system_info_get_platform_bool(OPENGL_VERSION_2_FEATURE,&bOpenGLVersion2);
- if ( ret != SYSTEM_INFO_ERROR_NONE )
- {
- fprintf(stderr, "\\n[Line : %d] system_info_get_platform_bool is failed.\\n", __LINE__);
- is_supported = 0;
- }
- if (!bOpenGLVersion2)
- {
- fprintf(stderr, "\\n[Line : %d] OpenGL version.2_0 is not Supported\\n", __LINE__);
- is_supported = 0;
- }
-
- if(is_supported)
- {
- elm_init(0,NULL);
- elm_config_accel_preference_set("opengl");
- win = elm_win_add(NULL, "utc cairo", ELM_WIN_BASIC);
- if(win == NULL)
- {
- fprintf(stderr, "\\n[Line : %d] error elm_win_add\\n", __LINE__);
- evas_state = 0;
- }
- else
- {
- elm_win_title_set(win, "utc cairo");
- evas_object_show(win);
-
- evas_gl = evas_gl_new(evas_object_evas_get(win));
- if(evas_gl == NULL)
- {
- fprintf(stderr, "\\n[Line : %d] error evas_gl_new\\n", __LINE__);
- evas_state = 0;
- }
-
- evas_gl_config = evas_gl_config_new();
- if(evas_gl_config == NULL)
- {
- fprintf(stderr, "\\n[Line : %d] error evas_gl_config_new\\n", __LINE__);
- evas_state = 0;
- }
- else
- evas_gl_config->color_format = EVAS_GL_RGBA_8888;
-
- if(evas_state)
- {
- int width = 30;
- int height = 30;
- evas_gl_surface = evas_gl_surface_create(evas_gl, evas_gl_config, width, height);
- if(evas_gl_surface == NULL)
- evas_state = 0;
-
- evas_gl_context = evas_gl_context_create(evas_gl, NULL);
- if(evas_gl_context == NULL)
- evas_state = 0;
-
- setenv("CAIRO_GL_COMPOSITOR", "msaa", 1);
- }
- }
- }
-}
-
-/**
- * @function utc_cairo_cleanup
- * @description Called after each test
- * @parameter NA
- * @return NA
- */
-void utc_cairo_cleanup(void)
-{
- if(surface != NULL)
- {
- cairo_surface_destroy (surface);
- surface = NULL;
- }
- if(cairo_device != NULL)
- {
- cairo_device_destroy(cairo_device);
- cairo_device = NULL;
- }
-
- if(evas_gl_surface != NULL)
- {
- evas_gl_make_current (evas_gl, NULL, NULL);
- evas_gl_surface_destroy(evas_gl, evas_gl_surface);
- evas_gl_surface = NULL;
- }
-
- if(evas_gl_context != NULL)
- {
- evas_gl_make_current (evas_gl, NULL, NULL);
- evas_gl_context_destroy(evas_gl, evas_gl_context);
- evas_gl_context = NULL;
- }
-
- if(evas_gl_config != NULL)
- {
- evas_gl_config_free(evas_gl_config);
- evas_gl_config = NULL;
- }
-
- if(evas_gl != NULL)
- {
- evas_gl_free(evas_gl);
- evas_gl = NULL;
- }
-
- if(win != NULL)
- {
- evas_object_del(win);
- win = NULL;
- }
- elm_shutdown();
-}
-
-/**
- * @testcase utc_cairo_evas_gl_device_create_n
- * @since_tizen 2.3.1
- * @description testcase for check invalid input evas_gl_context (NULL).
- */
-int utc_cairo_evas_gl_device_create_n(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, NULL);
- ret = cairo_device_status(cairo_device);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_NO_MEMORY);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
- return 0;
-}
-
-/**
- * @testcase utc_cairo_evas_gl_device_create_n1
- * @since_tizen 2.3.1
- * @description testcase for check invalid input evas_gl (NULL).
- */
-int utc_cairo_evas_gl_device_create_n1(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (NULL, evas_gl_context);
- ret = cairo_device_status(cairo_device);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_NO_MEMORY);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_evas_gl_device_create_p
- * @since_tizen 2.3.1
- * @description testcase for check normal inputs.
- */
-int utc_cairo_evas_gl_device_create_p(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- ret = cairo_device_status(cairo_device);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_SUCCESS);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_create_for_evas_gl_n
- * @since_tizen 2.3.1
- * @description testcase for check invalid inputs (evas_gl_surface, evas_gl_config as NULL).
- */
-int utc_cairo_gl_surface_create_for_evas_gl_n(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- int width = 30;
- int height = 30;
-
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- surface = (cairo_surface_t *)cairo_gl_surface_create_for_evas_gl(cairo_device, NULL, NULL, width, height);
-
- ret = cairo_surface_status(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_NO_MEMORY);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_create_for_evas_gl_n1
- * @since_tizen 2.3.1
- * @description testcase for check invalid input cairo_device (get_device from image surface).
- */
-int utc_cairo_gl_surface_create_for_evas_gl_n1(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- int width = 30;
- int height = 25;
-
- surface = (cairo_surface_t *)cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
- cairo_device = (cairo_device_t *)cairo_surface_get_device(surface);
- cairo_surface_destroy(surface);
-
- surface = (cairo_surface_t *)cairo_gl_surface_create_for_evas_gl(cairo_device, evas_gl_surface, evas_gl_config, width, height);
- ret = cairo_surface_status(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_NO_MEMORY);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_create_for_evas_gl_n2
- * @since_tizen 2.3.1
- * @description testcase for check invalid input width (0).
- */
-int utc_cairo_gl_surface_create_for_evas_gl_n2(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- int width = 0;
- int height = 30;
-
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- surface = (cairo_surface_t *)cairo_gl_surface_create_for_evas_gl(cairo_device, evas_gl_surface, evas_gl_config, width, height);
- ret = cairo_surface_status(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_INVALID_SIZE);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_create_for_evas_gl_n3
- * @since_tizen 2.3.1
- * @description testcase for check invalid input height (0).
- */
-int utc_cairo_gl_surface_create_for_evas_gl_n3(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- int width = 30;
- int height = 0;
-
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- surface = (cairo_surface_t *)cairo_gl_surface_create_for_evas_gl(cairo_device, evas_gl_surface, evas_gl_config, width, height);
-
- ret = cairo_surface_status(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_INVALID_SIZE);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_create_for_evas_gl_p
- * @since_tizen 2.3.1
- * @description testcase for check normal inputs.
- */
-int utc_cairo_gl_surface_create_for_evas_gl_p(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- int width = 30;
- int height = 25;
-
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- surface = (cairo_surface_t *)cairo_gl_surface_create_for_evas_gl(cairo_device, evas_gl_surface, evas_gl_config, width, height);
- ret = cairo_surface_status(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_SUCCESS);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_evas_gl_device_get_gl_n
- * @since_tizen 2.3.1
- * @description testcase for check invalid input evas_gl (NULL).
- */
-int utc_cairo_evas_gl_device_get_gl_n(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- Evas_GL *ret_evas_gl = NULL;
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (NULL, evas_gl_context);
- ret_evas_gl = cairo_evas_gl_device_get_gl(cairo_device);
- if(ret_evas_gl != NULL)
- fprintf(stderr, "\\n[Line : %d] error : cairo_evas_gl_device_get_gl() return NOT NULL\\n", __LINE__);
- else
- fprintf(stderr, "\\n[Line : %d] : cairo_evas_gl_device_get_gl() return NULL\\n", __LINE__);
- assert_eq(ret_evas_gl, NULL);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_evas_gl_device_get_gl_n1
- * @since_tizen 2.3.1
- * @description testcase for check invalid input cairo_device (get_device from image surface).
- */
-int utc_cairo_evas_gl_device_get_gl_n1(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- int width = 30;
- int height = 25;
- Evas_GL *ret_evas_gl = NULL;
- surface = (cairo_surface_t *)cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
- cairo_device = (cairo_device_t *)cairo_surface_get_device(surface);
-
- ret_evas_gl = cairo_evas_gl_device_get_gl(cairo_device);
- if(ret_evas_gl != NULL)
- fprintf(stderr, "\\n[Line : %d] error : cairo_evas_gl_device_get_gl() return NOT NULL\\n", __LINE__);
- else
- fprintf(stderr, "\\n[Line : %d] : cairo_evas_gl_device_get_gl() return NULL\\n", __LINE__);
- assert_eq(ret_evas_gl, NULL);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_evas_gl_device_get_gl_p
- * @since_tizen 2.3.1
- * @description testcase for check normal inputs.
- */
-int utc_cairo_evas_gl_device_get_gl_p(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- Evas_GL *ret_evas_gl = NULL;
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- ret_evas_gl = cairo_evas_gl_device_get_gl(cairo_device);
- if(ret_evas_gl == NULL)
- fprintf(stderr, "\\n[Line : %d] error : cairo_evas_gl_device_get_gl() return NULL\\n", __LINE__);
- else
- fprintf(stderr, "\\n[Line : %d] : cairo_evas_gl_device_get_gl() return NOT NULL\\n", __LINE__);
- assert_neq(ret_evas_gl, NULL);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_evas_gl_device_get_context_n
- * @since_tizen 2.3.1
- * @description testcase for check invalid input evas_gl_context (NULL).
- */
-int utc_cairo_evas_gl_device_get_context_n(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- Evas_GL_Context *ret_evas_gl_context;
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, NULL);
- ret_evas_gl_context = cairo_evas_gl_device_get_context(cairo_device);
- if(ret_evas_gl_context != NULL)
- fprintf(stderr, "\\n[Line : %d] error : cairo_evas_gl_device_get_context() return NOT NULL \\n", __LINE__);
- else
- fprintf(stderr, "\\n[Line : %d] : cairo_evas_gl_device_get_context() return NULL \\n", __LINE__);
- assert_eq(ret_evas_gl_context, NULL);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_evas_gl_device_get_context_n1
- * @since_tizen 2.3.1
- * @description testcase for check invalid input cairo_device (get_device from image surface).
- */
-int utc_cairo_evas_gl_device_get_context_n1(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- int width = 30;
- int height = 25;
- Evas_GL_Context *ret_evas_gl_context;
- surface = (cairo_surface_t *)cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
- cairo_device = (cairo_device_t *)cairo_surface_get_device(surface);
-
- ret_evas_gl_context = cairo_evas_gl_device_get_context(cairo_device);
- if(ret_evas_gl_context != NULL)
- fprintf(stderr, "\\n[Line : %d] error : cairo_evas_gl_device_get_context() return NOT NULL \\n", __LINE__);
- else
- fprintf(stderr, "\\n[Line : %d] : cairo_evas_gl_device_get_context() return NULL \\n", __LINE__);
- assert_eq(ret_evas_gl_context, NULL);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_evas_gl_device_get_context_p
- * @since_tizen 2.3.1
- * @description testcase for check normal inputs.
- */
-int utc_cairo_evas_gl_device_get_context_p(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- Evas_GL_Context *ret_evas_gl_context;
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- ret_evas_gl_context = cairo_evas_gl_device_get_context(cairo_device);
- if(ret_evas_gl_context == NULL)
- fprintf(stderr, "\\n[Line : %d] error : cairo_evas_gl_device_get_context() return NULL \\n", __LINE__);
- else
- fprintf(stderr, "\\n[Line : %d] : cairo_evas_gl_device_get_context() return NOT NULL \\n", __LINE__);
- assert_neq(ret_evas_gl_context, NULL);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_create_n
- * @since_tizen 2.3.1
- * @description testcase for check invalid input content (0x4000).
- */
-int utc_cairo_gl_surface_create_n(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- int width = 30;
- int height = 0;
-
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- surface = (cairo_surface_t *)cairo_gl_surface_create(cairo_device, 0x4000, width, height);
-
- ret = cairo_surface_status(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_INVALID_CONTENT);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_create_p
- * @since_tizen 2.3.1
- * @description testcase for check normal inputs.
- */
-int utc_cairo_gl_surface_create_p(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- int width = 30;
- int height = 30;
-
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- surface = (cairo_surface_t *)cairo_gl_surface_create(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, width, height);
- ret = cairo_surface_status(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_SUCCESS);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_create_for_texture_n
- * @since_tizen 2.3.1
- * @description testcase for check invalid input cairo_device (get_device from image surface).
- */
-int utc_cairo_gl_surface_create_for_texture_n(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- int width = 30;
- int height = 30;
-
- surface = (cairo_surface_t *)cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
- cairo_device = (cairo_device_t *)cairo_surface_get_device(surface);
- cairo_surface_destroy(surface);
-
- surface = (cairo_surface_t *)cairo_gl_surface_create_for_texture(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, 0, width, height);
-
- ret = cairo_surface_status(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_NO_MEMORY);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_create_for_texture_p
- * @since_tizen 2.3.1
- * @description testcase for check normal inputs.
- */
-int utc_cairo_gl_surface_create_for_texture_p(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- int width = 30;
- int height = 30;
-
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- surface = (cairo_surface_t *)cairo_gl_surface_create_for_texture(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, 0, width, height);
- ret = cairo_surface_status(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_SUCCESS);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_get_width_n
- * @since_tizen 2.3.1
- * @description testcase for check invalid input cairo_device (NULL).
- */
-int utc_cairo_gl_surface_get_width_n(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- int width = 30;
- int height = 25;
- int ret = 0;
-
- surface = (cairo_surface_t *)cairo_gl_surface_create(NULL, CAIRO_CONTENT_COLOR_ALPHA, width, height);
- ret = cairo_gl_surface_get_width(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, 0);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_get_width_p
- * @since_tizen 2.3.1
- * @description testcase for check normal inputs.
- */
-int utc_cairo_gl_surface_get_width_p(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- int width = 30;
- int height = 25;
- int ret = 0;
-
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- surface = (cairo_surface_t *)cairo_gl_surface_create(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, width, height);
- ret = cairo_gl_surface_get_width(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, width);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_get_height_n
- * @since_tizen 2.3.1
- * @description testcase for check invalid input cairo_device (NULL).
- */
-int utc_cairo_gl_surface_get_height_n(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- int width = 30;
- int height = 25;
- int ret = 0;
-
- surface = (cairo_surface_t *)cairo_gl_surface_create(NULL, CAIRO_CONTENT_COLOR_ALPHA, width, height);
- ret = cairo_gl_surface_get_height(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, 0);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_surface_get_height_p
- * @since_tizen 2.3.1
- * @description testcase for check normal inputs.
- */
-int utc_cairo_gl_surface_get_height_p(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- int width = 30;
- int height = 25;
- int ret = 0;
-
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- surface = (cairo_surface_t *)cairo_gl_surface_create(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, width, height);
- ret = cairo_gl_surface_get_height(surface);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, height);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_device_set_thread_aware_n
- * @since_tizen 2.3.1
- * @description testcase for check invalid input state (-1).
- */
-int utc_cairo_gl_device_set_thread_aware_n(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- cairo_gl_device_set_thread_aware(cairo_device, -1);
- ret = cairo_device_status(cairo_device);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_INVALID_STATUS);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-
-/**
- * @testcase utc_cairo_gl_device_set_thread_aware_p
- * @since_tizen 2.3.1
- * @description testcase for check normal inputs.
- */
-int utc_cairo_gl_device_set_thread_aware_p(void)
-{
- if(is_supported)
- {
- if(evas_state)
- {
- cairo_status_t ret = CAIRO_STATUS_SUCCESS;
- cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
- cairo_gl_device_set_thread_aware(cairo_device, 0);
- ret = cairo_device_status(cairo_device);
- fprintf(stderr, "\\n[Line : %d] : %d \\n", __LINE__, ret);
- assert_eq(ret, CAIRO_STATUS_SUCCESS);
- }
- else
- {
- assert_eq(evas_state, 1);
- }
- }
- else
- {
- assert_eq(is_supported, 0);
- }
-
- return 0;
-}
-