/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * 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 #include #include static void startup(void); static void cleanup(void); void (*tet_startup)(void) = startup; void (*tet_cleanup)(void) = cleanup; static void startup(void) { // TODO : How to copy sample image???? } static void cleanup(void) { /* end of TC */ } static void utc_uix_face_component_create_positive(void) { static const char szFunc[] = "face_component_create"; int err; face_component_h face_component; err = face_component_create(&face_component); dts_check_eq(szFunc, err, FACE_ERROR_NONE); } static void utc_uix_face_component_destroy_positive(void) { static const char szFunc[] = "face_component_destroy"; int err; face_component_h face_component; err = face_component_create(&face_component); err = face_component_destroy(face_component); dts_check_eq(szFunc, err, FACE_ERROR_NONE); } static void utc_uix_face_component_get_face_rect_positive(void) { static const char szFunc[] = "face_component_get_face_rect"; int err; face_component_h face_component; err = face_component_create(&face_component); face_rect_s face; err = face_component_get_face_rect(face_component, &face); if(err == FACE_ERROR_NONE || err == FACE_ERROR_COMPONENT_NOT_FOUND) { dts_pass(szFunc); } else { dts_fail(szFunc); } err = face_component_destroy(face_component); } static void utc_uix_face_component_get_left_eye_point_positive(void) { static const char szFunc[] = "face_component_get_left_eye_point"; int err; face_component_h face_component; err = face_component_create(&face_component); face_point_s point; err = face_component_get_left_eye_point(face_component, &point); if(err == FACE_ERROR_NONE || err == FACE_ERROR_COMPONENT_NOT_FOUND) { dts_pass(szFunc); } else { dts_fail(szFunc); } err = face_component_destroy(face_component); } static void utc_uix_face_component_get_right_eye_point_positive(void) { static const char szFunc[] = "face_component_get_right_eye_point"; int err; face_component_h face_component; err = face_component_create(&face_component); face_point_s point; err = face_component_get_right_eye_point(face_component, &point); if(err == FACE_ERROR_NONE || err == FACE_ERROR_COMPONENT_NOT_FOUND) { dts_pass(szFunc); } else { dts_fail(szFunc); } err = face_component_destroy(face_component); } static void utc_uix_face_component_get_mouse_rect_positive(void) { static const char szFunc[] = "face_component_get_mouse_rect"; int err; face_component_h face_component; err = face_component_create(&face_component); face_rect_s mouse; err = face_component_get_mouse_rect(face_component, &mouse); if(err == FACE_ERROR_NONE || err == FACE_ERROR_COMPONENT_NOT_FOUND) { dts_pass(szFunc); } else { dts_fail(szFunc); } err = face_component_destroy(face_component); } struct tet_testlist tet_testlist[] = { { utc_uix_face_component_create_positive, 1}, { utc_uix_face_component_destroy_positive, 2}, { utc_uix_face_component_get_face_rect_positive, 3}, { utc_uix_face_component_get_left_eye_point_positive, 4}, { utc_uix_face_component_get_right_eye_point_positive, 5}, { utc_uix_face_component_get_mouse_rect_positive, 6}, { NULL, 0}, };