dayselector.
authorChunEon Park <chuneon.park@samsung.com>
Fri, 29 Oct 2010 09:17:47 +0000 (18:17 +0900)
committerChunEon Park <chuneon.park@samsung.com>
Fri, 29 Oct 2010 09:17:47 +0000 (18:17 +0900)
TC/elm_ts/dayselector/tet_captured
TC/elm_ts/dayselector/tslist
TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_add_func
TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_get_func [new file with mode: 0755]
TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_get_func.c [new file with mode: 0644]
TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_set_func [new file with mode: 0755]
TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_set_func.c [new file with mode: 0644]

index 271e501..60636af 100644 (file)
@@ -1 +1 @@
-make: `utc_UIFW_elm_dayselector_add_func' is up to date.
+make: `utc_UIFW_elm_dayselector_check_state_get_func' is up to date.
index 77e2693..f34574c 100644 (file)
@@ -1,2 +1,3 @@
 /elm_ts/dayselector/utc_UIFW_elm_dayselector_add_func
+/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_set_func
 /elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_get_func
index c901b93..57bc6f5 100755 (executable)
Binary files a/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_add_func and b/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_add_func differ
diff --git a/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_get_func b/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_get_func
new file mode 100755 (executable)
index 0000000..c379d13
Binary files /dev/null and b/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_get_func differ
diff --git a/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_get_func.c b/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_get_func.c
new file mode 100644 (file)
index 0000000..4c67a29
--- /dev/null
@@ -0,0 +1,108 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+       Evas_Object *err = y; \
+       if (err == (x1)) \
+               { \
+                       tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+                       tet_result(TET_FAIL); \
+                       return; \
+               } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+       Evas_Object *err = y; \
+       if (err != (x1)) \
+               { \
+                       tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+                       tet_result(TET_FAIL); \
+                       return; \
+               } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *dayselector;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_dayselector_check_state_get_func_01(void);
+static void utc_UIFW_elm_dayselector_check_state_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_dayselector_check_state_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_dayselector_check_state_get_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0 }
+};
+
+static void startup(void)
+{
+       tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+       elm_init(0, NULL);
+       main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+       evas_object_show(main_win);
+
+       dayselector = elm_dayselector_add(main_win);
+       evas_object_show(dayselector);
+       
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_dayselector_check_state_get()
+ */
+static void utc_UIFW_elm_dayselector_check_state_get_func_01(void)
+{
+       int r = 0;
+
+       elm_dayselector_check_state_set(dayselector, ELM_DAYSELECTOR_MON, EINA_TRUE);
+       r = elm_dayselector_check_state_get(dayselector, ELM_DAYSELECTOR_MON);
+       
+       if (!r) {
+               tet_infoline("elm_dayselector_check_state_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_dayselector_check_state_get()
+ */
+static void utc_UIFW_elm_dayselector_check_state_get_func_02(void)
+{
+       int r = 0;
+       elm_dayselector_check_state_set(dayselector, ELM_DAYSELECTOR_MON, EINA_TRUE);
+       r = elm_dayselector_check_state_get(NULL, ELM_DAYSELECTOR_MON);
+       
+       if (r) {
+               tet_infoline("elm_dayselector_check_state_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_set_func b/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_set_func
new file mode 100755 (executable)
index 0000000..c7587e5
Binary files /dev/null and b/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_set_func differ
diff --git a/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_set_func.c b/TC/elm_ts/dayselector/utc_UIFW_elm_dayselector_check_state_set_func.c
new file mode 100644 (file)
index 0000000..caf8573
--- /dev/null
@@ -0,0 +1,81 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// Definitions
+// For checking the result of the positive test case.
+#define TET_CHECK_PASS(x1, y...) \
+{ \
+       Evas_Object *err = y; \
+       if (err == (x1)) \
+               { \
+                       tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+                       tet_result(TET_FAIL); \
+                       return; \
+               } \
+}
+
+// For checking the result of the negative test case.
+#define TET_CHECK_FAIL(x1, y...) \
+{ \
+       Evas_Object *err = y; \
+       if (err != (x1)) \
+               { \
+                       tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
+                       tet_result(TET_FAIL); \
+                       return; \
+               } \
+}
+
+
+Evas_Object *main_win;
+Evas_Object *dayselector;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_dayselector_check_state_set_func_01(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_dayselector_check_state_set_func_01, POSITIVE_TC_IDX },
+       { NULL, 0 }
+};
+
+static void startup(void)
+{
+       tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+       elm_init(0, NULL);
+       main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+       evas_object_show(main_win);     
+
+       dayselector = elm_dayselector_add(main_win);
+       evas_object_show(dayselector);
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_dayselector_check_state_set()
+ */
+static void utc_UIFW_elm_dayselector_check_state_set_func_01(void)
+{
+       elm_dayselector_check_state_set(dayselector, ELM_DAYSELECTOR_MON, EINA_TRUE);
+       tet_result(TET_PASS);
+}
+
+