Added calendar TC.
authorsanghoon80.cho <sanghoon80.cho@samsung.com>
Fri, 17 Sep 2010 02:58:28 +0000 (11:58 +0900)
committersanghoon80.cho <sanghoon80.cho@samsung.com>
Fri, 17 Sep 2010 02:58:28 +0000 (11:58 +0900)
22 files changed:
TC/elm_ts/calendar/Makefile [new file with mode: 0755]
TC/elm_ts/calendar/tc_gen.sh [new file with mode: 0755]
TC/elm_ts/calendar/tet_captured [new file with mode: 0644]
TC/elm_ts/calendar/tslist [new file with mode: 0644]
TC/elm_ts/calendar/utc_MODULE_API_func.c.in [new file with mode: 0755]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_add_func [new file with mode: 0755]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_add_func.c [new file with mode: 0644]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_day_selection_enabled_get_func [new file with mode: 0755]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_day_selection_enabled_get_func.c [new file with mode: 0644]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_interval_get_func [new file with mode: 0755]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_interval_get_func.c [new file with mode: 0644]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_mark_add_func [new file with mode: 0755]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_mark_add_func.c [new file with mode: 0644]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_marks_get_func [new file with mode: 0755]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_marks_get_func.c [new file with mode: 0644]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_min_max_year_get_func [new file with mode: 0755]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_min_max_year_get_func.c [new file with mode: 0644]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_selected_time_get_func [new file with mode: 0755]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_selected_time_get_func.c [new file with mode: 0644]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_weekdays_names_get_func [new file with mode: 0755]
TC/elm_ts/calendar/utc_UIFW_elm_calendar_weekdays_names_get_func.c [new file with mode: 0644]
TC/tet_scen_arm

diff --git a/TC/elm_ts/calendar/Makefile b/TC/elm_ts/calendar/Makefile
new file mode 100755 (executable)
index 0000000..735ac93
--- /dev/null
@@ -0,0 +1,29 @@
+CC ?= gcc
+
+TARGETS = utc_UIFW_elm_calendar_add_func \
+         utc_UIFW_elm_calendar_weekdays_names_get_func \
+         utc_UIFW_elm_calendar_interval_get_func \
+         utc_UIFW_elm_calendar_day_selection_enabled_get_func \
+         utc_UIFW_elm_calendar_mark_add_func \
+         utc_UIFW_elm_calendar_marks_get_func \
+         utc_UIFW_elm_calendar_min_max_year_get_func \
+         utc_UIFW_elm_calendar_selected_time_get_func 
+
+PKGS = elementary
+
+LDFLAGS = `pkg-config --libs $(PKGS)`
+LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
+
+CFLAGS = -I. `pkg-config --cflags $(PKGS)`
+CFLAGS += -I$(TET_ROOT)/inc/tet3
+CFLAGS += -Wall
+
+all: $(TARGETS)
+
+$(TARGET): %: %.c
+       $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
+
+clean:
+       rm -f $(TARGETS)
diff --git a/TC/elm_ts/calendar/tc_gen.sh b/TC/elm_ts/calendar/tc_gen.sh
new file mode 100755 (executable)
index 0000000..a55200a
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+TMPSTR=$0
+SCRIPT=${TMPSTR##*/}
+
+if [ $# -lt 3 ]; then
+       echo "Usage) $SCRIPT module_name winset_name api_name"
+       exit 1
+fi
+
+MODULE=$1
+WINSET=$2
+API=$3
+TEMPLATE=utc_MODULE_API_func.c.in
+TESTCASE=utc_${MODULE}_${API}_func
+
+sed -e '
+       s^@API@^'"$API"'^g
+       s^@MODULE@^'"$MODULE"'^g
+       ' $TEMPLATE > $TESTCASE.c
+
+if [ ! -e "$TESTCASE.c" ]; then
+       echo "Failed"
+       exit 1
+fi
+
+echo "/elm_ts/$WINSET/$TESTCASE" >> tslist
+
+echo "Testcase file is $TESTCASE.c"
+echo "$TESTCASE is added to tslist"
+echo "Done"
+echo "please put \"$TESTCASE\" as Target in Makefile"
diff --git a/TC/elm_ts/calendar/tet_captured b/TC/elm_ts/calendar/tet_captured
new file mode 100644 (file)
index 0000000..00e86dc
--- /dev/null
@@ -0,0 +1 @@
+make: `utc_UIFW_elm_calendar_marks_get_func' is up to date.
diff --git a/TC/elm_ts/calendar/tslist b/TC/elm_ts/calendar/tslist
new file mode 100644 (file)
index 0000000..6e65007
--- /dev/null
@@ -0,0 +1,8 @@
+/elm_ts/calendar/utc_UIFW_elm_calendar_add_func
+/elm_ts/calendar/utc_UIFW_elm_calendar_weekdays_names_get_func
+/elm_ts/calendar/utc_UIFW_elm_calendar_interval_get_func
+/elm_ts/calendar/utc_UIFW_elm_calendar_min_max_year_get_func
+/elm_ts/calendar/utc_UIFW_elm_calendar_day_selection_enabled_get_func
+/elm_ts/calendar/utc_UIFW_elm_calendar_selected_time_get_func
+/elm_ts/calendar/utc_UIFW_elm_calendar_mark_add_func
+/elm_ts/calendar/utc_UIFW_elm_calendar_marks_get_func
diff --git a/TC/elm_ts/calendar/utc_MODULE_API_func.c.in b/TC/elm_ts/calendar/utc_MODULE_API_func.c.in
new file mode 100755 (executable)
index 0000000..da52d9f
--- /dev/null
@@ -0,0 +1,90 @@
+#include <tet_api.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; \
+               } \
+}
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_@MODULE@_@API@_func_01(void);
+static void utc_@MODULE@_@API@_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_@MODULE@_@API@_func_01, POSITIVE_TC_IDX },
+       { utc_@MODULE@_@API@_func_02, NEGATIVE_TC_IDX },
+};
+
+static void startup(void)
+{
+}
+
+static void cleanup(void)
+{
+}
+
+/**
+ * @brief Positive test case of @API@()
+ */
+static void utc_@MODULE@_@API@_func_01(void)
+{
+       int r = 0;
+
+/*
+       r = @API@(...);
+*/
+       if (r) {
+               tet_infoline("@API@() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init @API@()
+ */
+static void utc_@MODULE@_@API@_func_02(void)
+{
+       int r = 0;
+
+/*
+       r = @API@(...);
+*/
+       if (r) {
+               tet_infoline("@API@() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_add_func b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_add_func
new file mode 100755 (executable)
index 0000000..627706a
Binary files /dev/null and b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_add_func differ
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_add_func.c b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_add_func.c
new file mode 100644 (file)
index 0000000..bd9e93b
--- /dev/null
@@ -0,0 +1,99 @@
+#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 *test_eo = NULL;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_calendar_add_func_01(void);
+static void utc_UIFW_elm_calendar_add_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_calendar_add_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_calendar_add_func_02, NEGATIVE_TC_IDX },
+};
+
+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);
+}
+
+static void cleanup(void)
+{
+        if ( NULL != main_win ) {
+                evas_object_del(main_win);
+                main_win = NULL;
+        }
+       
+        if ( NULL != test_eo ) {
+                evas_object_del(test_eo);
+                test_eo = NULL;
+        }
+
+        elm_shutdown();
+        tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_calendar_add()
+ */
+static void utc_UIFW_elm_calendar_add_func_01(void)
+{
+       test_eo = elm_calendar_add(main_win);
+       TET_CHECK_PASS(NULL, test_eo);
+
+       tet_result(TET_PASS);
+       tet_infoline("elm_calendar_add() failed in positive test case");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_calendar_add()
+ */
+static void utc_UIFW_elm_calendar_add_func_02(void)
+{
+       test_eo = elm_calendar_add(NULL);
+       TET_CHECK_FAIL(NULL, test_eo);
+
+       tet_result(TET_PASS);
+       tet_infoline("elm_calendar_add() failed in negative test case");
+}
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_day_selection_enabled_get_func b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_day_selection_enabled_get_func
new file mode 100755 (executable)
index 0000000..029233c
Binary files /dev/null and b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_day_selection_enabled_get_func differ
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_day_selection_enabled_get_func.c b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_day_selection_enabled_get_func.c
new file mode 100644 (file)
index 0000000..1f615bb
--- /dev/null
@@ -0,0 +1,110 @@
+#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 *test_eo = NULL;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_calendar_day_selection_enabled_get_func_01(void);
+static void utc_UIFW_elm_calendar_day_selection_enabled_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_calendar_day_selection_enabled_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_calendar_day_selection_enabled_get_func_02, NEGATIVE_TC_IDX },
+};
+
+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);
+
+       test_eo = elm_calendar_add(main_win);
+       elm_calendar_day_selection_enabled_set(test_eo, EINA_TRUE);
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+
+       if ( NULL != test_eo ) {
+               evas_object_del(test_eo);
+               test_eo = NULL;
+       }
+
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_calendar_day_selection_enabled_get()
+ */
+static void utc_UIFW_elm_calendar_day_selection_enabled_get_func_01(void)
+{
+       Eina_Bool enabled;
+
+       enabled = elm_calendar_day_selection_enabled_get(test_eo);
+       if (!enabled) {
+               tet_infoline("elm_calendar_day_selection_enabled_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_calendar_day_selection_enabled_get()
+ */
+static void utc_UIFW_elm_calendar_day_selection_enabled_get_func_02(void)
+{
+       Eina_Bool enabled;
+
+       enabled = elm_calendar_day_selection_enabled_get(NULL);
+       if (enabled) {
+               tet_infoline("elm_calendar_day_selection_enabled_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_interval_get_func b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_interval_get_func
new file mode 100755 (executable)
index 0000000..0ee2aa3
Binary files /dev/null and b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_interval_get_func differ
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_interval_get_func.c b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_interval_get_func.c
new file mode 100644 (file)
index 0000000..ec205f0
--- /dev/null
@@ -0,0 +1,111 @@
+#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 *test_eo = NULL;
+double interval = 0.4;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_calendar_interval_get_func_01(void);
+static void utc_UIFW_elm_calendar_interval_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_calendar_interval_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_calendar_interval_get_func_02, NEGATIVE_TC_IDX },
+};
+
+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);
+
+       test_eo = elm_calendar_add(main_win);
+       elm_calendar_interval_set(test_eo, interval);
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+
+       if ( NULL != test_eo ) {
+               evas_object_del(test_eo);
+               test_eo = NULL;
+       }
+
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_calendar_interval_get()
+ */
+static void utc_UIFW_elm_calendar_interval_get_func_01(void)
+{
+       double val;
+
+       val = elm_calendar_interval_get(test_eo);
+       if (val != interval) {
+               tet_infoline("elm_calendar_interval_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_calendar_interval_get()
+ */
+static void utc_UIFW_elm_calendar_interval_get_func_02(void)
+{
+       double val;
+
+       val = elm_calendar_interval_get(NULL);
+       if (val == interval) {
+               tet_infoline("elm_calendar_interval_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_mark_add_func b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_mark_add_func
new file mode 100755 (executable)
index 0000000..379e992
Binary files /dev/null and b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_mark_add_func differ
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_mark_add_func.c b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_mark_add_func.c
new file mode 100644 (file)
index 0000000..9712f81
--- /dev/null
@@ -0,0 +1,118 @@
+#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 *test_eo = NULL;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_calendar_mark_add_func_01(void);
+static void utc_UIFW_elm_calendar_mark_add_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_calendar_mark_add_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_calendar_mark_add_func_02, NEGATIVE_TC_IDX },
+};
+
+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);
+
+        test_eo = elm_calendar_add(main_win);
+}
+
+static void cleanup(void)
+{
+        if ( NULL != main_win ) {
+                evas_object_del(main_win);
+                main_win = NULL;
+        }
+
+        if ( NULL != test_eo ) {
+                evas_object_del(test_eo);
+                test_eo = NULL;
+        }
+
+        elm_shutdown();
+        tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+
+/**
+ * @brief Positive test case of elm_calendar_mark_add()
+ */
+static void utc_UIFW_elm_calendar_mark_add_func_01(void)
+{
+        Elm_Calendar_Mark *mark;
+        struct tm selected_time;
+        time_t current_time;
+
+        current_time = time(NULL) + 1 * 84600;
+        localtime_r(&current_time, &selected_time);
+       mark = elm_calendar_mark_add(test_eo, "checked", &selected_time, ELM_CALENDAR_UNIQUE);
+       if (!mark) {
+               tet_infoline("elm_calendar_mark_add() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_calendar_mark_add()
+ */
+static void utc_UIFW_elm_calendar_mark_add_func_02(void)
+{
+       Elm_Calendar_Mark *mark;
+        struct tm selected_time;
+        time_t current_time;
+
+        current_time = time(NULL) + 1 * 84600;
+        localtime_r(&current_time, &selected_time);
+       mark = elm_calendar_mark_add(NULL, "checked", &selected_time, ELM_CALENDAR_UNIQUE);
+       if (mark) {
+               tet_infoline("elm_calendar_mark_add() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_marks_get_func b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_marks_get_func
new file mode 100755 (executable)
index 0000000..a859c20
Binary files /dev/null and b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_marks_get_func differ
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_marks_get_func.c b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_marks_get_func.c
new file mode 100644 (file)
index 0000000..8492c51
--- /dev/null
@@ -0,0 +1,117 @@
+#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 *test_eo = NULL;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_calendar_marks_get_func_01(void);
+static void utc_UIFW_elm_calendar_marks_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_calendar_marks_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_calendar_marks_get_func_02, NEGATIVE_TC_IDX },
+};
+
+static void startup(void)
+{
+        tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+       Elm_Calendar_Mark *mark;
+       struct tm selected_time;
+       time_t current_time;
+
+        elm_init(0, NULL);
+        main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+        evas_object_show(main_win);
+
+        test_eo = elm_calendar_add(main_win);
+
+       current_time = time(NULL) + 1 * 84600;
+       localtime_r(&current_time, &selected_time);
+       mark = elm_calendar_mark_add(test_eo, "checked", &selected_time, ELM_CALENDAR_UNIQUE);
+}
+
+static void cleanup(void)
+{
+        if ( NULL != main_win ) {
+                evas_object_del(main_win);
+                main_win = NULL;
+        }
+
+        if ( NULL != test_eo ) {
+                evas_object_del(test_eo);
+                test_eo = NULL;
+        }
+
+        elm_shutdown();
+        tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_calendar_marks_get()
+ */
+static void utc_UIFW_elm_calendar_marks_get_func_01(void)
+{
+       Eina_List *marks = NULL;
+
+       marks = elm_calendar_marks_get(test_eo);
+       if (!marks) {
+               tet_infoline("elm_calendar_marks_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_calendar_marks_get()
+ */
+static void utc_UIFW_elm_calendar_marks_get_func_02(void)
+{
+       Eina_List *marks = NULL;
+
+       marks = elm_calendar_marks_get(NULL);
+       if (marks) {
+               tet_infoline("elm_calendar_marks_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_min_max_year_get_func b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_min_max_year_get_func
new file mode 100755 (executable)
index 0000000..3a68582
Binary files /dev/null and b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_min_max_year_get_func differ
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_min_max_year_get_func.c b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_min_max_year_get_func.c
new file mode 100644 (file)
index 0000000..31d9086
--- /dev/null
@@ -0,0 +1,112 @@
+#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 *test_eo = NULL;
+static int min_year = 2010;
+static int max_year = 2010;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_calendar_min_max_year_get_func_01(void);
+static void utc_UIFW_elm_calendar_min_max_year_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_calendar_min_max_year_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_calendar_min_max_year_get_func_02, NEGATIVE_TC_IDX },
+};
+
+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);
+
+       test_eo = elm_calendar_add(main_win);
+       elm_calendar_min_max_year_set(test_eo, 2010, 2020);
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+
+       if ( NULL != test_eo ) {
+               evas_object_del(test_eo);
+               test_eo = NULL;
+       }
+
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_calendar_min_max_year_get()
+ */
+static void utc_UIFW_elm_calendar_min_max_year_get_func_01(void)
+{
+       int min = 0, max = 0;
+
+       elm_calendar_min_max_year_get(test_eo, &min, &max);
+       if (min != min_year || max != max_year) {
+               tet_infoline("elm_calendar_min_max_year_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_calendar_min_max_year_get()
+ */
+static void utc_UIFW_elm_calendar_min_max_year_get_func_02(void)
+{
+       int min = 0, max = 0;
+
+       elm_calendar_min_max_year_get(test_eo, &min, &max);
+       if (min == min_year && max == max_year) {
+               tet_infoline("elm_calendar_min_max_year_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_selected_time_get_func b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_selected_time_get_func
new file mode 100755 (executable)
index 0000000..657a9bc
Binary files /dev/null and b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_selected_time_get_func differ
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_selected_time_get_func.c b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_selected_time_get_func.c
new file mode 100644 (file)
index 0000000..0bd16d2
--- /dev/null
@@ -0,0 +1,117 @@
+#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 *test_eo = NULL;
+struct tm selected_time;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_calendar_selected_time_get_func_01(void);
+static void utc_UIFW_elm_calendar_selected_time_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_calendar_selected_time_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_calendar_selected_time_get_func_02, NEGATIVE_TC_IDX },
+};
+
+static void startup(void)
+{
+        tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+       time_t current_time;
+
+        elm_init(0, NULL);
+        main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+        evas_object_show(main_win);
+
+        test_eo = elm_calendar_add(main_win);
+       current_time = time(NULL) + 34 * 84600;
+       localtime_r(&current_time, &selected_time);
+        elm_calendar_selected_time_set(test_eo, &selected_time);
+}
+
+static void cleanup(void)
+{
+        if ( NULL != main_win ) {
+                evas_object_del(main_win);
+                main_win = NULL;
+        }
+
+        if ( NULL != test_eo ) {
+                evas_object_del(test_eo);
+                test_eo = NULL;
+        }
+
+        elm_shutdown();
+        tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_calendar_selected_time_get()
+ */
+static void utc_UIFW_elm_calendar_selected_time_get_func_01(void)
+{
+       struct tm stime;
+       Eina_Bool ret;
+
+       ret = elm_calendar_selected_time_get(test_eo, &stime);
+       if (!ret) {
+               tet_infoline("elm_calendar_selected_time_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_calendar_selected_time_get()
+ */
+static void utc_UIFW_elm_calendar_selected_time_get_func_02(void)
+{
+       struct tm stime;
+       Eina_Bool ret;
+
+       ret = elm_calendar_selected_time_get(NULL, &stime);
+       if (ret) {
+               tet_infoline("elm_calendar_selected_time_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_weekdays_names_get_func b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_weekdays_names_get_func
new file mode 100755 (executable)
index 0000000..e231553
Binary files /dev/null and b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_weekdays_names_get_func differ
diff --git a/TC/elm_ts/calendar/utc_UIFW_elm_calendar_weekdays_names_get_func.c b/TC/elm_ts/calendar/utc_UIFW_elm_calendar_weekdays_names_get_func.c
new file mode 100644 (file)
index 0000000..41694e5
--- /dev/null
@@ -0,0 +1,115 @@
+#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 *test_eo = NULL;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_calendar_weekdays_names_get_func_01(void);
+static void utc_UIFW_elm_calendar_weekdays_names_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_calendar_weekdays_names_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_calendar_weekdays_names_get_func_02, NEGATIVE_TC_IDX },
+};
+
+static void startup(void)
+{
+       tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
+
+       const char *weekdays[] =
+       {
+               "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+       };
+
+       elm_init(0, NULL);
+       main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+       evas_object_show(main_win);
+       
+       test_eo = elm_calendar_add(main_win);
+       elm_calendar_weekdays_names_set(test_eo, weekdays);
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+
+       if ( NULL != test_eo ) {
+               evas_object_del(test_eo);
+               test_eo = NULL;
+       }
+
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_calendar_weekdays_names_get()
+ */
+static void utc_UIFW_elm_calendar_weekdays_names_get_func_01(void)
+{
+       char **weekdays = NULL;
+
+       weekdays = elm_calendar_weekdays_names_get(test_eo);
+       if (!weekdays) {
+               tet_infoline("elm_calendar_weekdays_names_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_calendar_weekdays_names_get()
+ */
+static void utc_UIFW_elm_calendar_weekdays_names_get_func_02(void)
+{
+       char **weekdays = NULL;
+
+       weekdays = elm_calendar_weekdays_names_get(NULL);
+       if (weekdays) {
+               tet_infoline("elm_calendar_weekdays_names_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
index 191f44d..88ac523 100644 (file)
@@ -21,6 +21,7 @@ elm
        :include:/elm_ts/datefield/tslist
        :include:/elm_ts/bubble/tslist
        :include:/elm_ts/navigationbar/tslist
+       :include:/elm_ts/calendar/tslist
 
 #yhkim
 ch