[UTC][appcore-watch][ACR-1066][add NOT SUPPORTED return by feature key]
authorSukHyung, Kang <shine.kang@samsung.com>
Fri, 8 Sep 2017 06:33:49 +0000 (15:33 +0900)
committerJihun Park <jihun87.park@samsung.com>
Fri, 29 Sep 2017 05:28:56 +0000 (05:28 +0000)
Change-Id: Ief2714ae46ae6159be145770a7e95df0732851cf
Signed-off-by: SukHyung, Kang <shine.kang@samsung.com>
src/utc/appcore-watch/utc-appcore-watch.c

index 414a3511a6148053e5097e13b9861b3036f8444f..94e93de4884f2d8938d471dd04d38f82ca33b376 100755 (executable)
 #include <Evas.h>
 #define TIMEZONE_BUFFER_MAX 1024
 #include <unistd.h>
+#include <system_info.h>
+
+#define WATCH_APP_FEATURE "http://tizen.org/feature/watchapplication"
+
+bool is_supported = true;
 
 static void handler(int sig)
 {
@@ -36,7 +41,8 @@ static void handler(int sig)
  */
 void utc_appcore_watch_startup(void)
 {
-    alarm(4);
+       system_info_get_platform_bool(WATCH_APP_FEATURE, &is_supported);
+       alarm(4);
 }
 
 /**
@@ -52,7 +58,7 @@ void utc_appcore_watch_cleanup(void)
 
 static bool _app_create(int width, int height, void *user_data)
 {
-           return true;
+       return true;
 }
 
 static void _app_terminate(void *user_data)
@@ -99,7 +105,12 @@ int utc_appcore_watch_watch_app_main_n1(void)
        ops.create = (watch_app_create_cb)_app_create;
 
        ret = watch_app_main(0, argv, &ops, NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+               assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -120,7 +131,12 @@ int utc_appcore_watch_watch_app_main_n2(void)
        ops.create = (watch_app_create_cb)_app_create;
 
        ret = watch_app_main(argc, NULL, &ops, NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+        if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -140,7 +156,13 @@ int utc_appcore_watch_watch_app_main_n3(void)
        watch_app_lifecycle_callback_s ops;
 
        ret = watch_app_main(argc, argv, NULL, NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+        if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+               return 0;
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        ops.create = NULL;
        ret = watch_app_main(argc, argv, &ops, NULL);
@@ -167,10 +189,20 @@ int utc_appcore_watch_watch_app_add_event_handler_p(void)
        app_event_handler_h handler;
 
        ret = watch_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
-       assert_eq(ret, APP_ERROR_NONE);
+
+        if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_app_remove_event_handler(handler);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -188,7 +220,13 @@ int utc_appcore_watch_watch_app_add_event_handler_n(void)
        app_event_handler_h handler;
 
        ret = watch_app_add_event_handler(NULL, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+               return 0;
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        ret = watch_app_add_event_handler(&handler, -1, (app_event_cb)event_callback, NULL);
        assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
@@ -212,10 +250,20 @@ int utc_appcore_watch_watch_app_remove_event_handler_p(void)
        app_event_handler_h handler;
 
        ret = watch_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_app_remove_event_handler(handler);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -232,7 +280,12 @@ int utc_appcore_watch_watch_app_remove_event_handler_n(void)
        int ret;
 
        ret = watch_app_remove_event_handler(NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -250,7 +303,12 @@ int utc_appcore_watch_watch_time_get_current_time_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -267,7 +325,12 @@ int utc_appcore_watch_watch_time_get_current_time_n(void)
        int ret;
 
        ret = watch_time_get_current_time(NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -285,10 +348,20 @@ int utc_appcore_watch_watch_time_delete_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_delete(watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
 
        return 0;
@@ -306,7 +379,12 @@ int utc_appcore_watch_watch_time_delete_n(void)
        int ret;
 
        ret = watch_time_delete(NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -324,11 +402,20 @@ int utc_appcore_watch_watch_time_get_year_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_year(watch_time, &year);
-       assert_eq(ret, APP_ERROR_NONE);
 
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -345,7 +432,12 @@ int utc_appcore_watch_watch_time_get_year_n(void)
        int ret, year;
 
        ret = watch_time_get_year(NULL, &year);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -364,11 +456,20 @@ int utc_appcore_watch_watch_time_get_month_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_month(watch_time, &month);
-       assert_eq(ret, APP_ERROR_NONE);
 
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -385,7 +486,12 @@ int utc_appcore_watch_watch_time_get_month_n(void)
        int ret, month;
 
        ret = watch_time_get_month(NULL, &month);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -403,11 +509,20 @@ int utc_appcore_watch_watch_time_get_day_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_day(watch_time, &day);
-       assert_eq(ret, APP_ERROR_NONE);
 
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -424,7 +539,12 @@ int utc_appcore_watch_watch_time_get_day_n(void)
        int ret, day;
 
        ret = watch_time_get_day(NULL, &day);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -442,11 +562,20 @@ int utc_appcore_watch_watch_time_get_day_of_week_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_day_of_week(watch_time, &day_of_week);
-       assert_eq(ret, APP_ERROR_NONE);
 
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -463,7 +592,12 @@ int utc_appcore_watch_watch_time_get_day_of_week_n(void)
        int ret, day_of_week;
 
        ret = watch_time_get_day_of_week(NULL, &day_of_week);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -481,11 +615,20 @@ int utc_appcore_watch_watch_time_get_hour_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_hour(watch_time, &hour);
-       assert_eq(ret, APP_ERROR_NONE);
 
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -502,7 +645,12 @@ int utc_appcore_watch_watch_time_get_hour_n(void)
        int ret, hour;
 
        ret = watch_time_get_hour(NULL, &hour);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -520,11 +668,20 @@ int utc_appcore_watch_watch_time_get_hour24_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_hour24(watch_time, &hour24);
-       assert_eq(ret, APP_ERROR_NONE);
 
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -541,7 +698,12 @@ int utc_appcore_watch_watch_time_get_hour24_n(void)
        int ret, hour24;
 
        ret = watch_time_get_hour24(NULL, &hour24);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -559,10 +721,20 @@ int utc_appcore_watch_watch_time_get_minute_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_minute(watch_time, &minute);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
 
        return 0;
@@ -580,7 +752,12 @@ int utc_appcore_watch_watch_time_get_minute_n(void)
        int ret, minute;
 
        ret = watch_time_get_minute(NULL, &minute);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -598,11 +775,20 @@ int utc_appcore_watch_watch_time_get_second_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_second(watch_time, &second);
-       assert_eq(ret, APP_ERROR_NONE);
 
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -619,7 +805,12 @@ int utc_appcore_watch_watch_time_get_second_n(void)
        int ret, second;
 
        ret = watch_time_get_second(NULL, &second);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -637,11 +828,20 @@ int utc_appcore_watch_watch_time_get_millisecond_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_millisecond(watch_time, &millisecond);
-       assert_eq(ret, APP_ERROR_NONE);
 
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -658,7 +858,12 @@ int utc_appcore_watch_watch_time_get_millisecond_n(void)
        int ret, millisecond;
 
        ret = watch_time_get_millisecond(NULL, &millisecond);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -681,8 +886,14 @@ int utc_appcore_watch_watch_time_get_utc_time_p(void)
        ret2 = watch_time_get_utc_time(watch_time, utc_time);
 
        free(utc_time);
-       assert_eq(ret1, APP_ERROR_NONE);
-       assert_eq(ret2, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret1, APP_ERROR_NOT_SUPPORTED);
+               assert_eq(ret2, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret1, APP_ERROR_NONE);
+               assert_eq(ret2, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -702,7 +913,12 @@ int utc_appcore_watch_watch_time_get_utc_time_n1(void)
        ret = watch_time_get_utc_time(NULL, utc_time);
 
        free(utc_time);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -720,10 +936,20 @@ int utc_appcore_watch_watch_time_get_utc_time_n2(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_utc_time(watch_time, NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -746,8 +972,14 @@ int utc_appcore_watch_watch_time_get_utc_timestamp_p(void)
        ret2 = watch_time_get_utc_timestamp(watch_time, time_stamp);
 
        free(time_stamp);
-       assert_eq(ret1, APP_ERROR_NONE);
-       assert_eq(ret2, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret1, APP_ERROR_NOT_SUPPORTED);
+               assert_eq(ret2, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret1, APP_ERROR_NONE);
+               assert_eq(ret2, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -767,7 +999,12 @@ int utc_appcore_watch_watch_time_get_utc_timestamp_n(void)
        ret = watch_time_get_utc_timestamp(NULL, time_stamp);
 
        free(time_stamp);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -786,10 +1023,20 @@ int utc_appcore_watch_watch_time_get_time_zone_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_time_zone(watch_time, &timezone);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -807,7 +1054,12 @@ int utc_appcore_watch_watch_time_get_time_zone_n1(void)
        char timezone[TIMEZONE_BUFFER_MAX] = {0,};
 
        ret = watch_time_get_time_zone(NULL, &timezone);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -825,10 +1077,20 @@ int utc_appcore_watch_watch_time_get_time_zone_n2(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_time_zone(watch_time, NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -847,10 +1109,20 @@ int utc_appcore_watch_watch_time_get_dst_status_p(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_dst_status(watch_time, &dst);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -868,7 +1140,12 @@ int utc_appcore_watch_watch_time_get_dst_status_n1(void)
        bool dst;
 
        ret = watch_time_get_dst_status(NULL, &dst);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -887,10 +1164,20 @@ int utc_appcore_watch_watch_time_get_dst_status_n2(void)
        watch_time_h watch_time = {0,};
 
        ret = watch_time_get_current_time(&watch_time);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_time_get_dst_status(watch_time, NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -907,7 +1194,13 @@ int utc_appcore_watch_watch_app_get_elm_win_n(void)
        int ret;
 
        ret = watch_app_get_elm_win(NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
+
        return 0;
 }
 
@@ -924,11 +1217,21 @@ int utc_appcore_watch_watch_app_set_ambient_tick_type_p(void)
        watch_app_ambient_tick_type_e type;
 
        ret = watch_app_set_ambient_tick_type(WATCH_APP_AMBIENT_TICK_EVERY_FIVE_MINUTES);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_app_get_ambient_tick_type(&type);
-       assert_eq(ret, APP_ERROR_NONE);
-       assert_eq(type, WATCH_APP_AMBIENT_TICK_EVERY_FIVE_MINUTES);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+               assert_eq(type, WATCH_APP_AMBIENT_TICK_EVERY_FIVE_MINUTES);
+       }
 
        watch_app_set_ambient_tick_type(WATCH_APP_AMBIENT_TICK_EVERY_MINUTE);
        return 0;
@@ -946,7 +1249,13 @@ int utc_appcore_watch_watch_app_set_ambient_tick_type_n(void)
        int ret;
 
        ret = watch_app_set_ambient_tick_type(-1);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
+
        return 0;
 }
 
@@ -963,11 +1272,21 @@ int utc_appcore_watch_watch_app_get_ambient_tick_type_p(void)
        watch_app_ambient_tick_type_e type;
 
        ret = watch_app_set_ambient_tick_type(WATCH_APP_AMBIENT_TICK_EVERY_DAY);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_app_get_ambient_tick_type(&type);
-       assert_eq(ret, APP_ERROR_NONE);
-       assert_eq(type, WATCH_APP_AMBIENT_TICK_EVERY_DAY);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+               assert_eq(type, WATCH_APP_AMBIENT_TICK_EVERY_DAY);
+       }
 
        watch_app_set_ambient_tick_type(WATCH_APP_AMBIENT_TICK_EVERY_MINUTE);
        return 0;
@@ -985,7 +1304,12 @@ int utc_appcore_watch_watch_app_get_ambient_tick_type_n(void)
        int ret;
 
        ret = watch_app_get_ambient_tick_type(NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
        return 0;
 }
 
@@ -1002,7 +1326,12 @@ int utc_appcore_watch_watch_app_set_time_tick_frequency_p(void)
        watch_app_time_tick_resolution_e type = WATCH_APP_TIME_TICKS_PER_SECOND;
 
        ret = watch_app_set_time_tick_frequency(1, type);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        return 0;
 }
@@ -1020,7 +1349,12 @@ int utc_appcore_watch_watch_app_set_time_tick_frequency_n(void)
        int ret;
 
        ret = watch_app_set_time_tick_frequency(1, -1);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }
@@ -1041,12 +1375,22 @@ int utc_appcore_watch_watch_app_get_time_tick_frequency_p(void)
        int tick;
 
        ret = watch_app_set_time_tick_frequency(60, type);
-       assert_eq(ret, APP_ERROR_NONE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+       }
 
        ret = watch_app_get_time_tick_frequency(&tick, &get_type);
-       assert_eq(ret, APP_ERROR_NONE);
-       assert_eq(tick, 60);
-       assert_eq(get_type, WATCH_APP_TIME_TICKS_PER_MINUTE);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_NONE);
+               assert_eq(tick, 60);
+               assert_eq(get_type, WATCH_APP_TIME_TICKS_PER_MINUTE);
+       }
 
        return 0;
 }
@@ -1063,7 +1407,12 @@ int utc_appcore_watch_watch_app_get_time_tick_frequency_n(void)
        int ret;
 
        ret = watch_app_get_time_tick_frequency(NULL, NULL);
-       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       if (is_supported == false) {
+                assert_eq(ret, APP_ERROR_NOT_SUPPORTED);
+        } else {
+               assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+       }
 
        return 0;
 }