utc_elm_photocam_image_orient.c
-utc_elm_photocam_add.c
#utc_elm_photocam_bounce_get.c
#utc_elm_photocam_bounce_set.c
-utc_elm_photocam_file_get.c
-utc_elm_photocam_file_set.c
+utc_elm_photocam_file_get_set.c
utc_elm_photocam_image_region_bring_in.c
utc_elm_photocam_image_region_get.c
utc_elm_photocam_image_region_show.c
utc_elm_photocam_image_size_get.c
-utc_elm_photocam_paused_get.c
-utc_elm_photocam_paused_set.c
-utc_elm_photocam_zoom_set.c
-utc_elm_photocam_zoom_get.c
-utc_elm_photocam_zoom_mode_set.c
-utc_elm_photocam_zoom_mode_get.c
-utc_elm_photocam_gesture_enabled_set.c
-utc_elm_photocam_gesture_enabled_get.c
+utc_elm_photocam_paused_get_set.c
+utc_elm_photocam_zoom_get_set.c
+utc_elm_photocam_zoom_mode_get_set.c
+utc_elm_photocam_gesture_enabled_get_set.c
utc_elm_photocam_internal_image_get.c
utc_elm_photocam_image_orient.c
-utc_elm_photocam_add.c
#utc_elm_photocam_bounce_get.c
#utc_elm_photocam_bounce_set.c
-utc_elm_photocam_file_get.c
-utc_elm_photocam_file_set.c
+utc_elm_photocam_file_get_set.c
utc_elm_photocam_image_region_bring_in.c
utc_elm_photocam_image_region_get.c
utc_elm_photocam_image_region_show.c
utc_elm_photocam_image_size_get.c
-utc_elm_photocam_paused_get.c
-utc_elm_photocam_paused_set.c
-utc_elm_photocam_zoom_set.c
-utc_elm_photocam_zoom_get.c
-utc_elm_photocam_zoom_mode_set.c
-utc_elm_photocam_zoom_mode_get.c
-utc_elm_photocam_gesture_enabled_set.c
-utc_elm_photocam_gesture_enabled_get.c
+utc_elm_photocam_paused_get_set.c
+utc_elm_photocam_zoom_get_set.c
+utc_elm_photocam_zoom_mode_get_set.c
+utc_elm_photocam_gesture_enabled_get_set.c
utc_elm_photocam_internal_image_get.c
#utc_elm_photocam_image_orient.c
-utc_elm_photocam_add.c
#utc_elm_photocam_bounce_get.c
#utc_elm_photocam_bounce_set.c
-utc_elm_photocam_file_get.c
-utc_elm_photocam_file_set.c
+utc_elm_photocam_file_get_set.c
utc_elm_photocam_image_region_bring_in.c
utc_elm_photocam_image_region_get.c
utc_elm_photocam_image_region_show.c
utc_elm_photocam_image_size_get.c
-utc_elm_photocam_paused_get.c
-utc_elm_photocam_paused_set.c
-utc_elm_photocam_zoom_set.c
-utc_elm_photocam_zoom_get.c
-utc_elm_photocam_zoom_mode_set.c
-utc_elm_photocam_zoom_mode_get.c
-utc_elm_photocam_gesture_enabled_set.c
-utc_elm_photocam_gesture_enabled_get.c
+utc_elm_photocam_paused_get_set.c
+utc_elm_photocam_zoom_get_set.c
+utc_elm_photocam_zoom_mode_get_set.c
+utc_elm_photocam_gesture_enabled_get_set.c
utc_elm_photocam_internal_image_get.c
#utc_elm_photocam_image_orient.c
-utc_elm_photocam_add.c
#utc_elm_photocam_bounce_get.c
#utc_elm_photocam_bounce_set.c
-utc_elm_photocam_file_get.c
-utc_elm_photocam_file_set.c
+utc_elm_photocam_file_get_set.c
utc_elm_photocam_image_region_bring_in.c
utc_elm_photocam_image_region_get.c
utc_elm_photocam_image_region_show.c
utc_elm_photocam_image_size_get.c
-utc_elm_photocam_paused_get.c
-utc_elm_photocam_paused_set.c
-utc_elm_photocam_zoom_set.c
-utc_elm_photocam_zoom_get.c
-utc_elm_photocam_zoom_mode_set.c
-utc_elm_photocam_zoom_mode_get.c
-utc_elm_photocam_gesture_enabled_set.c
-utc_elm_photocam_gesture_enabled_get.c
+utc_elm_photocam_paused_get_set.c
+utc_elm_photocam_zoom_get_set.c
+utc_elm_photocam_zoom_mode_get_set.c
+utc_elm_photocam_gesture_enabled_get_set.c
utc_elm_photocam_internal_image_get.c
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_add elm_photocam_add()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_add
- * @{
- * @objective Positive Test case checks if function add a new photocam object properly and doesn't cause segmentation fault
- * @n Input Data: the window object
- *
- * @procedure
- * @step 1 Add photocam to main win
- *
- * @passcondition Returned value is not NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_add_p)
-{
- Evas_Object* photocam = NULL;
-
- if (main_win == NULL)
- {
- return;
- }
- photocam = elm_photocam_add(main_win);
- if (photocam == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- evas_object_del(photocam);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_add
- * @{
- * @objective Negative Test case checks if fucntion call with NULL instead of parent window
- * works properly and doesn't cause segmentation fault
- * @n Input Data: NULL instead of the window object
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the window object
- *
- * @passcondition Returned value is NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_add_n)
-{
- if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_photocam_add, main_win))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_photocam_add()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_add");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_photocam_add_p);
- tcase_add_test(tcase, utc_elm_photocam_add_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-static Evas_Object *photocam = NULL;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_file_get elm_photocam_file_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create new photocam and add it to parent window
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- photocam = elm_photocam_add(main_win);
- if (photocam == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_file_get
- * @{
- * @objective Positive Test case checks if function returns the path of the current image file properly
- * and doesn't cause segmentation fault
- * @n Input Data: the photocam object
- *
- * @procedure
- * @step 1 Set photo file to be shown
- * @step 2 Get path of current file
- *
- * @passcondition Returned value is equal to EVAS_LOAD_ERROR_NONE at step 1,
- * returned value is equal to "./photocam/tizen_efl.png" at step 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_file_get_p)
-{
- Evas_Load_Error load_result = EVAS_LOAD_ERROR_GENERIC;
- const char *file = NULL;
-
- if (photocam == NULL)
- {
- return;
- }
- load_result = elm_photocam_file_set(photocam, "./photocam/tizen_efl.png");
- if (load_result != EVAS_LOAD_ERROR_NONE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- file = elm_photocam_file_get(photocam);
- if (!file || (strcmp(file, "./photocam/tizen_efl.png") != 0))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_file_get
- * @{
- * @objective Negative Test case checks if function call with NULL
- * instead of photocam parameter works properly and doesn't cause segmentation fault
- * @n Input Data: NULL instead of the photocam object
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the photocam parameter
- *
- * @passcondition Returned value is equal to NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_file_get_n)
-{
- if (UNITEST_FUNC_NEG_RET(NULL, elm_photocam_file_get, photocam) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_photocam_file_get()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_file_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_photocam_file_get_p);
- tcase_add_test(tcase, utc_elm_photocam_file_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL;
+static Evas_Object *photocam = NULL;
+static Evas_Object *photocam2 = NULL;
+
+/**
+ * @addtogroup elm_photocam
+ * @{
+ * @defgroup elm_photocam_file_set elm_photocam_file_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Create new photocam and add it to parent window
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ photocam = elm_photocam_add(main_win);
+ if (photocam == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
+ }
+ photocam2 = elm_photocam_add(main_win);
+ if (photocam2 == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam2..", __FILE__, __LINE__);
+ }
+
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_photocam_file_set
+ * @{
+ * @objective Positive Test case 01 checks if function set the photo file to be shown properly
+ * and doesn't cause segmentation fault
+ * @n Input Data:
+ * @li the photocam object
+ * @li "./photocam/tizen_efl.png" string
+ *
+ * @procedure
+ * @step 1 Set photo file to be shown
+ * @step 2 Get path of current file
+ *
+ * @passcondition Returned value is equal to EVAS_LOAD_ERROR_NONE at step 1,
+ * returned value is equal to "./photocam/tizen_efl.png" at step 2 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_file_set_p)
+{
+ Evas_Load_Error load_result = EVAS_LOAD_ERROR_GENERIC;
+ const char *file = NULL;
+
+ load_result = elm_photocam_file_set(photocam, "./photocam/tizen_efl.png");
+ if (load_result != EVAS_LOAD_ERROR_NONE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ file = elm_photocam_file_get(photocam);
+ if ((!file) || (strcmp(file, "./photocam/tizen_efl.png") != 0))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_file_set
+ * @{
+ * @objective Positive Test case 02 checks if function doesn't set the non existing photo file to be shown properly
+ * and doesn't cause segmentation fault when photocam is NULL
+ * @n Input Data:
+ * @li the photocam object (NULL in the second case)
+ * @li "non_existing.png" string, "./photocam/tizen_efl.png" (in the second case)
+ *
+ * @procedure
+ * @step 1 Set a non existing photo file to be shown
+ * @step 2 Set an existing photo file to be shown in case of NULL photoam
+ * @step 3 Check if the file was set
+ *
+ * @passcondition Returned value is equal to EVAS_LOAD_ERROR_DOES_NOT_EXIST in the first case and is equal to EVAS_LOAD_ERROR_NONE in the second
+ * @}
+ */
+START_TEST(utc_elm_photocam_file_set_p2)
+{
+ Evas_Load_Error load_result = EVAS_LOAD_ERROR_GENERIC;
+ Evas_Load_Error load_result2 = EVAS_LOAD_ERROR_GENERIC;
+ const char *file = NULL;
+
+ load_result = elm_photocam_file_set(photocam2, "non_existing.png");
+ load_result2 = elm_photocam_file_set(NULL, "./photocam/tizen_efl.png");
+ if ((load_result != EVAS_LOAD_ERROR_DOES_NOT_EXIST) ||
+ (load_result2 != EVAS_LOAD_ERROR_NONE)) {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_file_set
+ * @{
+ * @objective Negative Test case checks if function call with NULL
+ * instead of photocam, file parameters works properly and doesn't cause segmentation fault
+ * @n Input Data:
+ * @li NULL, the photocam object
+ * @li "./photocam/tizen_efl.png" string, NULL
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the photocam, file parameters
+ *
+ * @passcondition Returned value is equal to EVAS_LOAD_ERROR_NONE and there is no segmentation fault
+ * @}
+ */
+#ifdef NOT_APPROVED_FOR_BUILD
+START_TEST(utc_elm_photocam_file_set_n)
+{
+ if (UNITEST_FUNC_NEG_RET(EVAS_LOAD_ERROR_GENERIC, elm_photocam_file_set, photocam, "./photocam/tizen_efl.png") == TEST_FAIL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+#endif //NOT_APPROVED_FOR_BUILD
+
+/**
+ * @addtogroup elm_photocam_file_get
+ * @{
+ * @objective Negative Test case checks if function call with NULL
+ * instead of photocam parameter works properly and doesn't cause segmentation fault
+ * @n Input Data: NULL instead of the photocam object
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the photocam parameter
+ *
+ * @passcondition Returned value is equal to NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_file_get_n)
+{
+ if (UNITEST_FUNC_NEG_RET(NULL, elm_photocam_file_get, photocam) == TEST_FAIL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_add
+ * @{
+ * @objective Negative Test case checks if fucntion call with NULL instead of parent window
+ * works properly and doesn't cause segmentation fault
+ * @n Input Data: NULL instead of the window object
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the window object
+ *
+ * @passcondition Returned value is NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_add_n)
+{
+ if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_photocam_add, main_win))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_photocam_file_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_photocam_file_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_photocam_file_set_p);
+ tcase_add_test(tcase, utc_elm_photocam_file_set_p2);
+#ifdef NOT_APPROVED_FOR_BUILD
+ tcase_add_test(tcase, utc_elm_photocam_file_set_n);
+#endif
+ tcase_add_test(tcase, utc_elm_photocam_file_get_n);
+ tcase_add_test(tcase, utc_elm_photocam_add_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-static Evas_Object *photocam = NULL;
-static Evas_Object *photocam2 = NULL;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_file_set elm_photocam_file_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create new photocam and add it to parent window
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- photocam = elm_photocam_add(main_win);
- if (photocam == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
- return;
- }
- photocam2 = elm_photocam_add(main_win);
- if (photocam2 == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam2..", __FILE__, __LINE__);
- return;
- }
-
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_file_set
- * @{
- * @objective Positive Test case 01 checks if function set the photo file to be shown properly
- * and doesn't cause segmentation fault
- * @n Input Data:
- * @li the photocam object
- * @li "./photocam/tizen_efl.png" string
- *
- * @procedure
- * @step 1 Set photo file to be shown
- * @step 2 Get path of current file
- *
- * @passcondition Returned value is equal to EVAS_LOAD_ERROR_NONE at step 1,
- * returned value is equal to "./photocam/tizen_efl.png" at step 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_file_set_p)
-{
- Evas_Load_Error load_result = EVAS_LOAD_ERROR_GENERIC;
- const char *file = NULL;
-
- if (photocam == NULL)
- {
- return;
- }
- load_result = elm_photocam_file_set(photocam, "./photocam/tizen_efl.png");
- if (load_result != EVAS_LOAD_ERROR_NONE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- file = elm_photocam_file_get(photocam);
- if ((!file) || (strcmp(file, "./photocam/tizen_efl.png") != 0))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_file_set
- * @{
- * @objective Positive Test case 02 checks if function doesn't set the non existing photo file to be shown properly
- * and doesn't cause segmentation fault when photocam is NULL
- * @n Input Data:
- * @li the photocam object (NULL in the second case)
- * @li "non_existing.png" string, "./photocam/tizen_efl.png" (in the second case)
- *
- * @procedure
- * @step 1 Set a non existing photo file to be shown
- * @step 2 Set an existing photo file to be shown in case of NULL photoam
- * @step 3 Check if the file was set
- *
- * @passcondition Returned value is equal to EVAS_LOAD_ERROR_DOES_NOT_EXIST in the first case and is equal to EVAS_LOAD_ERROR_NONE in the second
- * @}
- */
-START_TEST(utc_elm_photocam_file_set_p2)
-{
- Evas_Load_Error load_result = EVAS_LOAD_ERROR_GENERIC;
- Evas_Load_Error load_result2 = EVAS_LOAD_ERROR_GENERIC;
- const char *file = NULL;
-
- if (photocam2 == NULL)
- {
- return;
- }
- load_result = elm_photocam_file_set(photocam2, "non_existing.png");
- load_result2 = elm_photocam_file_set(NULL, "./photocam/tizen_efl.png");
- if ((load_result != EVAS_LOAD_ERROR_DOES_NOT_EXIST) ||
- (load_result2 != EVAS_LOAD_ERROR_NONE)) {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_file_set
- * @{
- * @objective Negative Test case checks if function call with NULL
- * instead of photocam, file parameters works properly and doesn't cause segmentation fault
- * @n Input Data:
- * @li NULL, the photocam object
- * @li "./photocam/tizen_efl.png" string, NULL
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the photocam, file parameters
- *
- * @passcondition Returned value is equal to EVAS_LOAD_ERROR_NONE and there is no segmentation fault
- * @}
- */
-#ifdef NOT_APPROVED_FOR_BUILD
-START_TEST(utc_elm_photocam_file_set_n)
-{
- if (UNITEST_FUNC_NEG_RET(EVAS_LOAD_ERROR_GENERIC, elm_photocam_file_set, photocam, "./photocam/tizen_efl.png") == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-#endif //NOT_APPROVED_FOR_BUILD
-
-/**
- *@}
- */
-
-TCase * _utc_elm_photocam_file_set()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_file_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_photocam_file_set_p);
- tcase_add_test(tcase, utc_elm_photocam_file_set_p2);
-#ifdef NOT_APPROVED_FOR_BUILD
- tcase_add_test(tcase, utc_elm_photocam_file_set_n);
-#endif
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-static Evas_Object *main_win;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_gesture_enabled_get elm_photocam_gesture_enabled_get()
- *
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_gesture_enabled_get
- * @{
- * @objective Positive Test case 01: Set the gesture state for photocam
- * @n Input data:
- * @li valid Evas_Object (photocam)
- *
- * @procedure
- * @step 1 Add photocam to main win
- * @step 2 Set the gesture state for photocam
- * @step 3 Get the gesture state for photocam
- *
- * @passcondition: Test pass if returned value by get function
- * is same as the one set previously (EINA_TRUE)
- * @}
- */
-START_TEST(utc_UIFW_elm_photocam_gesture_enabled_get_p_01)
-{
- Evas_Object *photocam = NULL;
- Eina_Bool ret = EINA_FALSE;
- photocam = elm_photocam_add(main_win);
- elm_photocam_gesture_enabled_set(photocam, EINA_TRUE);
- ret = elm_photocam_gesture_enabled_get(photocam);
-
- if (ret != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- evas_object_del(photocam);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- evas_object_del(photocam);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_gesture_enabled_get
- * @{
- * @objective Negative Test 01: Call function with NULL as an argument
- * @n Input Data:
- * @li invalid Evas_Object (NULL)
- *
- * @procedure
- * @step 1 Call function with NULL as an argument
- *
- * @passcondition: Test pass if returned value EINA_FALSE and if there is no Segmentation fault
- * @}
- */
-START_TEST(utc_UIFW_elm_photocam_gesture_enabled_get_n_01)
-{
- Eina_Bool ret = elm_photocam_gesture_enabled_get(NULL);
-
- if (ret != EINA_FALSE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- * @}
- */
-
-TCase * _utc_elm_photocam_gesture_enabled_get()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_gesture_enabled_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_elm_photocam_gesture_enabled_get_p_01);
- tcase_add_test(tcase, utc_UIFW_elm_photocam_gesture_enabled_get_n_01);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+
+static Evas_Object *main_win;
+
+/**
+ * @addtogroup elm_photocam
+ * @{
+ * @defgroup elm_photocam_gesture_enabled_get elm_photocam_gesture_enabled_get()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ evas_object_show(main_win);
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_photocam_gesture_enabled_get
+ * @{
+ * @objective Positive Test case 01: Set the gesture state for photocam
+ * @n Input data:
+ * @li valid Evas_Object (photocam)
+ *
+ * @procedure
+ * @step 1 Add photocam to main win
+ * @step 2 Set the gesture state for photocam
+ * @step 3 Get the gesture state for photocam
+ *
+ * @passcondition: Test pass if returned value by get function
+ * is same as the one set previously (EINA_TRUE)
+ * @}
+ */
+START_TEST(utc_elm_photocam_gesture_enabled_get_p_01)
+{
+ Evas_Object *photocam = NULL;
+ Eina_Bool ret = EINA_FALSE;
+ photocam = elm_photocam_add(main_win);
+ elm_photocam_gesture_enabled_set(photocam, EINA_TRUE);
+ ret = elm_photocam_gesture_enabled_get(photocam);
+
+ if (ret != EINA_TRUE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ evas_object_del(photocam);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+ evas_object_del(photocam);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_gesture_enabled_get
+ * @{
+ * @objective Negative Test 01: Call function with NULL as an argument
+ * @n Input Data:
+ * @li invalid Evas_Object (NULL)
+ *
+ * @procedure
+ * @step 1 Call function with NULL as an argument
+ *
+ * @passcondition: Test pass if returned value EINA_FALSE and if there is no Segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_gesture_enabled_get_n_01)
+{
+ Eina_Bool ret = elm_photocam_gesture_enabled_get(NULL);
+
+ if (ret != EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_gesture_enabled_set
+ * @{
+ * @objective Negative Test 01: Call function with NULL as an argument
+ * @n Input Data:
+ * @li invalid Evas_Object (NULL)
+ * @li EINA_TRUE
+ *
+ * @procedure
+ * @step 1 Call function with NULL as an argument
+ *
+ * @passcondition: Test passes if there is no Segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_gesture_enabled_set_n_01)
+{
+ elm_photocam_gesture_enabled_set(NULL, EINA_TRUE);
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @}
+ */
+
+TCase * _utc_elm_photocam_gesture_enabled_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_photocam_gesture_enabled_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_photocam_gesture_enabled_get_p_01);
+ tcase_add_test(tcase, utc_elm_photocam_gesture_enabled_get_n_01);
+ tcase_add_test(tcase, utc_elm_photocam_gesture_enabled_set_n_01);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-
-static Evas_Object *main_win;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_gesture_enabled_set elm_photocam_gesture_enabled_set()
- *
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- */
-
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_gesture_enabled_set
- * @{
- * @objective Positive Test case 01: Set the gesture state for photocam
- * @n Input data:
- * @li valid Evas_Object (photocam)
- * @li EINA_TRUE
- *
- * @procedure
- * @step 1 Add photocam to main win
- * @step 2 Set the gesture state for photocam
- * @step 3 Get the gesture state for photocam
- *
- * @passcondition: Test pass if returned value by get function
- * is same as the one set previously (EINA_TRUE)
- * @}
- */
-START_TEST(utc_UIFW_elm_photocam_gesture_enabled_set_p_01)
-{
- Evas_Object *photocam = NULL;
- Eina_Bool ret = EINA_FALSE;
- photocam = elm_photocam_add(main_win);
- elm_photocam_gesture_enabled_set(photocam, EINA_TRUE);
- ret = elm_photocam_gesture_enabled_get(photocam);
-
- if (ret != EINA_TRUE)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- evas_object_del(photocam);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
- evas_object_del(photocam);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_gesture_enabled_set
- * @{
- * @objective Negative Test 01: Call function with NULL as an argument
- * @n Input Data:
- * @li invalid Evas_Object (NULL)
- * @li EINA_TRUE
- *
- * @procedure
- * @step 1 Call function with NULL as an argument
- *
- * @passcondition: Test passes if there is no Segmentation fault
- * @}
- */
-START_TEST(utc_UIFW_elm_photocam_gesture_enabled_set_n_01)
-{
- elm_photocam_gesture_enabled_set(NULL, EINA_TRUE);
-
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- * @}
- */
-
-TCase * _utc_elm_photocam_gesture_enabled_set()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_gesture_enabled_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_UIFW_elm_photocam_gesture_enabled_set_p_01);
- tcase_add_test(tcase, utc_UIFW_elm_photocam_gesture_enabled_set_n_01);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-static Evas_Object *photocam = NULL;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_paused_get elm_photocam_paused_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create new photocam and add it to parent window
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- photocam = elm_photocam_add(main_win);
- if (photocam == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_paused_get
- * @{
- * @objective Positive Test case checks if function get the paused state for photocam properly
- * and doesn't cause segmentation fault
- * @n Input Data: the photocam object
- *
- * @procedure
- * @step 1 Set paused state of photocam
- * @step 2 Get paused state of photocam
- *
- * @passcondition Returned value is equal to EINA_TRUE at step 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_paused_get_p)
-{
- Eina_Bool ret1 = EINA_FALSE, ret2 = EINA_FALSE;
-
- if (photocam == NULL)
- {
- return;
- }
- elm_photocam_paused_set(photocam, EINA_TRUE);
- ret1 = elm_photocam_paused_get(photocam);
- elm_photocam_paused_set(photocam, EINA_FALSE);
- ret2 = elm_photocam_paused_get(photocam);
- if ((ret1 != EINA_TRUE) || (ret2 != EINA_FALSE))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_paused_get
- * @{
- * @objective Negative Test case checks if function call with NULL
- * instead of photocam parameter works properly and doesn't cause segmentation fault
- * @n Input Data: NULL instead of the photocam object
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the photocam object
- *
- * @passcondition Returned value is equal to EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_paused_get_n)
-{
- if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_photocam_paused_get, photocam) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_photocam_paused_get()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_paused_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_photocam_paused_get_p);
- tcase_add_test(tcase, utc_elm_photocam_paused_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL;
+static Evas_Object *photocam = NULL;
+
+/**
+ * @addtogroup elm_photocam
+ * @{
+ * @defgroup elm_photocam_paused_get elm_photocam_paused_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Create new photocam and add it to parent window
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ photocam = elm_photocam_add(main_win);
+ if (photocam == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_photocam_paused_get
+ * @{
+ * @objective Positive Test case checks if function get the paused state for photocam properly
+ * and doesn't cause segmentation fault
+ * @n Input Data: the photocam object
+ *
+ * @procedure
+ * @step 1 Set paused state of photocam
+ * @step 2 Get paused state of photocam
+ *
+ * @passcondition Returned value is equal to EINA_TRUE at step 2 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_paused_get_p)
+{
+ Eina_Bool ret1 = EINA_FALSE, ret2 = EINA_FALSE;
+
+ elm_photocam_paused_set(photocam, EINA_TRUE);
+ ret1 = elm_photocam_paused_get(photocam);
+ elm_photocam_paused_set(photocam, EINA_FALSE);
+ ret2 = elm_photocam_paused_get(photocam);
+ if ((ret1 != EINA_TRUE) || (ret2 != EINA_FALSE))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_paused_get
+ * @{
+ * @objective Negative Test case checks if function call with NULL
+ * instead of photocam parameter works properly and doesn't cause segmentation fault
+ * @n Input Data: NULL instead of the photocam object
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the photocam object
+ *
+ * @passcondition Returned value is equal to EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_paused_get_n)
+{
+ if (UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_photocam_paused_get, photocam) == TEST_FAIL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_paused_set
+ * @{
+ * @objective Negative Test case checks if function call with NULL
+ * instead of photocam parameter works properly and doesn't cause segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the photocam object
+ * @li EINA_TRUE
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the photocam object
+ *
+ * @passcondition There is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_paused_set_n)
+{
+ CREATE_CHECKED_ARGS_ARRAY(1, 0);
+ UNITEST_FUNC_NEG_CA(elm_photocam_paused_set, photocam, EINA_TRUE);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_photocam_paused_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_photocam_paused_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_photocam_paused_get_p);
+ tcase_add_test(tcase, utc_elm_photocam_paused_get_n);
+ tcase_add_test(tcase, utc_elm_photocam_paused_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-static Evas_Object *photocam = NULL;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_paused_set elm_photocam_paused_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create new photocam and add it to parent window
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- photocam = elm_photocam_add(main_win);
- if (photocam == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_paused_set
- * @{
- * @objective Positive Test case checks if function set the paused state for photocam properly
- * and doesn't cause segmentation fault
- * @n Input Data:
- * @li the photocam object
- * @li EINA_TRUE and EINA_FALSE
- *
- * @procedure
- * @step 1 Set paused state of photocam
- * @step 2 Get paused state of photocam
- *
- * @passcondition Returned value is equal to EINA_TRUE at step 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_paused_set_p)
-{
- Eina_Bool ret1 = EINA_FALSE, ret2 = EINA_FALSE;
-
- if (photocam == NULL)
- {
- return;
- }
- elm_photocam_paused_set(photocam, EINA_TRUE);
- ret1 = elm_photocam_paused_get(photocam);
- elm_photocam_paused_set(photocam, EINA_FALSE);
- ret2 = elm_photocam_paused_get(photocam);
- if ((ret1 != EINA_TRUE) || (ret2 != EINA_FALSE))
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_paused_set
- * @{
- * @objective Negative Test case checks if function call with NULL
- * instead of photocam parameter works properly and doesn't cause segmentation fault
- * @n Input Data:
- * @li NULL instead of the photocam object
- * @li EINA_TRUE
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the photocam object
- *
- * @passcondition There is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_paused_set_n)
-{
- CREATE_CHECKED_ARGS_ARRAY(1, 0);
- UNITEST_FUNC_NEG_CA(elm_photocam_paused_set, photocam, EINA_TRUE);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_photocam_paused_set()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_paused_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_photocam_paused_set_p);
- tcase_add_test(tcase, utc_elm_photocam_paused_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include <math.h>
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-static Evas_Object *photocam = NULL;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_zoom_get elm_photocam_zoom_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create new photocam and add it to parent window
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- photocam = elm_photocam_add(main_win);
- if (photocam == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_zoom_get
- * @{
- * @objective Positive Test case checks if function get the zoom level of the photo properly
- * and doesn't cause segmentation fault
- * @n Input Data: the photocam object
- *
- * @procedure
- * @step 1 Set zoom level of photo
- * @step 2 Get zoom level of photo
- *
- * @passcondition Returned value is equal to 2.0 at step 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_zoom_get_p)
-{
- double ret = 0.0;
-
- if (photocam == NULL)
- {
- return;
- }
- elm_photocam_zoom_set(photocam, 2.0);
- ret = elm_photocam_zoom_get(photocam);
- if (fabs(ret - 2.0) > DBL_EPSILON)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_zoom_get
- * @{
- * @objective Negative Test case checks if function call with NULL
- * instead of photocam parameter works properly and doesn't cause segmentation fault
- * @n Input Data: NULL instead of the photocam object
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the photocam object
- *
- * @passcondition Returned value is equal to 0.0 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_zoom_get_n)
-{
- double ret = -1.0;
-
- ret = elm_photocam_zoom_get(NULL);
- if (fabs(ret) > DBL_EPSILON)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_photocam_zoom_get()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_zoom_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_photocam_zoom_get_p);
- tcase_add_test(tcase, utc_elm_photocam_zoom_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include <math.h>
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL;
+static Evas_Object *photocam = NULL;
+
+/**
+ * @addtogroup elm_photocam
+ * @{
+ * @defgroup elm_photocam_zoom_get elm_photocam_zoom_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Create new photocam and add it to parent window
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ photocam = elm_photocam_add(main_win);
+ if (photocam == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_photocam_zoom_get
+ * @{
+ * @objective Positive Test case checks if function get the zoom level of the photo properly
+ * and doesn't cause segmentation fault
+ * @n Input Data: the photocam object
+ *
+ * @procedure
+ * @step 1 Set zoom level of photo
+ * @step 2 Get zoom level of photo
+ *
+ * @passcondition Returned value is equal to 2.0 at step 2 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_zoom_get_p)
+{
+ double ret = 0.0;
+
+ elm_photocam_zoom_set(photocam, 2.0);
+ ret = elm_photocam_zoom_get(photocam);
+ if (fabs(ret - 2.0) > DBL_EPSILON)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_zoom_get
+ * @{
+ * @objective Negative Test case checks if function call with NULL
+ * instead of photocam parameter works properly and doesn't cause segmentation fault
+ * @n Input Data: NULL instead of the photocam object
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the photocam object
+ *
+ * @passcondition Returned value is equal to 0.0 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_zoom_get_n)
+{
+ double ret = -1.0;
+
+ ret = elm_photocam_zoom_get(NULL);
+ if (fabs(ret) > DBL_EPSILON)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_zoom_set
+ * @{
+ * @objective Negative Test case checks if function call with NULL
+ * instead of photocam parameter or -2.0 instead of zoom parameter works properly and doesn't cause segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the photocam object, the photocam object in the second case
+ * @li 2.0 and -2.0 in the second case
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the photocam object
+ * @step 2 Call test function with -2.0 instead of the zoom parameter
+ *
+ * @passcondition There is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_zoom_set_n)
+{
+ elm_photocam_zoom_set(NULL, 2.0);
+ elm_photocam_zoom_set(photocam, -2.0);
+ printf("[TEST_PASS]:: %s[%d]: Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_photocam_zoom_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_photocam_zoom_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_photocam_zoom_get_p);
+ tcase_add_test(tcase, utc_elm_photocam_zoom_get_n);
+ tcase_add_test(tcase, utc_elm_photocam_zoom_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-static Evas_Object *photocam = NULL;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_zoom_mode_get elm_photocam_zoom_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create new photocam and add it to parent window
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- photocam = elm_photocam_add(main_win);
- if (photocam == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_zoom_mode_get
- * @{
- * @objective Positive Test case checks if function get the zoom mode properly and doesn't cause segmentation fault
- * @n Input Data:
- * @li the photocam object
- *
- * @procedure
- * @step 1 Set zoom mode of photo to ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT
- * @step 2 Get zoom mode of photo
- *
- * @passcondition Returned value is equal to ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT at step 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_zoom_mode_get_p)
-{
- Elm_Photocam_Zoom_Mode ret = ELM_PHOTOCAM_ZOOM_MODE_MANUAL;
-
- if (photocam == NULL)
- {
- return;
- }
- elm_photocam_zoom_mode_set(photocam, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
- ret = elm_photocam_zoom_mode_get(photocam);
- if (ret != ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_zoom_mode_get
- * @{
- * @objective Negative Test case checks if function call with NULL instead of the photocam object works properly
- * and doesn't cause segmentation fault
- * @n Input Data: NULL instead of the photocam object
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the photocam object
- *
- * @passcondition Returned value is equal to ELM_PHOTOCAM_ZOOM_MODE_MANUAL and there is no segmentation fault
- * Note! ELM_PHOTOCAM_ZOOM_MODE_MANUAL is the default value
- * @}
- */
-START_TEST(utc_elm_photocam_zoom_mode_get_n)
-{
- if (UNITEST_FUNC_NEG_RET(ELM_PHOTOCAM_ZOOM_MODE_MANUAL, elm_photocam_zoom_mode_get, photocam) == TEST_FAIL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_photocam_zoom_mode_get()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_zoom_mode_get");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_photocam_zoom_mode_get_p);
- tcase_add_test(tcase, utc_elm_photocam_zoom_mode_get_n);
- return tcase;
-}
--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL;
+static Evas_Object *photocam = NULL;
+
+/**
+ * @addtogroup elm_photocam
+ * @{
+ * @defgroup elm_photocam_zoom_mode_get elm_photocam_zoom_mode_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Create new photocam and add it to parent window
+ */
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ UTC_ELM_INIT();
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+ photocam = elm_photocam_add(main_win);
+ if (photocam == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_photocam_zoom_mode_get
+ * @{
+ * @objective Positive Test case checks if function get the zoom mode properly and doesn't cause segmentation fault
+ * @n Input Data:
+ * @li the photocam object
+ *
+ * @procedure
+ * @step 1 Set zoom mode of photo to ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT
+ * @step 2 Get zoom mode of photo
+ *
+ * @passcondition Returned value is equal to ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT at step 2 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_zoom_mode_get_p)
+{
+ Elm_Photocam_Zoom_Mode ret = ELM_PHOTOCAM_ZOOM_MODE_MANUAL;
+
+ elm_photocam_zoom_mode_set(photocam, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
+ ret = elm_photocam_zoom_mode_get(photocam);
+ if (ret != ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_zoom_mode_get
+ * @{
+ * @objective Negative Test case checks if function call with NULL instead of the photocam object works properly
+ * and doesn't cause segmentation fault
+ * @n Input Data: NULL instead of the photocam object
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead of the photocam object
+ *
+ * @passcondition Returned value is equal to ELM_PHOTOCAM_ZOOM_MODE_MANUAL and there is no segmentation fault
+ * Note! ELM_PHOTOCAM_ZOOM_MODE_MANUAL is the default value
+ * @}
+ */
+START_TEST(utc_elm_photocam_zoom_mode_get_n)
+{
+ if (UNITEST_FUNC_NEG_RET(ELM_PHOTOCAM_ZOOM_MODE_MANUAL, elm_photocam_zoom_mode_get, photocam) == TEST_FAIL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_photocam_zoom_mode_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid parameters doesn't cause segmentation fault
+ * @n Input Data:
+ * @li NULL, the photocam object
+ * @li ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT, ELM_PHOTOCAM_ZOOM_MODE_MANUAL - 1
+ * Note! ELM_PHOTOCAM_ZOOM_MODE_MANUAL is the min value of Elm_Photocam_Zoom_Mode enum type
+ *
+ * @procedure
+ * @step 1 Call test function with invalid parameters
+ *
+ * @passcondition There is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_photocam_zoom_mode_set_n)
+{
+ elm_photocam_zoom_mode_set(NULL, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
+ elm_photocam_zoom_mode_set(photocam, ELM_PHOTOCAM_ZOOM_MODE_MANUAL - 1);
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_photocam_zoom_mode_get_set()
+{
+ TCase *tcase = tcase_create("utc_elm_photocam_zoom_mode_get_set");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_photocam_zoom_mode_get_p);
+ tcase_add_test(tcase, utc_elm_photocam_zoom_mode_get_n);
+ tcase_add_test(tcase, utc_elm_photocam_zoom_mode_set_n);
+ return tcase;
+}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-static Evas_Object *photocam = NULL;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_zoom_mode_set elm_photocam_zoom_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create new photocam and add it to parent window
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- photocam = elm_photocam_add(main_win);
- if (photocam == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_zoom_mode_set
- * @{
- * @objective Positive Test case checks if function set the zoom mode properly and doesn't cause segmentation fault
- * @n Input Data:
- * @li the photocam object
- * @li ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT
- *
- * @procedure
- * @step 1 Set zoom mode of photo to ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT
- * @step 2 Get zoom mode of photo
- *
- * @passcondition Returned value is equal to ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT at step 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_zoom_mode_set_p)
-{
- Elm_Photocam_Zoom_Mode ret = ELM_PHOTOCAM_ZOOM_MODE_MANUAL;
-
- if (photocam == NULL)
- {
- return;
- }
- elm_photocam_zoom_mode_set(photocam, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
- ret = elm_photocam_zoom_mode_get(photocam);
- if (ret != ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_zoom_mode_set
- * @{
- * @objective Negative Test case checks if function call with invalid parameters doesn't cause segmentation fault
- * @n Input Data:
- * @li NULL, the photocam object
- * @li ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT, ELM_PHOTOCAM_ZOOM_MODE_MANUAL - 1
- * Note! ELM_PHOTOCAM_ZOOM_MODE_MANUAL is the min value of Elm_Photocam_Zoom_Mode enum type
- *
- * @procedure
- * @step 1 Call test function with invalid parameters
- *
- * @passcondition There is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_zoom_mode_set_n)
-{
- elm_photocam_zoom_mode_set(NULL, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
- elm_photocam_zoom_mode_set(photocam, ELM_PHOTOCAM_ZOOM_MODE_MANUAL - 1);
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_photocam_zoom_mode_set()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_zoom_mode_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_photocam_zoom_mode_set_p);
- tcase_add_test(tcase, utc_elm_photocam_zoom_mode_set_n);
- return tcase;
-}
+++ /dev/null
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include <math.h>
-#include "../../utc_negative_unitest.h"
-static Evas_Object *main_win = NULL;
-static Evas_Object *photocam = NULL;
-
-/**
- * @addtogroup elm_photocam
- * @{
- * @defgroup elm_photocam_zoom_set elm_photocam_zoom_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- * @step 3 Create new photocam and add it to parent window
- */
-static void
-setup(void)
-{
- printf(" ============ Startup ============ \n");
- UTC_ELM_INIT();
- main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- if (main_win == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
- return;
- }
- evas_object_show(main_win);
- photocam = elm_photocam_add(main_win);
- if (photocam == NULL)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create photocam..", __FILE__, __LINE__);
- return;
- }
-}
-
-static void
-teardown(void)
-{
- if (main_win)
- {
- evas_object_del(main_win);
- main_win = NULL;
- }
- elm_shutdown();
- printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_photocam_zoom_set
- * @{
- * @objective Positive Test case checks if function set the zoom level of the photo properly
- * and doesn't cause segmentation fault
- * @n Input Data:
- * @li the photocam object
- * @li 2.0
- *
- * @procedure
- * @step 1 Set zoom level of photo
- * @step 2 Get zoom level of photo
- *
- * @passcondition Returned value is equal to 2.0 at step 2 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_zoom_set_p)
-{
- double ret = 0.0;
-
- if (photocam == NULL)
- {
- return;
- }
- elm_photocam_zoom_set(photocam, 2.0);
- ret = elm_photocam_zoom_get(photocam);
- if (fabs(ret - 2.0) > DBL_EPSILON)
- {
- ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
- return;
- }
- printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_photocam_zoom_set
- * @{
- * @objective Negative Test case checks if function call with NULL
- * instead of photocam parameter or -2.0 instead of zoom parameter works properly and doesn't cause segmentation fault
- * @n Input Data:
- * @li NULL instead of the photocam object, the photocam object in the second case
- * @li 2.0 and -2.0 in the second case
- *
- * @procedure
- * @step 1 Call test function with NULL instead of the photocam object
- * @step 2 Call test function with -2.0 instead of the zoom parameter
- *
- * @passcondition There is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_photocam_zoom_set_n)
-{
- if (photocam == NULL)
- {
- return;
- }
-
- elm_photocam_zoom_set(NULL, 2.0);
- elm_photocam_zoom_set(photocam, -2.0);
- printf("[TEST_PASS]:: %s[%d]: Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_photocam_zoom_set()
-{
- TCase *tcase = tcase_create("utc_elm_photocam_zoom_set");
- tcase_set_timeout(tcase, 30);
- tcase_add_checked_fixture(tcase, setup, teardown);
- tcase_add_test(tcase, utc_elm_photocam_zoom_set_p);
- tcase_add_test(tcase, utc_elm_photocam_zoom_set_n);
- return tcase;
-}