#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)
{
*/
void utc_appcore_watch_startup(void)
{
- alarm(4);
+ system_info_get_platform_bool(WATCH_APP_FEATURE, &is_supported);
+ alarm(4);
}
/**
static bool _app_create(int width, int height, void *user_data)
{
- return true;
+ return true;
}
static void _app_terminate(void *user_data)
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;
}
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;
}
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);
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;
}
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);
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;
}
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;
}
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;
}
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;
}
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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
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;
}
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;
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;
}
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;
}
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;
}
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;
}
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;
}