Revert "elementary/entry: add utc_elm_entry_cursor_coord_set/get test cases" 88/191188/1
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 12 Oct 2018 08:35:32 +0000 (17:35 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 12 Oct 2018 08:36:31 +0000 (17:36 +0900)
This reverts commit 255304848b317bf33c21a5bb664a0bee5636e9c0.

Change-Id: I7017f45ea04b200951ec53410c7dd38180853aae

TC/elementary/entry/tslist
TC/elementary/entry/tslist_mobile
TC/elementary/entry/tslist_tv
TC/elementary/entry/tslist_wear
TC/elementary/entry/utc_elm_entry_cursor_coord_get.c [deleted file]
TC/elementary/entry/utc_elm_entry_cursor_coord_set.c [deleted file]

index bded8f4c43740647bf05432ee580d57384de82cf..9c6f9a3d6706ca095ebfa9dd7425302ed96de29a 100644 (file)
@@ -22,8 +22,6 @@ utc_elm_entry_cursor_prev.c
 utc_elm_entry_cursor_selection_begin_end.c
 utc_elm_entry_cursor_up.c
 utc_elm_entry_editable_get_set.c
-utc_elm_entry_cursor_coord_set.c
-utc_elm_entry_cursor_coord_get.c
 utc_elm_entry_entry_append.c
 utc_elm_entry_entry_get_set.c
 utc_elm_entry_entry_insert.c
index bded8f4c43740647bf05432ee580d57384de82cf..9c6f9a3d6706ca095ebfa9dd7425302ed96de29a 100644 (file)
@@ -22,8 +22,6 @@ utc_elm_entry_cursor_prev.c
 utc_elm_entry_cursor_selection_begin_end.c
 utc_elm_entry_cursor_up.c
 utc_elm_entry_editable_get_set.c
-utc_elm_entry_cursor_coord_set.c
-utc_elm_entry_cursor_coord_get.c
 utc_elm_entry_entry_append.c
 utc_elm_entry_entry_get_set.c
 utc_elm_entry_entry_insert.c
index a9fcacab4ddb5db9b53e7c841dcfb7eb8ef6a742..c9c08769ccdbb00c82bce74b2cdc7f1baaa1d6ff 100644 (file)
@@ -22,8 +22,6 @@ utc_elm_entry_cursor_prev.c
 utc_elm_entry_cursor_selection_begin_end.c
 utc_elm_entry_cursor_up.c
 utc_elm_entry_editable_get_set.c
-utc_elm_entry_cursor_coord_set.c
-utc_elm_entry_cursor_coord_get.c
 utc_elm_entry_entry_append.c
 utc_elm_entry_entry_get_set.c
 utc_elm_entry_entry_insert.c
index a9fcacab4ddb5db9b53e7c841dcfb7eb8ef6a742..c9c08769ccdbb00c82bce74b2cdc7f1baaa1d6ff 100644 (file)
@@ -22,8 +22,6 @@ utc_elm_entry_cursor_prev.c
 utc_elm_entry_cursor_selection_begin_end.c
 utc_elm_entry_cursor_up.c
 utc_elm_entry_editable_get_set.c
-utc_elm_entry_cursor_coord_set.c
-utc_elm_entry_cursor_coord_get.c
 utc_elm_entry_entry_append.c
 utc_elm_entry_entry_get_set.c
 utc_elm_entry_entry_insert.c
diff --git a/TC/elementary/entry/utc_elm_entry_cursor_coord_get.c b/TC/elementary/entry/utc_elm_entry_cursor_coord_get.c
deleted file mode 100644 (file)
index 6fbac29..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-
-Evas_Object *main_win;
-
-/**
- * @addtogroup elm_entry
- * @{
- * @defgroup elm_entry_cursor_coord_get elm_entry_cursor_coord_get()
- *
- *
- * @precondition
- * @step 1 elm initialized successfully through elm_init().
- * @step 2 Create a main window.
- */
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   elm_init(0, NULL);
-   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-}
-
-static void
-teardown(void)
-{
-   if (main_win)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_entry_cursor_coord_get
- * @{
- * @objective Positive test case 1: Get the cursor coordinates
- *
- * @n Input Data:
- * @li Valid pointer to Evas_Object named entry;
- * @li Valid pointer to output parameter (x - coordinate);
- * @li Valid pointer to output parameter (y - coordinate);
- *
- * @procedure
- * @step 1 Add a entry object to main window.
- * @step 2 Set the text to the entry
- * @step 4 Get the current cursor coordinate
- * @step 3 Move the cursor to the next position
- * @step 4 Get the current cursor coordinate
- * @step 5 Compare the coordinates
- *
- * @passcondition: API call was successful and the coordinates are updated
- * @}
- */
-START_TEST(utc_elm_entry_cursor_coord_get_p_1)
-{
-   Evas_Object *entry = NULL;
-   int cx1, cy1, cx2, cy2;
-
-   cx1 = cy1 = cx2 = cy2 = 0;
-
-   entry = elm_entry_add(main_win);
-   elm_entry_entry_set(entry, "Hello!");
-   elm_entry_cursor_coord_get(entry, &cx1, &cy1);
-   elm_entry_cursor_next(entry);
-   elm_entry_cursor_coord_get(entry, &cx2, &cy2);
-
-   if ((cx1 == cx2) && (cy1 == cy2))
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. the cursor coordinate is no updated. xy[%d %d]", __FILE__, __LINE__, cx1, cy1);
-     }
-
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-
-/**
- * @addtogroup elm_entry_cursor_coord_get
- * @{
- * @objective Negative test case: Calling function with NULL entry
- *
- * @n Input Data:
- * @li Invalid (NULL) pointer to Evas_Object;
- * @li NULL pointer to output parameter (x - coordinate);
- * @li NULL pointer to output parameter (y - coordinate);
- *
- * @procedure
- * @step 1 Call function with NULL entry parameter
- *
- * @passcondition: Function doesn't cause segmentation fault
- * @}
- */
-START_TEST(utc_elm_entry_cursor_coord_get_n_1)
-{
-   elm_entry_cursor_coord_get(NULL, NULL, NULL);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_entry_cursor_coord_get");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_entry_cursor_coord_get_p_1);
-   tcase_add_test(tcase, utc_elm_entry_cursor_coord_get_n_1);
-   suite_add_tcase(suite, tcase);
-
-   return suite;
-}
-
-int
-main()
-{
-   int number_failed;
-
-   Suite *suite = test_suite();
-   SRunner *srunner = srunner_create(suite);
-   srunner_set_log(srunner, "utc_elm_entry_cursor_coord_get.log");
-   srunner_set_xml(srunner, "utc_elm_entry_cursor_coord_get.xml");
-   srunner_run_all(srunner, CK_NORMAL);
-   number_failed = srunner_ntests_failed(srunner);
-   srunner_free(srunner);
-
-   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/TC/elementary/entry/utc_elm_entry_cursor_coord_set.c b/TC/elementary/entry/utc_elm_entry_cursor_coord_set.c
deleted file mode 100644 (file)
index b98f10f..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-
-Evas_Object *main_win;
-
-/**
- * @addtogroup elm_entry
- * @{
- * @defgroup elm_entry_cursor_coord_set elm_entry_cursor_coord_set()
- *
- *
- * @precondition
- * @step 1 elm initialized successfully through elm_init().
- * @step 2 Create a main window.
- */
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   elm_init(0, NULL);
-   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-}
-
-static void
-teardown(void)
-{
-   if (main_win)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_entry_cursor_coord_set
- * @{
- * @objective Positive test case 1: Set the cursor coordinates
- *
- * @n Input Data:
- * @li Valid pointer to Evas_Object named entry;
- * @li Valid x coordinate value;
- * @li Valid y coordinate value;
- *
- * @procedure
- * @step 1 Add a entry object to main window.
- * @step 2 Set the text to the entry
- * @step 3 Get the head cursor coordinate
- * @step 4 Move the cursor to the end of text
- * @step 5 Get the end cursor coordinate
- * @step 6 Set the cursor coordinate at the middle of both cursor coordinates
- * @step 7 Get the cursor position which is moved to middle of text
- *
- * @passcondition: API call was successful and the coordinates and position are updated
- * @}
- */
-START_TEST(utc_elm_entry_cursor_coord_set_p_1)
-{
-   Evas_Object *entry = NULL;
-   int cx1, cy1, cx2, cy2, cxm, cym;
-   int cpos1, cpos2, cposm;
-   Eina_Bool ret;
-
-   cx1 = cy1 = cx2 = cy2 = cxm = cym = cpos1 = cpos2 = cposm = 0;
-
-   entry = elm_entry_add(main_win);
-   elm_entry_single_line_set(entry, EINA_TRUE);
-   elm_entry_entry_set(entry, "Hello!");
-   evas_object_resize(entry, 500, 500);
-   evas_object_show(entry);
-
-   cpos1 = elm_entry_cursor_pos_get(entry);
-   elm_entry_cursor_coord_get(entry, &cx1, &cy1);
-
-   elm_entry_cursor_end_set(entry);
-   cpos2 = elm_entry_cursor_pos_get(entry);
-   elm_entry_cursor_coord_get(entry, &cx2, &cy2);
-
-   if (cpos1 == cpos2)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. the cursor position is not updated. pos[%d]", __FILE__, __LINE__, cpos1);
-     }
-   if ((cx1 == cx2) && (cy1 == cy2))
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. the cursor coordinate is not updated. xy[%d %d]", __FILE__, __LINE__, cx1, cy1);
-     }
-
-   ret = elm_entry_cursor_coord_set(entry, (cx2 - cx1) / 2, cy1);
-   if (ret == EINA_FALSE)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-     }
-
-   cposm = elm_entry_cursor_pos_get(entry);
-   elm_entry_cursor_coord_get(entry, &cxm, &cym);
-
-   if (!((cpos1 < cposm) && (cposm < cpos2)))
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. the cursor position is not in the middle. pos1[%d], pos2[%d], posm[%d]", __FILE__, __LINE__, cpos1, cpos2, cposm);
-     }
-   if (!((cx1 < cxm) && (cxm < cx2)))
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. the cursor position is not in the middle. cx1[%d], cx2[%d], cxm[%d]", __FILE__, __LINE__, cx1, cx2, cxm);
-     }
-
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-
-/**
- * @addtogroup elm_entry_cursor_coord_get
- * @{
- * @objective Negative test case: Calling function with NULL entry
- *
- * @n Input Data:
- * @li Invalid (NULL) pointer to Evas_Object;
- * @li -1 x coordinate;
- * @li -1 y coordinate;
- *
- * @procedure
- * @step 1 Call function with NULL entry parameter
- *
- * @passcondition: Function doesn't cause segmentation fault
- * @}
- */
-START_TEST(utc_elm_entry_cursor_coord_set_n_1)
-{
-   Eina_Bool ret = elm_entry_cursor_coord_set(NULL, -1, -1);
-   if (ret == EINA_TRUE)
-     {
-        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
-/**
- *@}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_entry_cursor_coord_set");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_entry_cursor_coord_set_p_1);
-   tcase_add_test(tcase, utc_elm_entry_cursor_coord_set_n_1);
-   suite_add_tcase(suite, tcase);
-
-   return suite;
-}
-
-int
-main()
-{
-   int number_failed;
-
-   Suite *suite = test_suite();
-   SRunner *srunner = srunner_create(suite);
-   srunner_set_log(srunner, "utc_elm_entry_cursor_coord_set.log");
-   srunner_set_xml(srunner, "utc_elm_entry_cursor_coord_set.xml");
-   srunner_run_all(srunner, CK_NORMAL);
-   number_failed = srunner_ntests_failed(srunner);
-   srunner_free(srunner);
-
-   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}