static maps_address_h address = NULL;
static maps_address_list_h __pAddressList = NULL;
static bool __isCalled = false;
+static bool is_maps_supported = false;
/**
*/
void utc_maps_address_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
+
maps_address_create(&address);
maps_address_list_create(&__pAddressList);
}
int utc_maps_address_create_p(void)
{
maps_address_h test_address = NULL;
+
ret = maps_address_create(&test_address);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(test_address);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(test_address);
ret = maps_address_destroy(test_address);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_address_create_n(void)
{
ret = maps_address_create(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_address_destroy_n(void)
{
ret = maps_address_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
maps_address_h clone_address = NULL;
char *buff = NULL;
- maps_address_set_building_number(address, "building_number");
- maps_address_set_street(address, "street");
- maps_address_set_district(address, "district");
- maps_address_set_city(address, "city");
- maps_address_set_state(address, "state");
- maps_address_set_country_code(address, "country_code");
- maps_address_set_postal_code(address, "postal_code");
- maps_address_set_freetext(address, "freetext");
- maps_address_set_country(address, "country");
- maps_address_set_county(address, "county");
-
- ret = maps_address_clone(address, &clone_address);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(clone_address);
-
- ret = maps_address_get_building_number(clone_address, &buff);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(buff);
- assert(!strcmp(buff, "building_number"));
- if (buff) free(buff);
-
- ret = maps_address_get_street(clone_address, &buff);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(buff);
- assert(!strcmp(buff, "street"));
- if (buff) free(buff);
-
- ret = maps_address_get_district(clone_address, &buff);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(buff);
- assert(!strcmp(buff, "district"));
- if (buff) free(buff);
-
- ret = maps_address_get_city(clone_address, &buff);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(buff);
- assert(!strcmp(buff, "city"));
- if (buff) free(buff);
-
- ret = maps_address_get_state(clone_address, &buff);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(buff);
- assert(!strcmp(buff, "state"));
- if (buff) free(buff);
-
- ret = maps_address_get_country_code(clone_address, &buff);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(buff);
- assert(!strcmp(buff, "country_code"));
- if (buff) free(buff);
-
- ret = maps_address_get_postal_code(clone_address, &buff);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(buff);
- assert(!strcmp(buff, "postal_code"));
- if (buff) free(buff);
-
- ret = maps_address_get_country(clone_address, &buff);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(buff);
- assert(!strcmp(buff, "country"));
- if (buff) free(buff);
-
- ret = maps_address_get_county(clone_address, &buff);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(buff);
- assert(!strcmp(buff, "county"));
- if (buff) free(buff);
-
- ret = maps_address_destroy(clone_address);
- assert_eq(ret, MAPS_ERROR_NONE);
+ if (is_maps_supported) {
+ maps_address_set_building_number(address, "building_number");
+ maps_address_set_street(address, "street");
+ maps_address_set_district(address, "district");
+ maps_address_set_city(address, "city");
+ maps_address_set_state(address, "state");
+ maps_address_set_country_code(address, "country_code");
+ maps_address_set_postal_code(address, "postal_code");
+ maps_address_set_freetext(address, "freetext");
+ maps_address_set_country(address, "country");
+ maps_address_set_county(address, "county");
+
+ ret = maps_address_clone(address, &clone_address);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(clone_address);
+
+ ret = maps_address_get_building_number(clone_address, &buff);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(buff);
+ assert(!strcmp(buff, "building_number"));
+ if (buff) free(buff);
+
+ ret = maps_address_get_street(clone_address, &buff);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(buff);
+ assert(!strcmp(buff, "street"));
+ if (buff) free(buff);
+
+ ret = maps_address_get_district(clone_address, &buff);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(buff);
+ assert(!strcmp(buff, "district"));
+ if (buff) free(buff);
+
+ ret = maps_address_get_city(clone_address, &buff);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(buff);
+ assert(!strcmp(buff, "city"));
+ if (buff) free(buff);
+
+ ret = maps_address_get_state(clone_address, &buff);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(buff);
+ assert(!strcmp(buff, "state"));
+ if (buff) free(buff);
+
+ ret = maps_address_get_country_code(clone_address, &buff);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(buff);
+ assert(!strcmp(buff, "country_code"));
+ if (buff) free(buff);
+
+ ret = maps_address_get_postal_code(clone_address, &buff);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(buff);
+ assert(!strcmp(buff, "postal_code"));
+ if (buff) free(buff);
+
+ ret = maps_address_get_country(clone_address, &buff);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(buff);
+ assert(!strcmp(buff, "country"));
+ if (buff) free(buff);
+
+ ret = maps_address_get_county(clone_address, &buff);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(buff);
+ assert(!strcmp(buff, "county"));
+ if (buff) free(buff);
+
+ ret = maps_address_destroy(clone_address);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_address_clone(address, &clone_address);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
int utc_maps_address_clone_n(void)
{
maps_address_h clone_address = NULL;
+
ret = maps_address_clone(NULL, &clone_address);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!clone_address);
ret = maps_address_clone(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_set_building_number_p(void)
{
- ret = maps_address_set_building_number(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_building_number_p */
return 0;
}
int utc_maps_address_set_building_number_n(void)
{
ret = maps_address_set_building_number(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_building_number(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_set_street_p(void)
{
- ret = maps_address_set_street(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_street_p */
return 0;
}
int utc_maps_address_set_street_n(void)
{
ret = maps_address_set_street(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_street(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_set_district_p(void)
{
- ret = maps_address_set_district(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_district_p */
return 0;
}
int utc_maps_address_set_district_n(void)
{
ret = maps_address_set_district(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_district(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_set_city_p(void)
{
- ret = maps_address_set_city(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_city_p */
return 0;
}
int utc_maps_address_set_city_n(void)
{
ret = maps_address_set_city(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_city(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_set_state_p(void)
{
- ret = maps_address_set_state(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_state_p */
return 0;
}
int utc_maps_address_set_state_n(void)
{
ret = maps_address_set_state(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_state(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_set_country_p(void)
{
- ret = maps_address_set_country(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_country_p */
return 0;
}
int utc_maps_address_set_country_n(void)
{
ret = maps_address_set_country(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_country(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_set_country_code_p(void)
{
- ret = maps_address_set_country_code(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_country_code_p */
return 0;
}
int utc_maps_address_set_country_code_n(void)
{
ret = maps_address_set_country_code(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_country_code(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_set_county_p(void)
{
- ret = maps_address_set_county(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_county_p */
return 0;
}
int utc_maps_address_set_county_n(void)
{
ret = maps_address_set_county(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_county(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_set_postal_code_p(void)
{
- ret = maps_address_set_postal_code(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_postal_code_p */
return 0;
}
int utc_maps_address_set_postal_code_n(void)
{
ret = maps_address_set_postal_code(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_postal_code(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_set_freetext_p(void)
{
- ret = maps_address_set_freetext(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_get_freetext_p */
return 0;
}
int utc_maps_address_set_freetext_n(void)
{
ret = maps_address_set_freetext(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_set_freetext(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_get_building_number_p(void)
{
+ char *building_number = NULL;
+
ret = maps_address_set_building_number(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *building_number = NULL;
ret = maps_address_get_building_number(address, &building_number);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(building_number);
- assert_eq(strcmp(building_number, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(building_number);
+ assert_eq(strcmp(building_number, "test"), 0);
- free(building_number);
+ free(building_number);
+ }
return 0;
}
*/
int utc_maps_address_get_building_number_n(void)
{
+ char *building_number = NULL;
+
ret = maps_address_set_building_number(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *building_number = NULL;
ret = maps_address_get_building_number(NULL, &building_number);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!building_number);
ret = maps_address_get_building_number(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_get_street_p(void)
{
+ char *street = NULL;
+
ret = maps_address_set_street(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *street = NULL;
ret = maps_address_get_street(address, &street);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(street);
- assert_eq(strcmp(street, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(street);
+ assert_eq(strcmp(street, "test"), 0);
- free(street);
+ free(street);
+ }
return 0;
}
*/
int utc_maps_address_get_street_n(void)
{
+ char *street = NULL;
+
ret = maps_address_set_street(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *street = NULL;
ret = maps_address_get_street(NULL, &street);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!street);
ret = maps_address_get_street(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_get_district_p(void)
{
+ char *district = NULL;
+
ret = maps_address_set_district(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *district = NULL;
ret = maps_address_get_district(address, &district);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(district);
- assert_eq(strcmp(district, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(district);
+ assert_eq(strcmp(district, "test"), 0);
- free(district);
+ free(district);
+ }
return 0;
}
*/
int utc_maps_address_get_district_n(void)
{
+ char *district = NULL;
+
ret = maps_address_set_district(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *district = NULL;
ret = maps_address_get_district(NULL, &district);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!district);
ret = maps_address_get_district(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_get_city_p(void)
{
+ char *city = NULL;
+
ret = maps_address_set_city(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *city = NULL;
ret = maps_address_get_city(address, &city);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(city);
- assert_eq(strcmp(city, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(city);
+ assert_eq(strcmp(city, "test"), 0);
- free(city);
+ free(city);
+ }
return 0;
}
*/
int utc_maps_address_get_city_n(void)
{
+ char *city = NULL;
+
ret = maps_address_set_city(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *city = NULL;
ret = maps_address_get_city(NULL, &city);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!city);
ret = maps_address_get_city(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_get_state_p(void)
{
+ char *state = NULL;
+
ret = maps_address_set_state(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *state = NULL;
ret = maps_address_get_state(address, &state);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(state);
- assert_eq(strcmp(state, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(state);
+ assert_eq(strcmp(state, "test"), 0);
- free(state);
+ free(state);
+ }
return 0;
}
*/
int utc_maps_address_get_state_n(void)
{
+ char *state = NULL;
+
ret = maps_address_set_state(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *state = NULL;
ret = maps_address_get_state(NULL, &state);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!state);
ret = maps_address_get_state(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_get_country_p(void)
{
+ char *country = NULL;
+
ret = maps_address_set_country(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *country = NULL;
ret = maps_address_get_country(address, &country);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(country);
- assert_eq(strcmp(country, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(country);
+ assert_eq(strcmp(country, "test"), 0);
- free(country);
+ free(country);
+ }
return 0;
}
*/
int utc_maps_address_get_country_n(void)
{
+ char *country = NULL;
+
ret = maps_address_set_country(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *country = NULL;
ret = maps_address_get_country(NULL, &country);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!country);
ret = maps_address_get_country(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_get_country_code_p(void)
{
+ char *country_code = NULL;
+
ret = maps_address_set_country_code(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *country_code = NULL;
ret = maps_address_get_country_code(address, &country_code);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(country_code);
- assert_eq(strcmp(country_code, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(country_code);
+ assert_eq(strcmp(country_code, "test"), 0);
- free(country_code);
+ free(country_code);
+ }
return 0;
}
*/
int utc_maps_address_get_country_code_n(void)
{
+ char *country_code = NULL;
+
ret = maps_address_set_country_code(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *country_code = NULL;
ret = maps_address_get_country_code(NULL, &country_code);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!country_code);
ret = maps_address_get_country_code(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_get_county_p(void)
{
+ char *county = NULL;
+
ret = maps_address_set_county(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *county = NULL;
ret = maps_address_get_county(address, &county);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(county);
- assert_eq(strcmp(county, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(county);
+ assert_eq(strcmp(county, "test"), 0);
- free(county);
+ free(county);
+ }
return 0;
}
*/
int utc_maps_address_get_county_n(void)
{
+ char *county = NULL;
+
ret = maps_address_set_county(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *county = NULL;
ret = maps_address_get_county(NULL, &county);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!county);
ret = maps_address_get_county(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_get_postal_code_p(void)
{
+ char *postal_code = NULL;
+
ret = maps_address_set_postal_code(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *postal_code = NULL;
ret = maps_address_get_postal_code(address, &postal_code);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(postal_code);
- assert_eq(strcmp(postal_code, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(postal_code);
+ assert_eq(strcmp(postal_code, "test"), 0);
- free(postal_code);
+ free(postal_code);
+ }
return 0;
}
*/
int utc_maps_address_get_postal_code_n(void)
{
+ char *postal_code = NULL;
+
ret = maps_address_set_postal_code(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *postal_code = NULL;
ret = maps_address_get_postal_code(NULL, &postal_code);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!postal_code);
ret = maps_address_get_postal_code(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_get_freetext_p(void)
{
+ char *freetext = NULL;
+
ret = maps_address_set_freetext(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *freetext = NULL;
ret = maps_address_get_freetext(address, &freetext);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(freetext);
- assert_eq(strcmp(freetext, "test"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(freetext);
+ assert_eq(strcmp(freetext, "test"), 0);
- free(freetext);
+ free(freetext);
+ }
return 0;
}
*/
int utc_maps_address_get_freetext_n(void)
{
+ char *freetext = NULL;
+
ret = maps_address_set_freetext(address, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *freetext = NULL;
ret = maps_address_get_freetext(NULL, &freetext);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!freetext);
ret = maps_address_get_freetext(address, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_address_list_create_p(void)
{
maps_address_list_h addr_list = NULL;
- ret = maps_address_list_create(&addr_list);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(addr_list);
+ ret = maps_address_list_create(&addr_list);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(addr_list);
ret = maps_address_list_destroy(addr_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_address_list_create_n(void)
{
ret = maps_address_list_create(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_address_list_destroy_p(void)
{
- /* tested in utc_maps_address_create_p */
- maps_address_list_h addr_list = NULL;
- ret = maps_address_list_create(&addr_list);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(addr_list);
-
- ret = maps_address_list_destroy(addr_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_address_list_create_p */
return 0;
}
int utc_maps_address_list_destroy_n(void)
{
ret = maps_address_list_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_address_list_append_p(void)
{
ret = maps_address_list_append(__pAddressList, address);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_list_remove(__pAddressList, address);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_address_list_append_n(void)
{
ret = maps_address_list_append(NULL, address);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_list_append(__pAddressList, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_address_list_remove_p(void)
{
- ret = maps_address_list_append(__pAddressList, address);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_address_list_remove(__pAddressList, address);
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_address_list_append_p */
return 0;
}
int utc_maps_address_list_remove_n(void)
{
ret = maps_address_list_remove(NULL, address);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_list_remove(__pAddressList, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_address_list_get_length_p(void)
{
int len = 0;
+
ret = maps_address_list_get_length(__pAddressList, &len);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_address_list_get_length_n(void)
{
int len = 0;
+
ret = maps_address_list_get_length(NULL, &len);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_list_get_length(__pAddressList, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_address_list_foreach_p(void)
{
ret = maps_address_list_append(__pAddressList, address);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_list_foreach(__pAddressList, __maps_address_list_cb, NULL);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- assert_eq(__isCalled, true);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(__isCalled, true);
ret = maps_address_list_remove(__pAddressList, address);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_address_list_foreach_n(void)
{
ret = maps_address_list_foreach(NULL, __maps_address_list_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_list_foreach(__pAddressList, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_area_h __pArea = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_area_startup
*/
void utc_maps_area_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
+
ret = 0;
__pArea = NULL;
}
{
maps_coordinates_h top_left = NULL;
maps_coordinates_h bottom_right = NULL;
- ret = maps_coordinates_create(15.665354, 74.311523, &top_left);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(top_left);
- ret = maps_coordinates_create(10.617418, 79.145508, &bottom_right);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(bottom_right);
+ if (is_maps_supported) {
+ ret = maps_coordinates_create(15.665354, 74.311523, &top_left);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(top_left);
+
+ ret = maps_coordinates_create(10.617418, 79.145508, &bottom_right);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(bottom_right);
- ret = maps_area_create_rectangle(top_left, bottom_right, &__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(__pArea);
+ ret = maps_area_create_rectangle(top_left, bottom_right, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(__pArea);
- ret = maps_coordinates_destroy(top_left);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(top_left);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(bottom_right);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(bottom_right);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_area_destroy(__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_destroy(__pArea);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_area_create_rectangle(top_left, bottom_right, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_area_destroy(__pArea);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
{
maps_coordinates_h top_left = NULL;
maps_coordinates_h bottom_right = NULL;
- ret = maps_coordinates_create(15.665354, 74.311523, &top_left);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(top_left);
- ret = maps_coordinates_create(10.617418, 79.145508, &bottom_right);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(bottom_right);
+ if (is_maps_supported) {
+ ret = maps_coordinates_create(15.665354, 74.311523, &top_left);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(top_left);
+
+ ret = maps_coordinates_create(10.617418, 79.145508, &bottom_right);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(bottom_right);
+
+ ret = maps_area_create_rectangle(top_left, bottom_right, NULL);
+ assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+
+ ret = maps_area_create_rectangle(NULL, bottom_right, &__pArea);
+ assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+
+ ret = maps_area_create_rectangle(top_left, NULL, &__pArea);
+ assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- ret = maps_area_create_rectangle(top_left, bottom_right, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ret = maps_area_create_rectangle(NULL, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- ret = maps_area_create_rectangle(NULL, bottom_right, &__pArea);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ret = maps_coordinates_destroy(top_left);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_area_create_rectangle(top_left, NULL, &__pArea);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ret = maps_coordinates_destroy(bottom_right);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_area_create_rectangle(top_left, bottom_right, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_area_create_rectangle(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ret = maps_area_create_rectangle(NULL, bottom_right, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_coordinates_destroy(top_left);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_create_rectangle(top_left, NULL, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_coordinates_destroy(bottom_right);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_create_rectangle(NULL, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
{
maps_coordinates_h center = NULL;
- ret = maps_coordinates_create(15.665354, 74.311523, ¢er);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(center);
+ if (is_maps_supported) {
+ ret = maps_coordinates_create(15.665354, 74.311523, ¢er);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(center);
- ret = maps_area_create_circle(center, 100, &__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(__pArea);
+ ret = maps_area_create_circle(center, 100, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(__pArea);
- ret = maps_coordinates_destroy(center);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(center);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_area_destroy(__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_destroy(__pArea);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_area_create_circle(center, 100, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_area_destroy(__pArea);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
{
maps_coordinates_h center = NULL;
- ret = maps_coordinates_create(15.665354, 74.311523, ¢er);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(center);
+ if (is_maps_supported) {
+ ret = maps_coordinates_create(15.665354, 74.311523, ¢er);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(center);
- ret = maps_area_create_circle(center, 100, &__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(__pArea);
+ ret = maps_area_create_circle(center, 100, NULL);
+ assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- ret = maps_area_create_circle(center, 100, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ret = maps_area_create_circle(NULL, 100, &__pArea);
+ assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- ret = maps_area_create_circle(NULL, 100, &__pArea);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ret = maps_area_create_circle(center, -1, &__pArea);
+ assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- ret = maps_area_create_circle(center, -1, &__pArea);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ret = maps_coordinates_destroy(center);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_area_create_circle(center, 100, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_coordinates_destroy(center);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_create_circle(NULL, 100, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_area_destroy(__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_create_circle(center, -1, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
int utc_maps_area_destroy_n(void)
{
ret = maps_area_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_area_clone_p(void)
{
maps_coordinates_h center = NULL;
+ maps_area_h clone = NULL;
- ret = maps_coordinates_create(15.665354, 74.311523, ¢er);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(center);
+ if (is_maps_supported) {
+ ret = maps_coordinates_create(15.665354, 74.311523, ¢er);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(center);
- ret = maps_area_create_circle(center, 100, &__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(__pArea);
+ ret = maps_area_create_circle(center, 100, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(__pArea);
- maps_area_h clone = NULL;
- ret = maps_area_clone(__pArea, &clone);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(clone);
+ ret = maps_area_clone(__pArea, &clone);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(clone);
- ret = maps_coordinates_destroy(center);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(center);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_area_destroy(clone);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_destroy(clone);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_area_destroy(__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_destroy(__pArea);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_area_clone(__pArea, &clone);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
int utc_maps_area_clone_n(void)
{
maps_coordinates_h center = NULL;
+ maps_area_h clone = NULL;
- ret = maps_coordinates_create(15.665354, 74.311523, ¢er);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(center);
+ if (is_maps_supported) {
+ ret = maps_coordinates_create(15.665354, 74.311523, ¢er);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(center);
- ret = maps_area_create_circle(center, 100, &__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(__pArea);
+ ret = maps_area_create_circle(center, 100, &__pArea);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(__pArea);
- ret = maps_area_clone(__pArea, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ret = maps_area_clone(__pArea, NULL);
+ assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- maps_area_h clone = NULL;
- ret = maps_area_clone(NULL, &clone);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ret = maps_area_clone(NULL, &clone);
+ assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+
+ ret = maps_coordinates_destroy(center);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(center);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_destroy(__pArea);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_area_clone(__pArea, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_area_destroy(__pArea);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_area_clone(NULL, &clone);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
static maps_coordinates_h __pCoordinates = NULL;
static maps_coordinates_list_h __pCoordinatesList = NULL;
static bool __isCalled = false;
+static bool is_maps_supported = false;
/**
* @function utc_maps_coordinates_startup
*/
void utc_maps_coordinates_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
+
ret = 0;
__pCoordinates = NULL;
__isCalled = true;
int utc_maps_coordinates_create_p(void)
{
maps_coordinates_h coordinates = NULL;
+
ret = maps_coordinates_create(55.665354, 114.311523, &coordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(coordinates);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(coordinates);
ret = maps_coordinates_destroy(coordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_coordinates_create_n(void)
{
ret = maps_coordinates_create(90.01, 74.311523, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_coordinates_destroy_p(void)
{
- /* Tested in utc_maps_coordinates_create_p */
+ /* tested in utc_maps_coordinates_create_p */
return 0;
}
int utc_maps_coordinates_destroy_n(void)
{
ret = maps_coordinates_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
maps_coordinates_h clone = NULL;
ret = maps_coordinates_clone(__pCoordinates, &clone);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(clone);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(clone);
ret = maps_coordinates_destroy(clone);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h clone = NULL;
ret = maps_coordinates_clone(NULL, &clone);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_clone(__pCoordinates, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_coordinates_get_latitude_p(void)
{
double lat = .0;
+
+ ret = maps_coordinates_set_latitude(__pCoordinates, 16.5555);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_coordinates_get_latitude(__pCoordinates, &lat);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- assert_eq(lat, 15.665354);
+ if (is_maps_supported)
+ assert_eq(lat, 16.5555);
return 0;
}
int utc_maps_coordinates_get_latitude_n(void)
{
double lat = .0;
+
ret = maps_coordinates_get_latitude(NULL, &lat);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_get_latitude(__pCoordinates, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_coordinates_get_longitude_p(void)
{
double lon = .0;
- ret = maps_coordinates_get_longitude(__pCoordinates, &lon);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(lon, 74.311523);
+ ret = maps_coordinates_set_longitude(__pCoordinates, 16.5555);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_coordinates_get_longitude(__pCoordinates, &lon);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(lon, 16.5555);
return 0;
}
{
double lon = .0;
ret = maps_coordinates_get_longitude(NULL, &lon);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_get_longitude(__pCoordinates, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_coordinates_set_latitude_p(void)
{
- ret = maps_coordinates_set_latitude(__pCoordinates, 16.5555);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- double lat = .0;
- ret = maps_coordinates_get_latitude(__pCoordinates, &lat);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- assert_eq(lat, 16.5555);
-
+ /* tested in utc_maps_coordinates_get_latitude_p */
return 0;
}
int utc_maps_coordinates_set_latitude_n(void)
{
ret = maps_coordinates_set_latitude(NULL, 16.5555);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_set_latitude(__pCoordinates, 90.1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_coordinates_set_longitude_p(void)
{
- ret = maps_coordinates_set_longitude(__pCoordinates, 16.5555);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- double lon = .0;
- ret = maps_coordinates_get_longitude(__pCoordinates, &lon);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(lon, 16.5555);
-
+ /* tested in utc_maps_coordinates_get_longitude_p */
return 0;
}
int utc_maps_coordinates_set_longitude_n(void)
{
ret = maps_coordinates_set_longitude(NULL, 16.5555);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_set_longitude(__pCoordinates, 180.1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
double lat = .0;
double lon = .0;
- ret = maps_coordinates_get_latitude_longitude(__pCoordinates, &lat, &lon);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- assert_eq(lat, 15.665354);
- assert_eq(lon, 74.311523);
+ ret = maps_coordinates_set_latitude_longitude(__pCoordinates, 16.5555, 16.5555);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_coordinates_get_latitude_longitude(__pCoordinates, &lat, &lon);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert_eq(lat, 16.5555);
+ assert_eq(lon, 16.5555);
+ }
return 0;
}
{
double lat = .0;
double lon = .0;
+
ret = maps_coordinates_get_latitude_longitude(NULL, &lat, &lon);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_get_latitude_longitude(__pCoordinates, NULL, &lon);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_get_latitude_longitude(__pCoordinates, &lat, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_coordinates_set_latitude_longitude_p(void)
{
- ret = maps_coordinates_set_latitude_longitude(__pCoordinates, 16.5555, 16.5555);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- double lat = .0;
- double lon = .0;
- ret = maps_coordinates_get_latitude_longitude(__pCoordinates, &lat, &lon);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(lat, 16.5555);
- assert_eq(lon, 16.5555);
-
+ /* tested in utc_maps_coordinates_get_latitude_longitude_p */
return 0;
}
int utc_maps_coordinates_set_latitude_longitude_n(void)
{
ret = maps_coordinates_set_latitude_longitude(NULL, 16.5555, 16.5555);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_set_latitude_longitude(__pCoordinates, 90.1, 16.5555);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_set_latitude_longitude(__pCoordinates, 16.5555, 180.1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_list_h coordinates_list = NULL;
ret = maps_coordinates_list_create(&coordinates_list);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(coordinates_list);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(coordinates_list);
ret = maps_coordinates_list_destroy(coordinates_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_coordinates_list_create_n(void)
{
ret = maps_coordinates_list_create(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_coordinates_list_destroy_p(void)
{
- maps_coordinates_list_h coordinates_list = NULL;
-
- ret = maps_coordinates_list_create(&coordinates_list);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(coordinates_list);
-
- ret = maps_coordinates_list_destroy(coordinates_list);
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_coordinates_list_create_p */
return 0;
}
int utc_maps_coordinates_list_destroy_n(void)
{
ret = maps_coordinates_list_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_coordinates_list_append_p(void)
{
ret = maps_coordinates_list_append(__pCoordinatesList, __pCoordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_remove(__pCoordinatesList, __pCoordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_coordinates_list_append_n(void)
{
ret = maps_coordinates_list_append(NULL, __pCoordinates);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(__pCoordinatesList, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_coordinates_list_remove_p(void)
{
- ret = maps_coordinates_list_append(__pCoordinatesList, __pCoordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_coordinates_list_remove(__pCoordinatesList, __pCoordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_coordinates_list_append_p */
return 0;
}
int utc_maps_coordinates_list_remove_n(void)
{
ret = maps_coordinates_list_remove(NULL, __pCoordinates);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_remove(__pCoordinatesList, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_coordinates_list_get_length_p(void)
{
int len = 0;
+
ret = maps_coordinates_list_get_length(__pCoordinatesList, &len);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
{
int len = 0;
ret = maps_coordinates_list_get_length(NULL, &len);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_get_length(__pCoordinatesList, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_coordinates_list_foreach_p(void)
{
ret = maps_coordinates_list_append(__pCoordinatesList, __pCoordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_foreach(__pCoordinatesList, __maps_coordinates_list_cb, NULL);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- assert_eq(__isCalled, true);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(__isCalled, true);
ret = maps_coordinates_list_remove(__pCoordinatesList, __pCoordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_coordinates_list_foreach_n(void)
{
ret = maps_coordinates_list_foreach(NULL, __maps_coordinates_list_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_foreach(__pCoordinatesList, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static bool editorial_available = false;
static bool image_available = false;
static bool review_available = false;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_startup
*/
void utc_maps_place_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
+
ret = 0;
category_available = false;
service_enabled_place = false;
int utc_maps_place_destroy_n(void)
{
ret = maps_place_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_clone_n(void)
{
maps_place_h clone = NULL;
+
ret = maps_place_clone(NULL, &clone);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_clone(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_get_id_n(void)
{
char *id;
+
ret = maps_place_get_id(NULL, &id);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_id(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_get_name_n(void)
{
char *name;
+
ret = maps_place_get_name(NULL, &name);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_name(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_get_uri_n(void)
{
char *uri;
+
ret = maps_place_get_uri(NULL, &uri);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_uri(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coords = NULL;
ret = maps_place_get_location(NULL, &coords);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_location(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_get_distance_n(void)
{
int test = 0;
+
ret = maps_place_get_distance(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_distance(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_get_address_n(void)
{
maps_address_h address = NULL;
+
ret = maps_address_create(&address);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(address);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_address(NULL, &address);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_address(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_destroy(address);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_get_rating_n(void)
{
maps_place_rating_h rating = NULL;
+
ret = maps_place_get_rating(NULL, &rating);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_rating(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
category_available = true;
service_enabled_place = true;
- ret = maps_place_category_destroy(category);
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ maps_place_category_destroy(category);
return true;
}
int utc_maps_place_foreach_category_n(void)
{
void *user_data = NULL;
+
ret = maps_place_foreach_category(NULL, __utc_maps_place_category_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_foreach_category(__pPlace, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
attribute_available = true;
service_enabled_place = true;
- ret = maps_place_attribute_destroy(attribute);
- assert_eq(ret, MAPS_ERROR_NONE);
+ maps_place_attribute_destroy(attribute);
return true;
}
int utc_maps_place_foreach_attribute_n(void)
{
void *user_data = NULL;
+
ret = maps_place_foreach_attribute(NULL, __utc_maps_place_attribute_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_foreach_attribute(__pPlace, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
contact_available = true;
service_enabled_place = true;
- ret = maps_place_contact_destroy(contact);
- assert_eq(ret, MAPS_ERROR_NONE);
+ maps_place_contact_destroy(contact);
return true;
}
int utc_maps_place_foreach_contact_n(void)
{
void *user_data = NULL;
+
ret = maps_place_foreach_contact(NULL, __utc_maps_place_contact_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_foreach_contact(__pPlace, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
editorial_available = true;
service_enabled_place = true;
- ret = maps_place_editorial_destroy(editorial);
- assert_eq(ret, MAPS_ERROR_NONE);
+ maps_place_editorial_destroy(editorial);
return true;
}
int utc_maps_place_foreach_editorial_n(void)
{
void *user_data = NULL;
+
ret = maps_place_foreach_editorial(NULL, __utc_maps_place_editorial_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_foreach_editorial(__pPlace, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
image_available = true;
service_enabled_place = true;
- ret = maps_place_image_destroy(image);
- assert_eq(ret, MAPS_ERROR_NONE);
+ maps_place_image_destroy(image);
return true;
}
int utc_maps_place_foreach_image_n(void)
{
void *user_data = NULL;
+
ret = maps_place_foreach_image(NULL, __utc_maps_place_image_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_foreach_image(__pPlace, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
review_available = true;
service_enabled_place = true;
- ret = maps_place_review_destroy(review);
- assert_eq(ret, MAPS_ERROR_NONE);
+ maps_place_review_destroy(review);
return true;
}
int utc_maps_place_foreach_review_n(void)
{
void *user_data = NULL;
+
ret = maps_place_foreach_review(NULL, __utc_maps_place_review_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_foreach_review(__pPlace, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_get_supplier_link_n(void)
{
maps_place_link_object_h supplier = NULL;
+
ret = maps_place_get_supplier_link(NULL, &supplier);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_supplier_link(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_get_related_link_n(void)
{
maps_place_link_object_h related = NULL;
+
ret = maps_place_get_related_link(NULL, &related);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_get_related_link(__pPlace, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_foreach_property_n(void)
{
ret = maps_place_foreach_property(NULL, __maps_place_properties_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_foreach_property(__pPlace, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_list_destroy_n(void)
{
ret = maps_place_list_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_attribute_h __pAttribute = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_attribute_startup
*/
void utc_maps_place_attribute_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_place_attribute_destroy_n(void)
{
ret = maps_place_attribute_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_attribute_clone_n(void)
{
maps_place_attribute_h clone = NULL;
+
ret = maps_place_attribute_clone(NULL, &clone);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_attribute_clone(__pAttribute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_attribute_get_id_n(void)
{
+ char *id = NULL;
+
ret = maps_place_attribute_get_id(__pAttribute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- char *id = NULL;
ret = maps_place_attribute_get_id(NULL, &id);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_attribute_get_text_n(void)
{
+ char *text = NULL;
+
ret = maps_place_attribute_get_text(__pAttribute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- char *text = NULL;
ret = maps_place_attribute_get_text(NULL, &text);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_attribute_get_label_n(void)
{
+ char *label = NULL;
+
ret = maps_place_attribute_get_label(__pAttribute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- char *label = NULL;
ret = maps_place_attribute_get_label(NULL, &label);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_category_h __pCategory = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_category_startup
*/
void utc_maps_place_category_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
+
ret = 0;
__pCategory = NULL;
maps_place_category_create(&__pCategory);
int utc_maps_place_category_create_p(void)
{
maps_place_category_h category = NULL;
+
ret = maps_place_category_create(&category);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(category);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(category);
ret = maps_place_category_destroy(category);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_category_create_n(void)
{
ret = maps_place_category_create(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_place_category_destroy_p(void)
{
- maps_place_category_h category = NULL;
- ret = maps_place_category_create(&category);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(category);
-
- ret = maps_place_category_destroy(category);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_place_category_create_p */
return 0;
}
int utc_maps_place_category_destroy_n(void)
{
ret = maps_place_category_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_category_clone_p(void)
{
- maps_place_category_set_id(__pCategory, "test");
- maps_place_category_set_name(__pCategory, "test");
- maps_place_category_set_url(__pCategory, "test");
-
maps_place_category_h clone_place_category = NULL;
- ret = maps_place_category_clone(__pCategory, &clone_place_category);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(clone_place_category);
- ret = maps_place_category_destroy(clone_place_category);
- assert_eq(ret, MAPS_ERROR_NONE);
+ if (is_maps_supported) {
+ maps_place_category_set_id(__pCategory, "test");
+ maps_place_category_set_name(__pCategory, "test");
+ maps_place_category_set_url(__pCategory, "test");
+
+ ret = maps_place_category_clone(__pCategory, &clone_place_category);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(clone_place_category);
+
+ ret = maps_place_category_destroy(clone_place_category);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_place_category_clone(__pCategory, &clone_place_category);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
int utc_maps_place_category_clone_n(void)
{
maps_place_category_h clone_place_category = NULL;
+
ret = maps_place_category_clone(NULL, &clone_place_category);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_clone(__pCategory, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_category_set_id_p(void)
{
- ret = maps_place_category_set_id(__pCategory, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_place_category_get_id_p */
return 0;
}
int utc_maps_place_category_set_id_n(void)
{
ret = maps_place_category_set_id(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_set_id(__pCategory, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_set_id(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_category_get_id_p(void)
{
+ char *id = NULL;
+
ret = maps_place_category_set_id(__pCategory, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *id = NULL;
ret = maps_place_category_get_id(__pCategory, &id);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert_eq(strcmp(id, "test"), 0);
- assert_eq(strcmp(id, "test"), 0);
-
- free(id);
+ free(id);
+ }
return 0;
}
int utc_maps_place_category_get_id_n(void)
{
char *id = NULL;
- ret = maps_place_category_get_id(NULL, &id);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- ret = maps_place_category_set_id(__pCategory, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_place_category_get_id(NULL, &id);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_get_id(__pCategory, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_category_set_name_p(void)
{
- ret = maps_place_category_set_name(__pCategory, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_place_category_get_name_p */
return 0;
}
int utc_maps_place_category_set_name_n(void)
{
ret = maps_place_category_set_name(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_set_name(__pCategory, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_set_name(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_category_get_name_p(void)
{
+ char *name = NULL;
+
ret = maps_place_category_set_name(__pCategory, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *name = NULL;
ret = maps_place_category_get_name(__pCategory, &name);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert_eq(strcmp(name, "test"), 0);
- assert_eq(strcmp(name, "test"), 0);
-
- free(name);
+ free(name);
+ }
return 0;
}
int utc_maps_place_category_get_name_n(void)
{
char *name = NULL;
- ret = maps_place_category_get_name(NULL, &name);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- ret = maps_place_category_set_name(__pCategory, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_place_category_get_name(NULL, &name);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_get_name(__pCategory, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_category_set_url_p(void)
{
- ret = maps_place_category_set_url(__pCategory, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_place_category_get_url_p */
return 0;
}
int utc_maps_place_category_set_url_n(void)
{
ret = maps_place_category_set_url(NULL, "test");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_set_url(__pCategory, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_set_url(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_category_get_url_p(void)
{
- ret = maps_place_category_set_url(__pCategory, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
-
char *url = NULL;
- ret = maps_place_category_get_url(__pCategory, &url);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(strcmp(url, "test"), 0);
+ ret = maps_place_category_set_url(__pCategory, "test");
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- free(url);
+ ret = maps_place_category_get_url(__pCategory, &url);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert_eq(strcmp(url, "test"), 0);
+
+ free(url);
+ }
return 0;
}
int utc_maps_place_category_get_url_n(void)
{
char *url = NULL;
- ret = maps_place_category_get_url(NULL, &url);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- ret = maps_place_category_set_url(__pCategory, "test");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_place_category_get_url(NULL, &url);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_get_url(__pCategory, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_contact_h __pContact = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_contact_startup
*/
void utc_maps_place_contact_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_place_contact_destroy_n(void)
{
ret = maps_place_contact_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_contact_clone_n(void)
{
maps_place_contact_h clone_place_contact = NULL;
+
ret = maps_place_contact_clone(NULL, &clone_place_contact);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_contact_clone(__pContact, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_contact_get_label_n(void)
{
char *label = NULL;
+
ret = maps_place_contact_get_label(NULL, &label);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_contact_get_label(__pContact, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_contact_get_type_n(void)
{
char *type = NULL;
+
ret = maps_place_contact_get_type(NULL, &type);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_contact_get_type(__pContact, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_contact_get_value_n(void)
{
char *value = NULL;
+
ret = maps_place_contact_get_value(NULL, &value);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_contact_get_value(__pContact, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_editorial_h __pEditorial = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_editorial_startup
*/
void utc_maps_place_editorial_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_place_editorial_destroy_n(void)
{
ret = maps_place_editorial_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_editorial_clone_n(void)
{
maps_place_editorial_h clone_place_editorial = NULL;
+
ret = maps_place_editorial_clone(NULL, &clone_place_editorial);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_editorial_clone(__pEditorial, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_editorial_get_description_n(void)
{
char *description = NULL;
+
ret = maps_place_editorial_get_description(NULL, &description);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_editorial_get_description(__pEditorial, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_editorial_get_language_n(void)
{
char *language = NULL;
+
ret = maps_place_editorial_get_language(NULL, &language);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_editorial_get_language(__pEditorial, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_editorial_get_media_n(void)
{
maps_place_media_h media = NULL;
+
ret = maps_place_editorial_get_media(__pEditorial, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_editorial_get_media(NULL, &media);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_filter_h __pFilter = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_filter_startup
*/
void utc_maps_place_filter_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
+
ret = 0;
__pFilter = NULL;
maps_place_filter_create(&__pFilter);
int utc_maps_place_filter_create_p(void)
{
maps_place_filter_h filter = NULL;
+
ret = maps_place_filter_create(&filter);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(filter);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(filter);
ret = maps_place_filter_destroy(filter);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_filter_create_n(void)
{
ret = maps_place_filter_create(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_place_filter_destroy_p(void)
{
- maps_place_filter_h filter = NULL;
- ret = maps_place_filter_create(&filter);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_place_filter_destroy(filter);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_place_filter_create_p */
return 0;
}
int utc_maps_place_filter_destroy_n(void)
{
ret = maps_place_filter_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_filter_clone_p(void)
{
maps_place_filter_h clone_place_filter = NULL;
- ret = maps_place_filter_clone(__pFilter, &clone_place_filter);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(clone_place_filter);
+ ret = maps_place_filter_clone(__pFilter, &clone_place_filter);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(clone_place_filter);
+
ret = maps_place_filter_destroy(clone_place_filter);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_filter_clone_n(void)
{
maps_place_filter_h clone_place_filter = NULL;
+
ret = maps_place_filter_clone(NULL, &clone_place_filter);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_clone(__pFilter, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_get_p(void)
{
+ char *test = NULL;
+
ret = maps_place_filter_set(__pFilter, "key", "value");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *test = NULL;
ret = maps_place_filter_get(__pFilter, "key", &test);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert_eq(strcmp(test, "value"), 0);
- assert_eq(strcmp(test, "value"), 0);
-
- free(test);
+ free(test);
+ }
return 0;
}
int utc_maps_place_filter_get_n(void)
{
char *test = NULL;
- ret = maps_place_filter_get(NULL, "key", &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
ret = maps_place_filter_set(__pFilter, "key", "value");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_place_filter_get(NULL, "key", &test);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_get(__pFilter, NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_get(__pFilter, "key", NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_get_keyword_p(void)
{
+ char *test = NULL;
+
ret = maps_place_filter_set_keyword(__pFilter, "keyword");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- char *test = NULL;
ret = maps_place_filter_get_keyword(__pFilter, &test);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- assert(test);
- assert_eq(strcmp(test, "keyword"), 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(test);
+ assert_eq(strcmp(test, "keyword"), 0);
- free(test);
+ free(test);
+ }
return 0;
}
int utc_maps_place_filter_get_keyword_n(void)
{
char *test = NULL;
+
ret = maps_place_filter_set_keyword(__pFilter, "keyword");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_get_keyword(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
assert(!test);
ret = maps_place_filter_get_keyword(__pFilter, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_filter_get_category_p(void)
{
maps_place_category_h category = NULL;
+ maps_place_category_h test = NULL;
+
ret = maps_place_category_create(&category);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_set_category(__pFilter, category);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- maps_place_category_h test = NULL;
ret = maps_place_filter_get_category(__pFilter, &test);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_destroy(category);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_category_destroy(test);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_filter_get_category_n(void)
{
maps_place_category_h test = NULL;
+
ret = maps_place_filter_get_category(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_get_category(__pFilter, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_filter_foreach_property_p(void)
{
ret = maps_place_filter_set(__pFilter, "key", "value");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_foreach_property(__pFilter, __utc_maps_place_filter_properties_cb, NULL);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_foreach_property_n(void)
{
- ret = maps_place_filter_foreach_property(NULL, __utc_maps_place_filter_properties_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
-
ret = maps_place_filter_set(__pFilter, "key", "value");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_place_filter_foreach_property(NULL, __utc_maps_place_filter_properties_cb, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_foreach_property(__pFilter, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_get_place_name_p(void)
{
- ret = maps_place_filter_set_place_name(__pFilter, "place_name");
- assert_eq(ret, MAPS_ERROR_NONE);
-
char *test = NULL;
- ret = maps_place_filter_get_place_name(__pFilter, &test);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(strcmp(test, "place_name"), 0);
+ ret = maps_place_filter_set_place_name(__pFilter, "place_name");
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- free(test);
+ ret = maps_place_filter_get_place_name(__pFilter, &test);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert_eq(strcmp(test, "place_name"), 0);
+ free(test);
+ }
return 0;
}
int utc_maps_place_filter_get_place_name_n(void)
{
char *test = NULL;
+
ret = maps_place_filter_get_place_name(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_get_place_name(__pFilter, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_set_p(void)
{
- ret = maps_place_filter_set(__pFilter, "key", "value");
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_place_filter_get_p */
return 0;
}
int utc_maps_place_filter_set_n(void)
{
ret = maps_place_filter_set(NULL, "key", "value");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_set(__pFilter, NULL, "value");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_set(__pFilter, "key", NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_set(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_set_category_p(void)
{
- maps_place_category_h category = NULL;
- ret = maps_place_category_create(&category);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_place_filter_set_category(__pFilter, category);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_place_category_destroy(category);
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_place_filter_get_category_p */
return 0;
}
int utc_maps_place_filter_set_category_n(void)
{
maps_place_category_h category = NULL;
- ret = maps_place_category_create(&category);
- assert_eq(ret, MAPS_ERROR_NONE);
ret = maps_place_filter_set_category(NULL, category);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_set_category(__pFilter, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
-
- ret = maps_place_category_destroy(category);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_set_keyword_p(void)
{
- ret = maps_place_filter_set_keyword(__pFilter, "keyword");
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_place_filter_get_keyword_p */
return 0;
}
int utc_maps_place_filter_set_keyword_n(void)
{
ret = maps_place_filter_set_keyword(NULL, "keyword");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_set_keyword(__pFilter, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_set_place_name_p(void)
{
- ret = maps_place_filter_set_place_name(__pFilter, "place_name");
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_place_filter_get_place_name_p */
return 0;
}
int utc_maps_place_filter_set_place_name_n(void)
{
ret = maps_place_filter_set_place_name(NULL,"place_name");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_set_place_name(__pFilter, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_set_place_address_p(void)
{
- ret = maps_place_filter_set_place_address(__pFilter, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ /* tested in utc_maps_place_filter_get_place_address_p */
return 0;
}
int utc_maps_place_filter_set_place_address_n(void)
{
ret = maps_place_filter_set_place_address(NULL,"restaurant");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_set_place_address(__pFilter, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_place_filter_get_place_address_p(void)
{
- ret = maps_place_filter_set_place_address(__pFilter, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
-
char *test = NULL;
- ret = maps_place_filter_get_place_address(__pFilter, &test);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(strcmp(test, "restaurant"), 0);
+ ret = maps_place_filter_set_place_address(__pFilter, "restaurant");
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- free(test);
+ ret = maps_place_filter_get_place_address(__pFilter, &test);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert_eq(strcmp(test, "restaurant"), 0);
+ free(test);
+ }
return 0;
}
int utc_maps_place_filter_get_place_address_n(void)
{
char *test = NULL;
+
ret = maps_place_filter_get_place_address(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_filter_get_place_address(__pFilter, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_image_h __pImage = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_image_startup
*/
void utc_maps_place_image_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_place_image_destroy_n(void)
{
ret = maps_place_image_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_image_clone_n(void)
{
maps_place_image_h clone_place_image = NULL;
+
ret = maps_place_image_clone(NULL, &clone_place_image);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_image_clone(__pImage, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_image_get_url_n(void)
{
char *url;
+
ret = maps_place_image_get_url(NULL, &url);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_image_get_url(__pImage, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_image_get_id_n(void)
{
char *id;
+
ret = maps_place_image_get_id(NULL, &id);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_image_get_id(__pImage, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_image_get_height_n(void)
{
int test;
+
ret = maps_place_image_get_height(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_image_get_height(__pImage, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_image_get_width_n(void)
{
int test;
+
ret = maps_place_image_get_width(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_image_get_width(__pImage, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_image_get_media_n(void)
{
maps_place_media_h media = NULL;
+
ret = maps_place_image_get_media(NULL, &media);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_image_get_media(__pImage, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_image_get_user_link_n(void)
{
maps_place_link_object_h user_link = NULL;
+
ret = maps_place_image_get_user_link(NULL, user_link);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_image_get_user_link(__pImage, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_link_object_h __pLinkObject = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_link_object_startup
*/
void utc_maps_place_link_object_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_place_link_object_destroy_n(void)
{
ret = maps_place_link_object_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_link_object_clone_n(void)
{
maps_place_link_object_h clone_place_link_object = NULL;
+
ret = maps_place_link_object_clone(NULL, &clone_place_link_object);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_link_object_clone(__pLinkObject, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_link_object_get_id_n(void)
{
char *id = NULL;
+
ret = maps_place_link_object_get_id(NULL, &id);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_link_object_get_id(__pLinkObject, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_link_object_get_name_n(void)
{
char *name = NULL;
+
ret = maps_place_link_object_get_name(NULL, &name);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_link_object_get_name(__pLinkObject, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_link_object_get_type_n(void)
{
char *type = NULL;
+
ret = maps_place_link_object_get_type(NULL, &type);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_link_object_get_type(__pLinkObject, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_link_object_get_string_n(void)
{
char *string = NULL;
+
ret = maps_place_link_object_get_string(NULL, &string);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_link_object_get_string(__pLinkObject, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_media_h __pMedia = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_media_startup
*/
void utc_maps_place_media_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_place_media_destroy_n(void)
{
ret = maps_place_media_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_media_clone_n(void)
{
maps_place_media_h clone_place_media = NULL;
+
ret = maps_place_media_clone(NULL, &clone_place_media);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_media_clone(__pMedia, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_media_get_attribution_n(void)
{
char *attribution;
+
ret = maps_place_media_get_attribution(NULL, &attribution);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_media_get_attribution(__pMedia, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_media_get_supplier_n(void)
{
maps_place_link_object_h supplier = NULL;
+
ret = maps_place_media_get_supplier(__pMedia, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_media_get_supplier(NULL, supplier);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_media_get_via_n(void)
{
maps_place_link_object_h via = NULL;
+
ret = maps_place_media_get_via(__pMedia, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_media_get_via(NULL, via);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_rating_h __pRating = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_rating_startup
*/
void utc_maps_place_rating_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_place_rating_destroy_n(void)
{
ret = maps_place_rating_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_rating_clone_n(void)
{
maps_place_rating_h clone_place_rating = NULL;
+
ret = maps_place_rating_clone(NULL, &clone_place_rating);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_rating_clone(__pRating, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_rating_get_count_n(void)
{
int test = 0;
+
ret = maps_place_rating_get_count(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_rating_get_count(__pRating, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_rating_get_average_n(void)
{
double test = .0;
+
ret = maps_place_rating_get_average(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_rating_get_average(__pRating, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_review_h __pReview = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_review_startup
*/
void utc_maps_place_review_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_place_review_destroy_n(void)
{
ret = maps_place_review_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_review_clone_n(void)
{
maps_place_review_h clone_place_review = NULL;
+
ret = maps_place_review_clone(NULL, &clone_place_review);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_review_clone(__pReview, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_review_get_date_n(void)
{
char *date = NULL;
+
ret = maps_place_review_get_date(NULL, &date);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_review_get_date(__pReview, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_review_get_title_n(void)
{
char *title = NULL;
+
ret = maps_place_review_get_title(NULL, &title);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_review_get_title(__pReview, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_review_get_description_n(void)
{
char *description = NULL;
+
ret = maps_place_review_get_description(NULL, &description);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_review_get_description(__pReview, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_review_get_language_n(void)
{
char *language = NULL;
+
ret = maps_place_review_get_language(NULL, &language);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_review_get_language(__pReview, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_review_get_rating_n(void)
{
double test = .0;
+
ret = maps_place_review_get_rating(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_review_get_rating(__pReview, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_review_get_media_n(void)
{
maps_place_media_h media = NULL;
+
ret = maps_place_review_get_media(__pReview, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_review_get_media(NULL, &media);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_review_get_user_link_n(void)
{
maps_place_link_object_h user_link = NULL;
+
ret = maps_place_review_get_user_link(__pReview, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_review_get_user_link(NULL, user_link);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_place_url_h __pUrl = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_place_url_startup
*/
void utc_maps_place_url_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_place_url_destroy_n(void)
{
ret = maps_place_url_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_place_url_clone_n(void)
{
maps_place_url_h clone_place_url = NULL;
+
ret = maps_place_url_clone(NULL, &clone_place_url);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_url_clone(__pUrl, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_url_get_path_n(void)
{
char *path = NULL;
+
ret = maps_place_url_get_path(NULL, &path);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_url_get_path(__pUrl, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_place_url_get_description_n(void)
{
char *description = NULL;
+
ret = maps_place_url_get_description(NULL, &description);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_place_url_get_description(__pUrl, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_preference_h preference = NULL;
int iterations = 0;
-
+static bool is_maps_supported = false;
/* typedef bool (*maps_preference_properties_cb)(int index, int total, char *key, char *value, void* user_data); */
static bool __utc_maps_preference_properties_cb(int index, int total, char *key, char *value, void* user_data)
*/
void utc_maps_preference_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
+
maps_preference_create(&preference);
iterations = 0;
}
int utc_maps_preference_create_p(void)
{
maps_preference_h test_preference = NULL;
+
ret = maps_preference_create(&test_preference);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(test_preference);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(test_preference);
ret = maps_preference_destroy(test_preference);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_preference_create_n(void)
{
ret = maps_preference_create(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_preference_destroy_n(void)
{
ret = maps_preference_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_preference_clone_p(void)
{
maps_preference_h cloned = NULL;
+
ret = maps_preference_clone(preference, &cloned);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(cloned);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(cloned);
+
ret = maps_preference_destroy(cloned);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_preference_clone_n(void)
{
maps_preference_h cloned = NULL;
+
ret = maps_preference_clone(NULL, &cloned);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert(!cloned);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_clone(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_clone(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_distance_unit_p(void)
{
- ret = maps_preference_set_distance_unit(preference, MAPS_DISTANCE_UNIT_M);
- assert_eq(ret, MAPS_ERROR_NONE);
maps_distance_unit_e unit = MAPS_DISTANCE_UNIT_KM;
+
+ ret = maps_preference_set_distance_unit(preference, MAPS_DISTANCE_UNIT_M);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_preference_get_distance_unit(preference, &unit);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(unit, MAPS_DISTANCE_UNIT_M);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(unit, MAPS_DISTANCE_UNIT_M);
return 0;
}
int utc_maps_preference_get_distance_unit_n(void)
{
maps_distance_unit_e unit = MAPS_DISTANCE_UNIT_KM;
+
ret = maps_preference_get_distance_unit(NULL, &unit);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_distance_unit(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_distance_unit(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_language_p(void)
{
- ret = maps_preference_set_language(preference, "EN-US");
- assert_eq(ret, MAPS_ERROR_NONE);
char *language = NULL;
+
+ ret = maps_preference_set_language(preference, "EN-US");
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_preference_get_language(preference, &language);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(language);
- assert_eq(strcmp(language, "EN-US"), 0);
- free(language);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(language);
+ assert_eq(strcmp(language, "EN-US"), 0);
+
+ free(language);
+ }
return 0;
}
int utc_maps_preference_get_language_n(void)
{
char *language = NULL;
+
ret = maps_preference_get_language(NULL, &language);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert(!language);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_language(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_language(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_max_results_p(void)
{
- ret = maps_preference_set_max_results(preference, 4);
- assert_eq(ret, MAPS_ERROR_NONE);
int max_results = 0;
+
+ ret = maps_preference_set_max_results(preference, 4);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_preference_get_max_results(preference, &max_results);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(max_results, 4);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(max_results, 4);
return 0;
}
int utc_maps_preference_get_max_results_n(void)
{
int max_results = 0;
+
ret = maps_preference_get_max_results(NULL, &max_results);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert_eq(max_results, 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_max_results(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_max_results(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_country_code_p(void)
{
- ret = maps_preference_set_country_code(preference, "RUS");
- assert_eq(ret, MAPS_ERROR_NONE);
char *country_code = NULL;
+
+ ret = maps_preference_set_country_code(preference, "RUS");
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_preference_get_country_code(preference, &country_code);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(country_code);
- assert_eq(strcmp(country_code, "RUS"), 0);
- free(country_code);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(country_code);
+ assert_eq(strcmp(country_code, "RUS"), 0);
+
+ free(country_code);
+ }
return 0;
}
int utc_maps_preference_get_country_code_n(void)
{
char *country_code = NULL;
+
ret = maps_preference_get_country_code(NULL, &country_code);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert(!country_code);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_country_code(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_country_code(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_route_optimization_p(void)
{
- ret = maps_preference_set_route_optimization(preference, MAPS_ROUTE_TYPE_FASTEST);
- assert_eq(ret, MAPS_ERROR_NONE);
maps_route_optimization_e optimization = MAPS_ROUTE_TYPE_SHORTEST;
+
+ ret = maps_preference_set_route_optimization(preference, MAPS_ROUTE_TYPE_FASTEST);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_preference_get_route_optimization(preference, &optimization);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(optimization, MAPS_ROUTE_TYPE_FASTEST);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(optimization, MAPS_ROUTE_TYPE_FASTEST);
return 0;
}
int utc_maps_preference_get_route_optimization_n(void)
{
maps_route_optimization_e optimization = MAPS_ROUTE_TYPE_SHORTEST;
+
ret = maps_preference_get_route_optimization(NULL, &optimization);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert_eq(optimization, MAPS_ROUTE_TYPE_SHORTEST);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_route_optimization(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_route_optimization(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_route_transport_mode_p(void)
{
- ret = maps_preference_set_route_transport_mode(preference, MAPS_ROUTE_TRANSPORT_MODE_CAR);
- assert_eq(ret, MAPS_ERROR_NONE);
maps_route_transport_mode_e transport_mode = MAPS_ROUTE_TRANSPORT_MODE_TRUCK;
+
+ ret = maps_preference_set_route_transport_mode(preference, MAPS_ROUTE_TRANSPORT_MODE_CAR);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_preference_get_route_transport_mode(preference, &transport_mode);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(transport_mode, MAPS_ROUTE_TRANSPORT_MODE_CAR);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(transport_mode, MAPS_ROUTE_TRANSPORT_MODE_CAR);
return 0;
}
int utc_maps_preference_get_route_transport_mode_n(void)
{
maps_route_transport_mode_e transport_mode = MAPS_ROUTE_TRANSPORT_MODE_TRUCK;
+
ret = maps_preference_get_route_transport_mode(NULL, &transport_mode);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert_eq(transport_mode, MAPS_ROUTE_TRANSPORT_MODE_TRUCK);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_route_transport_mode(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_route_transport_mode(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_route_feature_weight_p(void)
{
- ret = maps_preference_set_route_feature_weight(preference, MAPS_ROUTE_FEATURE_WEIGHT_AVOID);
- assert_eq(ret, MAPS_ERROR_NONE);
maps_route_feature_weight_e feature_weight = MAPS_ROUTE_FEATURE_WEIGHT_NORMAL;
+
+ ret = maps_preference_set_route_feature_weight(preference, MAPS_ROUTE_FEATURE_WEIGHT_AVOID);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_preference_get_route_feature_weight(preference, &feature_weight);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(feature_weight, MAPS_ROUTE_FEATURE_WEIGHT_AVOID);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(feature_weight, MAPS_ROUTE_FEATURE_WEIGHT_AVOID);
return 0;
}
int utc_maps_preference_get_route_feature_weight_n(void)
{
maps_route_feature_weight_e feature_weight = MAPS_ROUTE_FEATURE_WEIGHT_NORMAL;
+
ret = maps_preference_get_route_feature_weight(NULL, &feature_weight);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_route_feature_weight(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_route_feature_weight(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_route_feature_p(void)
{
- ret = maps_preference_set_route_feature(preference, MAPS_ROUTE_FEATURE_TOLL);
- assert_eq(ret, MAPS_ERROR_NONE);
maps_route_feature_e feature = MAPS_ROUTE_FEATURE_NO;
+
+ ret = maps_preference_set_route_feature(preference, MAPS_ROUTE_FEATURE_TOLL);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_preference_get_route_feature(preference, &feature);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(feature, MAPS_ROUTE_FEATURE_TOLL);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(feature, MAPS_ROUTE_FEATURE_TOLL);
return 0;
}
int utc_maps_preference_get_route_feature_n(void)
{
maps_route_feature_e feature = MAPS_ROUTE_FEATURE_NO;
+
ret = maps_preference_get_route_feature(NULL, &feature);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert_eq(feature, MAPS_ROUTE_FEATURE_NO);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_route_feature(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get_route_feature(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_p(void)
{
- ret = maps_preference_set_property(preference, "key", "value");
- assert_eq(ret, MAPS_ERROR_NONE);
char *value = NULL;
+
+ ret = maps_preference_set_property(preference, "key", "value");
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_preference_get(preference, "key", &value);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(value);
- assert_eq(strcmp(value, "value"), 0);
- free(value);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ assert(value);
+ assert_eq(strcmp(value, "value"), 0);
+
+ free(value);
+ }
return 0;
}
int utc_maps_preference_get_n(void)
{
char *value = NULL;
+
ret = maps_preference_get(NULL, "key", &value);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert(!value);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get(preference, NULL, &value);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert(!value);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get(preference, "key", NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_get(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_preference_foreach_property_p(void)
{
- ret = maps_preference_set_property(preference, "key", "value");
- assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_preference_foreach_property(preference, __utc_maps_preference_properties_cb, NULL);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert_eq(iterations, 1);
- return 0;
+ ret = maps_preference_set_property(preference, "key", "value");
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_preference_foreach_property(preference, __utc_maps_preference_properties_cb, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert_eq(iterations, 1);
+ return 0;
}
/**
int utc_maps_preference_foreach_property_n(void)
{
ret = maps_preference_foreach_property(NULL, __utc_maps_preference_properties_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert_eq(iterations, 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_foreach_property(preference, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert_eq(iterations, 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_foreach_property(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert_eq(iterations, 0);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_set_distance_unit_p(void)
{
- ret = maps_preference_set_distance_unit(preference, MAPS_DISTANCE_UNIT_M);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_set_distance_unit_p */
return 0;
}
int utc_maps_preference_set_distance_unit_n(void)
{
ret = maps_preference_set_distance_unit(NULL, MAPS_DISTANCE_UNIT_M);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_distance_unit(preference, 100);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_distance_unit(preference, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_set_language_p(void)
{
- ret = maps_preference_set_language(preference, "EN-US");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_get_language_p */
return 0;
}
int utc_maps_preference_set_language_n(void)
{
ret = maps_preference_set_language(NULL, "EN-US");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_language(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_language(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_set_max_results_p(void)
{
- ret = maps_preference_set_max_results(preference, 4);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_get_max_results_p */
return 0;
}
int utc_maps_preference_set_max_results_n(void)
{
ret = maps_preference_set_max_results(NULL, 4);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_max_results(preference, 0);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_max_results(NULL, 0);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_set_country_code_p(void)
{
- ret = maps_preference_set_country_code(preference, "RUS");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_get_country_code_p */
return 0;
}
int utc_maps_preference_set_country_code_n(void)
{
ret = maps_preference_set_country_code(NULL, "RUS");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_country_code(preference, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_country_code(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_set_route_optimization_p(void)
{
- ret = maps_preference_set_route_optimization(preference, MAPS_ROUTE_TYPE_FASTEST);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_get_route_optimization_p */
return 0;
}
int utc_maps_preference_set_route_optimization_n(void)
{
ret = maps_preference_set_route_optimization(NULL, MAPS_ROUTE_TYPE_FASTEST);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_set_route_transport_mode_p(void)
{
- ret = maps_preference_set_route_transport_mode(preference, MAPS_ROUTE_TRANSPORT_MODE_CAR);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_get_route_transport_mode_p */
return 0;
}
int utc_maps_preference_set_route_transport_mode_n(void)
{
ret = maps_preference_set_route_transport_mode(NULL, MAPS_ROUTE_TRANSPORT_MODE_CAR);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_route_transport_mode(preference, 100);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_route_transport_mode(preference, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_set_route_feature_weight_p(void)
{
- ret = maps_preference_set_route_feature_weight(preference, MAPS_ROUTE_FEATURE_WEIGHT_AVOID);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_get_route_feature_weight_p */
return 0;
}
int utc_maps_preference_set_route_feature_weight_n(void)
{
ret = maps_preference_set_route_feature_weight(NULL, MAPS_ROUTE_FEATURE_WEIGHT_AVOID);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_route_feature_weight(preference, 5);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_route_feature_weight(preference, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_preference_set_route_feature_p(void)
{
- ret = maps_preference_set_route_feature(preference, MAPS_ROUTE_FEATURE_TOLL);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_get_route_feature_p */
return 0;
}
int utc_maps_preference_set_route_feature_n(void)
{
ret = maps_preference_set_route_feature(NULL, MAPS_ROUTE_FEATURE_TOLL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_route_feature(preference, 11);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_route_feature(preference, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_set_property_p(void)
{
- ret = maps_preference_set_property(preference, "key", "value");
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_get_p */
return 0;
}
int utc_maps_preference_set_property_n(void)
{
ret = maps_preference_set_property(NULL, "key", "value");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_property(preference, NULL, "value");
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_property(preference, "key", NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_property(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_preference_set_route_alternatives_enabled_p(void)
{
- ret = maps_preference_set_route_alternatives_enabled(preference, true);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* Tested in utc_maps_preference_get_route_alternatives_enabled_p */
return 0;
}
int utc_maps_preference_set_route_alternatives_enabled_n(void)
{
ret = maps_preference_set_route_alternatives_enabled(NULL, true);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_preference_get_route_alternatives_enabled_p(void)
{
+ bool enable = false;
+
ret = maps_preference_set_route_alternatives_enabled(preference, true);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- bool enable = false;
ret = maps_preference_get_route_alternatives_enabled(preference, &enable);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(enable);
-
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(enable);
return 0;
}
int utc_maps_preference_get_route_alternatives_enabled_n(void)
{
ret = maps_preference_get_route_alternatives_enabled(NULL, (bool*)true);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
static int ret = 0;
static maps_route_h __pRoute = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_route_startup
*/
void utc_maps_route_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_route_destroy_n(void)
{
ret = maps_route_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
*/
int utc_maps_route_clone_n(void)
{
+ maps_route_h clone = NULL;
+
ret = maps_route_clone(__pRoute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- maps_route_h clone = NULL;
ret = maps_route_clone(NULL, &clone);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
- assert(!clone);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_clone(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
-
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_get_route_id_n(void)
{
char *test = NULL;
+
ret = maps_route_get_route_id(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_route_id(__pRoute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_route_id(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h origin = NULL;
ret = maps_route_get_origin(NULL, &origin);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_origin(__pRoute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_origin(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h destination = NULL;
ret = maps_route_get_destination(NULL, &destination);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_destination(__pRoute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_destination(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_area_h area = NULL;
ret = maps_route_get_bounding_box(__pRoute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_bounding_box(NULL, &area);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_bounding_box(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_get_total_distance_n(void)
{
double test = .0;
+
ret = maps_route_get_total_distance(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_total_distance(__pRoute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_total_distance(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_get_transport_mode_n(void)
{
maps_route_transport_mode_e test = MAPS_ROUTE_TRANSPORT_MODE_TRUCK;
+
ret = maps_route_get_transport_mode(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_transport_mode(__pRoute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_transport_mode(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_get_total_duration_n(void)
{
long test = 0l;
+
ret = maps_route_get_total_duration(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_total_duration(__pRoute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_total_duration(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_get_distance_unit_n(void)
{
maps_distance_unit_e test = MAPS_DISTANCE_UNIT_M;
+
ret = maps_route_get_distance_unit(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_get_distance_unit(__pRoute, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_foreach_property_n(void)
{
void *user_data = NULL;
+
ret = maps_route_foreach_property(__pRoute, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_foreach_property(NULL, __route_foreach_property_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_foreach_property(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_foreach_path_n(void)
{
void *user_data = NULL;
+
ret = maps_route_foreach_path(__pRoute, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_foreach_path(NULL, __utc_maps_route_path_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_foreach_path(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_foreach_segment_n(void)
{
void *user_data = NULL;
+
ret = maps_route_foreach_segment(__pRoute, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_foreach_segment(NULL, __utc_maps_route_segment_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_foreach_segment(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_route_maneuver_h __pManeuver = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_route_maneuver_startup
*/
void utc_maps_route_maneuver_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_route_maneuver_destroy_n(void)
{
ret = maps_route_maneuver_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_route_maneuver_clone_n(void)
{
maps_route_maneuver_h clone = NULL;
+
ret = maps_route_maneuver_clone(NULL, &clone);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_clone(__pManeuver, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_maneuver_get_direction_id_n(void)
{
maps_route_direction_e test = MAPS_ROUTE_DIRECTION_SOUTH;
+
ret = maps_route_maneuver_get_direction_id(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_direction_id(__pManeuver, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_direction_id(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_maneuver_get_turn_type_n(void)
{
maps_route_turn_type_e test = MAPS_ROUTE_TURN_TYPE_NONE;
+
ret = maps_route_maneuver_get_turn_type(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_turn_type(__pManeuver, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_turn_type(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_maneuver_get_position_n(void)
{
maps_coordinates_h position = NULL;
+
ret = maps_route_maneuver_get_position(__pManeuver, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_position(NULL, &position);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_maneuver_get_road_name_n(void)
{
char *test = NULL;
+
ret = maps_route_maneuver_get_road_name(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_road_name(__pManeuver, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_maneuver_get_instruction_text_n(void)
{
char *test = NULL;
+
ret = maps_route_maneuver_get_instruction_text(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_instruction_text(__pManeuver, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_maneuver_get_locale_n(void)
{
char *test = NULL;
+
ret = maps_route_maneuver_get_locale(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_locale(__pManeuver, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_maneuver_get_time_to_next_instruction_n(void)
{
int test = 0;
+
ret = maps_route_maneuver_get_time_to_next_instruction(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_time_to_next_instruction(__pManeuver, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_maneuver_get_distance_to_next_instruction_n(void)
{
double test = .0;
+
ret = maps_route_maneuver_get_distance_to_next_instruction(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_maneuver_get_distance_to_next_instruction(__pManeuver, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_route_segment_h __pSegment = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_maps_route_segment_startup
*/
void utc_maps_route_segment_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_route_segment_destroy_n(void)
{
ret = maps_route_segment_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
maps_route_segment_h clone = NULL;
ret = maps_route_segment_clone(__pSegment, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_clone(NULL, &clone);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h origin = NULL;
ret = maps_route_segment_get_origin(NULL, &origin);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_get_origin(__pSegment, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_get_origin(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h destination = NULL;
ret = maps_route_segment_get_destination(NULL, &destination);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_get_destination(__pSegment, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_get_destination(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_segment_get_bounding_box_n(void)
{
maps_area_h area = NULL;
+
ret = maps_route_segment_get_bounding_box(__pSegment, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_get_bounding_box(NULL, &area);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_segment_get_distance_n(void)
{
double test = .0;
+
ret = maps_route_segment_get_distance(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_get_distance(__pSegment, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_get_distance(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_segment_get_duration_n(void)
{
long test = 0;
+
ret = maps_route_segment_get_duration(NULL, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_get_duration(__pSegment, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_get_duration(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_segment_foreach_path_n(void)
{
void *user_data = NULL;
+
ret = maps_route_segment_foreach_path(__pSegment, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_foreach_path(NULL, __utc_maps_route_segment_path_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_foreach_path(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_route_segment_foreach_maneuver_n(void)
{
void *user_data = NULL;
+
ret = maps_route_segment_foreach_maneuver(__pSegment, NULL, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_foreach_maneuver(NULL, __utc_maps_route_segment_maneuver_cb, user_data);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_route_segment_foreach_maneuver(NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static char maps_provider_key[CONFIG_VALUE_LEN_MAX] = {0,};
static const int INVALID_REQUEST_ID = -1;
static bool is_internet_supported = false;
+static bool is_maps_supported = false;
/**
* @function utc_maps_service_startup
void utc_maps_service_startup(void)
{
is_internet_supported = _is_internet_feature_supported();
+ is_maps_supported = _is_maps_feature_supported();
/* Init global variables with default values */
ret = 0;
int utc_maps_service_foreach_provider_p(void)
{
ret = maps_service_foreach_provider(__utc_maps_service_provider_info_cb, NULL);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(service_available);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(service_available);
+
return 0;
}
int utc_maps_service_foreach_provider_n(void)
{
ret = maps_service_foreach_provider(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_service_create_p(void)
{
maps_service_h service = NULL;
+
ret = maps_service_create(__utc_get_maps_provider_name(), &service);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(service);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(service);
ret = maps_service_destroy(service);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_service_h maps = NULL;
ret = maps_service_create(__utc_get_maps_provider_name(), NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_create(NULL, &maps);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_create(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_create("test", &maps);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
*/
int utc_maps_service_destroy_p(void)
{
- maps_service_h maps = NULL;
- ret = maps_service_create(__utc_get_maps_provider_name(), &maps);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(maps);
-
- ret = maps_service_destroy(maps);
- assert_eq(ret, MAPS_ERROR_NONE);
+ /* tested in utc_maps_service_create_p */
return 0;
}
int utc_maps_service_destroy_n(void)
{
ret = maps_service_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
return 0;
}
int utc_maps_service_set_provider_key_p(void)
{
ret = maps_service_set_provider_key(__pMaps, maps_provider_key);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_set_provider_key_n(void)
{
ret = maps_service_set_provider_key(__pMaps, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_set_provider_key(NULL, maps_provider_key);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_set_provider_key(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
-
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_get_provider_key_p(void)
{
char *maps_key = NULL;
- ret = maps_service_get_provider_key(__pMaps, &maps_key);
- assert(maps_key);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_get_provider_key(__pMaps, &maps_key);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported)
+ assert(maps_key);
return 0;
}
int utc_maps_service_get_provider_key_n(void)
{
char *maps_key = NULL;
+
ret = maps_service_get_provider_key(NULL, &maps_key);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_get_provider_key(__pMaps, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_set_preference_p(void)
{
maps_preference_h preference;
+
ret = maps_preference_create(&preference);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(preference);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_set_max_results(preference, 10);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_set_preference(__pMaps, preference);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_preference_destroy(preference);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_set_preference_n(void)
{
ret = maps_service_set_preference(__pMaps, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_set_preference(NULL, __preference);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_set_preference(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_get_preference_p(void)
{
maps_preference_h preference = NULL;
+
ret = maps_service_get_preference(__pMaps, &preference);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_service_get_preference_n(void)
{
+ maps_preference_h pref = NULL;
+
ret = maps_service_get_preference(__pMaps, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- maps_preference_h pref = NULL;
ret = maps_service_get_preference(NULL, &pref);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_get_preference(NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_provider_is_service_supported_p(void)
{
bool test = false;
+
ret = maps_service_provider_is_service_supported(__pMaps, MAPS_SERVICE_GEOCODE, &test);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_provider_is_service_supported_n(void)
{
bool test = false;
+
ret = maps_service_provider_is_service_supported(__pMaps, 100, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_provider_is_service_supported(NULL, MAPS_SERVICE_GEOCODE, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_provider_is_service_supported(__pMaps, MAPS_SERVICE_GEOCODE, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_provider_is_service_supported(__pMaps, -1, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_provider_is_data_supported_p(void)
{
bool test = false;
+
ret = maps_service_provider_is_data_supported(__pMaps, MAPS_PLACE_ADDRESS, &test);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_provider_is_data_supported_n(void)
{
bool test = false;
+
ret = maps_service_provider_is_data_supported(__pMaps, 100, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_provider_is_data_supported(NULL, MAPS_PLACE_ADDRESS, &test);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_provider_is_data_supported(__pMaps, -1, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_provider_is_data_supported(__pMaps, MAPS_PLACE_ADDRESS, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_geocode_p(void)
{
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_geocode(__pMaps, "Berlin", __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- if (is_internet_supported) {
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_geocode(__pMaps, "Berlin", __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_internet_supported && is_maps_supported) {
wait_for_service();
assert(service_available);
- } else {
- assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
return 0;
}
int utc_maps_service_geocode_n(void)
{
int request_id = INVALID_REQUEST_ID;
+
ret = maps_service_geocode(NULL, "Bangalore, India", __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode(__pMaps, NULL, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode(__pMaps, "Bangalore, India", __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode(__pMaps, "Bangalore, India", __preference, __utc_maps_location_foreach_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode(NULL, NULL, NULL, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_area_h boundary = NULL;
maps_coordinates_h top_left = NULL;
maps_coordinates_h bottom_right = NULL;
- maps_coordinates_create(15.665354, 74.311523, &top_left);
- maps_coordinates_create(10.617418, 79.145508, &bottom_right);
- assert(top_left);
- assert(bottom_right);
+ int request_id = INVALID_REQUEST_ID;
- ret = maps_area_create_rectangle(top_left, bottom_right, &boundary);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(boundary);
+ if (is_maps_supported) {
+ maps_coordinates_create(15.665354, 74.311523, &top_left);
+ maps_coordinates_create(10.617418, 79.145508, &bottom_right);
+ assert(top_left);
+ assert(bottom_right);
- int request_id = INVALID_REQUEST_ID;
- ret = maps_service_geocode_inside_area(__pMaps, "Berlin", boundary, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- if (is_internet_supported) {
+ ret = maps_area_create_rectangle(top_left, bottom_right, &boundary);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(boundary);
- wait_for_service();
- assert(service_available);
+ ret = maps_service_geocode_inside_area(__pMaps, "Berlin", boundary, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(top_left);
- assert_eq(ret, MAPS_ERROR_NONE);
+ wait_for_service();
+ assert(service_available);
- ret = maps_coordinates_destroy(bottom_right);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(top_left);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_area_destroy(boundary);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(bottom_right);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_area_destroy(boundary);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
} else {
+ ret = maps_service_geocode_inside_area(__pMaps, "Berlin", boundary, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
return 0;
}
maps_area_h boundary = NULL;
maps_coordinates_h top_left = NULL;
maps_coordinates_h bottom_right = NULL;
- maps_coordinates_create(15.665354, 74.311523, &top_left);
- maps_coordinates_create(10.617418, 79.145508, &bottom_right);
- assert(top_left);
- assert(bottom_right);
+ int request_id = INVALID_REQUEST_ID;
- ret = maps_area_create_rectangle(top_left, bottom_right, &boundary);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(boundary);
+ if (is_maps_supported) {
+ maps_coordinates_create(15.665354, 74.311523, &top_left);
+ maps_coordinates_create(10.617418, 79.145508, &bottom_right);
+ assert(top_left);
+ assert(bottom_right);
- int request_id = INVALID_REQUEST_ID;
+ ret = maps_area_create_rectangle(top_left, bottom_right, &boundary);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(boundary);
+ }
ret = maps_service_geocode_inside_area(NULL, "Berlin", boundary, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode_inside_area(__pMaps, NULL, boundary, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode_inside_area(__pMaps, "Berlin", NULL, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode_inside_area(__pMaps, "Berlin", boundary, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode_inside_area(__pMaps, "Berlin", boundary, __preference, __utc_maps_location_foreach_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode_inside_area(NULL, NULL, NULL, NULL, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(top_left);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(bottom_right);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_area_destroy(boundary);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_geocode_by_structured_address_p(void)
{
maps_address_h address = NULL;
- ret = maps_address_create(&address);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(address);
+ int request_id = INVALID_REQUEST_ID;
- maps_address_set_city(address, "Berlin");
- assert_eq(ret, MAPS_ERROR_NONE);
- /* maps_address_set_street(address, "Rosa-Luxemburg"); */
- /* assert_eq(ret, MAPS_ERROR_NONE); */
- /* maps_address_set_building_number(address, "13"); */
- /* assert_eq(ret, MAPS_ERROR_NONE); */
+ if (is_maps_supported) {
+ ret = maps_address_create(&address);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(address);
- int request_id = INVALID_REQUEST_ID;
- ret = maps_service_geocode_by_structured_address(__pMaps, address, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- if (is_internet_supported) {
+ maps_address_set_city(address, "Berlin");
assert_eq(ret, MAPS_ERROR_NONE);
+ /* maps_address_set_street(address, "Rosa-Luxemburg"); */
+ /* assert_eq(ret, MAPS_ERROR_NONE); */
+ /* maps_address_set_building_number(address, "13"); */
+ /* assert_eq(ret, MAPS_ERROR_NONE); */
- wait_for_service();
- assert(service_available);
+ ret = maps_service_geocode_by_structured_address(__pMaps, address, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_address_destroy(address);
- assert_eq(ret, MAPS_ERROR_NONE);
+ wait_for_service();
+ assert(service_available);
+
+ ret = maps_address_destroy(address);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
} else {
+ ret = maps_service_geocode_by_structured_address(__pMaps, address, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
return 0;
}
int utc_maps_service_geocode_by_structured_address_n(void)
{
maps_address_h address = NULL;
- ret = maps_address_create(&address);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(address);
+ int request_id = INVALID_REQUEST_ID;
- maps_address_set_city(address, "Seoul");
- assert_eq(ret, MAPS_ERROR_NONE);
+ if (is_maps_supported) {
+ ret = maps_address_create(&address);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(address);
+ }
+ ret = maps_address_set_city(address, "Seoul");
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- int request_id = INVALID_REQUEST_ID;
ret = maps_service_geocode_by_structured_address(NULL, address, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode_by_structured_address(__pMaps, NULL, __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode_by_structured_address(__pMaps, address, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode_by_structured_address(__pMaps, address, __preference, __utc_maps_location_foreach_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_geocode_by_structured_address(NULL, NULL, NULL, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_address_destroy(address);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_reverse_geocode_p(void)
{
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_reverse_geocode(__pMaps, 12.944594, 77.554303, __preference, __utc_maps_address_foreach_cb, NULL, &request_id);
- if (is_internet_supported) {
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_reverse_geocode(__pMaps, 12.944594, 77.554303, __preference, __utc_maps_address_foreach_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_internet_supported && is_maps_supported) {
wait_for_service();
assert(service_available);
- } else {
- assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
return 0;
}
int utc_maps_service_reverse_geocode_n(void)
{
int request_id = INVALID_REQUEST_ID;
+
ret = maps_service_reverse_geocode(NULL, 12.944594, 77.554303, __preference, __utc_maps_address_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_reverse_geocode(__pMaps, 12.944594, 77.554303, __preference, __utc_maps_address_foreach_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_reverse_geocode(__pMaps, -91.00, 77.554303, __preference, __utc_maps_address_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_reverse_geocode(__pMaps, 12.944594, 181.4546, __preference, __utc_maps_address_foreach_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_reverse_geocode(__pMaps, 12.944594, 77.554303, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_reverse_geocode(NULL, 12.944594, 77.554303, NULL, NULL, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_cancel_request_p(void)
{
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_geocode(__pMaps, "Bangalore, India", __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
- if (is_internet_supported) {
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_geocode(__pMaps, "Bangalore, India", __preference, __utc_maps_location_foreach_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_internet_supported && is_maps_supported) {
ret = maps_service_cancel_request(__pMaps, request_id);
assert_eq(ret, MAPS_ERROR_NONE);
- } else {
- assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
return 0;
}
int request_id = INVALID_REQUEST_ID;
ret = maps_service_cancel_request(NULL, request_id);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_cancel_request(__pMaps, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_cancel_request(NULL, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
*/
int utc_maps_service_search_route_p(void)
{
- maps_coordinates_h origin;
- maps_coordinates_h dest;
- maps_coordinates_create(37.564263, 126.974676, &origin);
- maps_coordinates_create(37.557120, 126.992410, &dest);
- assert(origin);
- assert(dest);
-
+ maps_coordinates_h origin = NULL;
+ maps_coordinates_h dest = NULL;
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_route(__pMaps, origin, dest, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
- if (is_internet_supported) {
- assert_eq(ret, MAPS_ERROR_NONE);
- wait_for_service();
- assert(service_available);
+ if (is_maps_supported) {
+ maps_coordinates_create(37.564263, 126.974676, &origin);
+ maps_coordinates_create(37.557120, 126.992410, &dest);
+ assert(origin);
+ assert(dest);
- ret = maps_coordinates_destroy(origin);
- assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(dest);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_route(__pMaps, origin, dest, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ wait_for_service();
+ assert(service_available);
+
+ ret = maps_coordinates_destroy(origin);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(dest);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
} else {
+ ret = maps_service_search_route(__pMaps, origin, dest, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
return 0;
}
{
maps_coordinates_h origin = NULL;
maps_coordinates_h dest = NULL;
- maps_coordinates_create(37.564263, 126.974676, &origin);
- maps_coordinates_create(37.557120, 126.992410, &dest);
- assert(origin);
- assert(dest);
-
int request_id = INVALID_REQUEST_ID;
+
+ if (is_maps_supported) {
+ ret = maps_coordinates_create(37.564263, 126.974676, &origin);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(origin);
+
+ ret = maps_coordinates_create(37.557120, 126.992410, &dest);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(dest);
+ }
ret = maps_service_search_route(NULL, origin, dest, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_search_route(__pMaps, NULL, dest, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_search_route(__pMaps, origin, NULL, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_search_route(__pMaps, origin, dest, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_search_route(__pMaps, origin, dest, __preference, __utc_maps_route_service_found_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_search_route(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(origin);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+
ret = maps_coordinates_destroy(dest);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_service_search_route_waypoints_p(void)
{
maps_coordinates_h *waypoints = NULL;
- waypoints = (maps_coordinates_h *)g_malloc(sizeof(maps_coordinates_h)*3);
- maps_coordinates_create(37.564263, 126.974676, &waypoints[0]);
- maps_coordinates_create(37.557120, 126.992410, &waypoints[1]);
- maps_coordinates_create(37.550120, 126.982410, &waypoints[2]);
- assert(waypoints[0]);
- assert(waypoints[1]);
- assert(waypoints[2]);
-
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_route_waypoints(__pMaps, waypoints, 3, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
- if (is_internet_supported) {
- assert_eq(ret, MAPS_ERROR_NONE);
- wait_for_service();
- assert(service_available);
+ if (is_maps_supported) {
+ waypoints = (maps_coordinates_h *)g_malloc(sizeof(maps_coordinates_h)*3);
+ maps_coordinates_create(37.564263, 126.974676, &waypoints[0]);
+ maps_coordinates_create(37.557120, 126.992410, &waypoints[1]);
+ maps_coordinates_create(37.550120, 126.982410, &waypoints[2]);
+ assert(waypoints[0]);
+ assert(waypoints[1]);
+ assert(waypoints[2]);
- ret = maps_coordinates_destroy(waypoints[0]);
- assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(waypoints[1]);
- assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(waypoints[2]);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_route_waypoints(__pMaps, waypoints, 3, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ wait_for_service();
+ assert(service_available);
+
+ ret = maps_coordinates_destroy(waypoints[0]);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(waypoints[1]);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(waypoints[2]);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
+ g_free(waypoints);
} else {
+ ret = maps_service_search_route_waypoints(__pMaps, waypoints, 3, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
- g_free(waypoints);
return 0;
}
int utc_maps_service_search_route_waypoints_n(void)
{
maps_coordinates_h *waypoints = NULL;
- waypoints = (maps_coordinates_h *)g_malloc(sizeof(maps_coordinates_h)*3);
- maps_coordinates_create(37.564263, 126.974676, &waypoints[0]);
- maps_coordinates_create(37.557120, 126.992410, &waypoints[1]);
- maps_coordinates_create(37.550120, 126.982410, &waypoints[2]);
- assert(waypoints[0]);
- assert(waypoints[1]);
- assert(waypoints[2]);
-
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_route_waypoints(NULL, waypoints, 3, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_route_waypoints(__pMaps, NULL, 3, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ waypoints = (maps_coordinates_h *)g_malloc(sizeof(maps_coordinates_h)*3);
+ maps_coordinates_create(37.564263, 126.974676, &waypoints[0]);
+ maps_coordinates_create(37.557120, 126.992410, &waypoints[1]);
+ maps_coordinates_create(37.550120, 126.982410, &waypoints[2]);
+ assert(waypoints[0]);
+ assert(waypoints[1]);
+ assert(waypoints[2]);
+
+ ret = maps_service_search_route_waypoints(NULL, waypoints, 3, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_route_waypoints(__pMaps, NULL, 3, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_route_waypoints(__pMaps, waypoints, 3, __preference, NULL, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_route_waypoints(__pMaps, waypoints, 3, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_route_waypoints(__pMaps, waypoints, 3, __preference, __utc_maps_route_service_found_cb, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_route_waypoints(__pMaps, waypoints, 3, __preference, __utc_maps_route_service_found_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_route_waypoints(__pMaps, waypoints, -1, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_route_waypoints(NULL, NULL, 0, NULL, NULL, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ assert(!service_available);
+
+ ret = maps_coordinates_destroy(waypoints[0]);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(waypoints[1]);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(waypoints[2]);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ g_free(waypoints);
+ } else {
+ ret = maps_service_search_route_waypoints(NULL, waypoints, 3, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_route_waypoints(__pMaps, waypoints, -1, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_route_waypoints(__pMaps, NULL, 3, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_route_waypoints(NULL, NULL, 0, NULL, NULL, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_route_waypoints(__pMaps, waypoints, 3, __preference, NULL, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- assert(!service_available);
+ ret = maps_service_search_route_waypoints(__pMaps, waypoints, 3, __preference, __utc_maps_route_service_found_cb, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_coordinates_destroy(waypoints[0]);
- assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(waypoints[1]);
- assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(waypoints[2]);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_route_waypoints(__pMaps, waypoints, -1, __preference, __utc_maps_route_service_found_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- g_free(waypoints);
+ ret = maps_service_search_route_waypoints(NULL, NULL, 0, NULL, NULL, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
int utc_maps_service_search_place_p(void)
{
maps_place_filter_h places_fil = NULL;
- ret = maps_place_filter_create(&places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(places_fil);
-
- ret = maps_place_filter_set_keyword(places_fil, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_place_filter_set_place_name(places_fil, "Berlin");
- assert_eq(ret, MAPS_ERROR_NONE);
-
maps_coordinates_h coords = NULL;
- ret = maps_coordinates_create(52.5167, 13.383, &coords);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(coords);
-
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_place(__pMaps, coords, 100, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- if (is_internet_supported) {
+
+ if (is_maps_supported) {
+ ret = maps_place_filter_create(&places_fil);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(places_fil);
- wait_for_service();
- assert(service_available);
+ ret = maps_place_filter_set_keyword(places_fil, "restaurant");
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(coords);
+ ret = maps_place_filter_set_place_name(places_fil, "Berlin");
assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_place_filter_destroy(places_fil);
+ ret = maps_coordinates_create(52.5167, 13.383, &coords);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(coords);
+
+ ret = maps_service_search_place(__pMaps, coords, 100, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ wait_for_service();
+ assert(service_available);
+
+ ret = maps_coordinates_destroy(coords);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_place_filter_destroy(places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
} else {
+ ret = maps_service_search_place(__pMaps, coords, 100, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
return 0;
}
int utc_maps_service_search_place_n(void)
{
maps_place_filter_h places_fil = NULL;
- ret = maps_place_filter_create(&places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(places_fil);
+ int request_id = INVALID_REQUEST_ID;
+ maps_coordinates_h coords = NULL;
- ret = maps_place_filter_set_keyword(places_fil, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
+ if (is_maps_supported) {
+ ret = maps_place_filter_create(&places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(places_fil);
- ret = maps_place_filter_set_place_name(places_fil, "Berlin");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_place_filter_set_keyword(places_fil, "restaurant");
+ assert_eq(ret, MAPS_ERROR_NONE);
- maps_coordinates_h coords = NULL;
- ret = maps_coordinates_create(52.5167, 13.383, &coords);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(coords);
+ ret = maps_place_filter_set_place_name(places_fil, "Berlin");
+ assert_eq(ret, MAPS_ERROR_NONE);
- int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_place(NULL, coords, 100, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_coordinates_create(52.5167, 13.383, &coords);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(coords);
+
+ ret = maps_service_search_place(NULL, coords, 100, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place(__pMaps, NULL, 100, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place(__pMaps, NULL, 100, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place(__pMaps, coords, 100, NULL, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place(__pMaps, coords, 100, NULL, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place(__pMaps, coords, 0, places_fil, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place(__pMaps, coords, 0, places_fil, __preference, NULL, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place(__pMaps, coords, 0, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place(__pMaps, coords, 0, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place(__pMaps, coords, -1, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place(__pMaps, coords, -1, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- assert(!service_available);
+ assert(!service_available);
+
+ ret = maps_coordinates_destroy(coords);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_place_filter_destroy(places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_service_search_place(NULL, coords, 100, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place(__pMaps, NULL, 100, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place(__pMaps, coords, 100, NULL, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place(__pMaps, coords, 0, places_fil, __preference, NULL, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_coordinates_destroy(coords);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_place(__pMaps, coords, 0, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_place_filter_destroy(places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_place(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place(__pMaps, coords, -1, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
int utc_maps_service_search_place_by_area_p(void)
{
maps_place_filter_h places_fil = NULL;
- ret = maps_place_filter_create(&places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(places_fil);
-
- ret = maps_place_filter_set_keyword(places_fil, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_place_filter_set_place_name(places_fil, "Berlin");
- assert_eq(ret, MAPS_ERROR_NONE);
-
maps_area_h area = NULL;
maps_coordinates_h top_left = NULL;
maps_coordinates_h bottom_right = NULL;
- maps_coordinates_create(15.665354, 74.311523, &top_left);
- maps_coordinates_create(10.617418, 79.145508, &bottom_right);
- assert(top_left);
- assert(bottom_right);
-
- ret = maps_area_create_rectangle(top_left, bottom_right, &area);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(area);
-
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_place_by_area(__pMaps, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- if (is_internet_supported) {
- assert_eq(ret, MAPS_ERROR_NONE);
- wait_for_service();
- assert(service_available);
-
- ret = maps_coordinates_destroy(top_left);
+ if (is_maps_supported) {
+ ret = maps_place_filter_create(&places_fil);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(places_fil);
- ret = maps_coordinates_destroy(bottom_right);
+ ret = maps_place_filter_set_keyword(places_fil, "restaurant");
assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_area_destroy(area);
+ ret = maps_place_filter_set_place_name(places_fil, "Berlin");
assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_place_filter_destroy(places_fil);
+ maps_coordinates_create(15.665354, 74.311523, &top_left);
+ maps_coordinates_create(10.617418, 79.145508, &bottom_right);
+ assert(top_left);
+ assert(bottom_right);
+
+ ret = maps_area_create_rectangle(top_left, bottom_right, &area);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(area);
+
+ ret = maps_service_search_place_by_area(__pMaps, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ wait_for_service();
+ assert(service_available);
+
+ ret = maps_coordinates_destroy(top_left);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_coordinates_destroy(bottom_right);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_area_destroy(area);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_place_filter_destroy(places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
} else {
+ ret = maps_service_search_place_by_area(__pMaps, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
return 0;
}
int utc_maps_service_search_place_by_area_n(void)
{
maps_place_filter_h places_fil = NULL;
- ret = maps_place_filter_create(&places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(places_fil);
-
- ret = maps_place_filter_set_keyword(places_fil, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_place_filter_set_place_name(places_fil, "Berlin");
- assert_eq(ret, MAPS_ERROR_NONE);
-
maps_area_h area = NULL;
maps_coordinates_h top_left = NULL;
maps_coordinates_h bottom_right = NULL;
- maps_coordinates_create(15.665354, 74.311523, &top_left);
- maps_coordinates_create(10.617418, 79.145508, &bottom_right);
- assert(top_left);
- assert(bottom_right);
+ int request_id = INVALID_REQUEST_ID;
- ret = maps_area_create_rectangle(top_left, bottom_right, &area);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(area);
+ if (is_maps_supported) {
+ ret = maps_place_filter_create(&places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(places_fil);
- int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_place_by_area(NULL, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_place_filter_set_keyword(places_fil, "restaurant");
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_service_search_place_by_area(__pMaps, NULL, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_place_filter_set_place_name(places_fil, "Berlin");
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_service_search_place_by_area(__pMaps, area, NULL, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ maps_coordinates_create(15.665354, 74.311523, &top_left);
+ maps_coordinates_create(10.617418, 79.145508, &bottom_right);
+ assert(top_left);
+ assert(bottom_right);
- ret = maps_service_search_place_by_area(__pMaps, area, places_fil, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_area_create_rectangle(top_left, bottom_right, &area);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(area);
- ret = maps_service_search_place_by_area(__pMaps, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_by_area(NULL, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_by_area(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_by_area(__pMaps, NULL, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- assert(!service_available);
+ ret = maps_service_search_place_by_area(__pMaps, area, NULL, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_coordinates_destroy(top_left);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_place_by_area(__pMaps, area, places_fil, __preference, NULL, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_coordinates_destroy(bottom_right);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_place_by_area(__pMaps, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_area(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ assert(!service_available);
+
+ ret = maps_coordinates_destroy(top_left);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_coordinates_destroy(bottom_right);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_area_destroy(area);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_place_filter_destroy(places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_service_search_place_by_area(NULL, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_area(__pMaps, NULL, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_area_destroy(area);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_place_by_area(__pMaps, area, NULL, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_area(__pMaps, area, places_fil, __preference, NULL, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_place_filter_destroy(places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_place_by_area(__pMaps, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_area(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
int utc_maps_service_search_place_by_address_p(void)
{
maps_place_filter_h places_fil = NULL;
- ret = maps_place_filter_create(&places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(places_fil);
-
- ret = maps_place_filter_set_keyword(places_fil, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_place_filter_set_place_name(places_fil, "Berlin");
- assert_eq(ret, MAPS_ERROR_NONE);
-
maps_area_h area = NULL;
maps_coordinates_h top_left = NULL;
maps_coordinates_h bottom_right = NULL;
- maps_coordinates_create(15.665354, 74.311523, &top_left);
- maps_coordinates_create(10.617418, 79.145508, &bottom_right);
- assert(top_left);
- assert(bottom_right);
+ int request_id = INVALID_REQUEST_ID;
- ret = maps_area_create_rectangle(top_left, bottom_right, &area);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(area);
+ if (is_maps_supported) {
+ ret = maps_place_filter_create(&places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(places_fil);
- int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- if (is_internet_supported) {
+ ret = maps_place_filter_set_keyword(places_fil, "restaurant");
assert_eq(ret, MAPS_ERROR_NONE);
- wait_for_service();
- assert(service_available);
+ ret = maps_place_filter_set_place_name(places_fil, "Berlin");
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_place_filter_destroy(places_fil);
+ maps_coordinates_create(15.665354, 74.311523, &top_left);
+ maps_coordinates_create(10.617418, 79.145508, &bottom_right);
+ assert(top_left);
+ assert(bottom_right);
+
+ ret = maps_area_create_rectangle(top_left, bottom_right, &area);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(area);
+
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ wait_for_service();
+ assert(service_available);
+
+ ret = maps_place_filter_destroy(places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
} else {
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
return 0;
}
int utc_maps_service_search_place_by_address_n(void)
{
maps_place_filter_h places_fil = NULL;
- ret = maps_place_filter_create(&places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(places_fil);
-
- ret = maps_place_filter_set_keyword(places_fil, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_place_filter_set_place_name(places_fil, "Berlin");
- assert_eq(ret, MAPS_ERROR_NONE);
-
maps_area_h area = NULL;
maps_coordinates_h top_left = NULL;
maps_coordinates_h bottom_right = NULL;
- maps_coordinates_create(15.665354, 74.311523, &top_left);
- maps_coordinates_create(10.617418, 79.145508, &bottom_right);
- assert(top_left);
- assert(bottom_right);
+ int request_id = INVALID_REQUEST_ID;
- ret = maps_area_create_rectangle(top_left, bottom_right, &area);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(area);
+ if (is_maps_supported) {
+ ret = maps_place_filter_create(&places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(places_fil);
- int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_place_by_address(NULL, "Berlin", area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_place_filter_set_keyword(places_fil, "restaurant");
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_place_filter_set_place_name(places_fil, "Berlin");
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ maps_coordinates_create(15.665354, 74.311523, &top_left);
+ maps_coordinates_create(10.617418, 79.145508, &bottom_right);
+ assert(top_left);
+ assert(bottom_right);
+
+ ret = maps_area_create_rectangle(top_left, bottom_right, &area);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(area);
+
+ ret = maps_service_search_place_by_address(NULL, "Berlin", area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_address(__pMaps, NULL, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_by_address(__pMaps, NULL, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", NULL, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_by_address(__pMaps, "Berlin", NULL, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, NULL, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, NULL, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, places_fil, __preference, NULL, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, places_fil, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_by_address(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_by_address(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ assert(!service_available);
- assert(!service_available);
+ ret = maps_place_filter_destroy(places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_service_search_place_by_address(NULL, "Berlin", area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_address(__pMaps, NULL, area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", NULL, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, NULL, __preference, __utc_maps_service_search_place_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, places_fil, __preference, NULL, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_place_filter_destroy(places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_place_by_address(__pMaps, "Berlin", area, places_fil, __preference, __utc_maps_service_search_place_cb, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_by_address(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
{
int request_id = INVALID_REQUEST_ID;
maps_coordinates_list_h coordinates_list = NULL;
- ret = maps_coordinates_list_create(&coordinates_list);
- assert_eq(ret, MAPS_ERROR_NONE);
-
maps_coordinates_h *coord = NULL;
- coord = (maps_coordinates_h *)g_malloc(sizeof(maps_coordinates_h)*3);
- maps_coordinates_create(52.5309, 13.3845, &coord[0]);
- maps_coordinates_create(50.1618996, 8.5334997, &coord[1]);
- maps_coordinates_create(40.72962607104243, -73.98685008095087, &coord[2]);
- assert(coord[0]);
- assert(coord[1]);
- assert(coord[2]);
-
- ret = maps_coordinates_list_append(coordinates_list, coord[0]);
- assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_list_append(coordinates_list, coord[1]);
- assert_eq(ret, MAPS_ERROR_NONE);
+ if (is_maps_supported) {
+ ret = maps_coordinates_list_create(&coordinates_list);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_list_append(coordinates_list, coord[2]);
- assert_eq(ret, MAPS_ERROR_NONE);
+ coord = (maps_coordinates_h *)g_malloc(sizeof(maps_coordinates_h)*3);
+ maps_coordinates_create(52.5309, 13.3845, &coord[0]);
+ maps_coordinates_create(50.1618996, 8.5334997, &coord[1]);
+ maps_coordinates_create(40.72962607104243, -73.98685008095087, &coord[2]);
+ assert(coord[0]);
+ assert(coord[1]);
+ assert(coord[2]);
- ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
- if (is_internet_supported) {
+ ret = maps_coordinates_list_append(coordinates_list, coord[0]);
assert_eq(ret, MAPS_ERROR_NONE);
- wait_for_service();
- assert(service_available);
+ ret = maps_coordinates_list_append(coordinates_list, coord[1]);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_list_destroy(coordinates_list);
+ ret = maps_coordinates_list_append(coordinates_list, coord[2]);
assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ wait_for_service();
+ assert(service_available);
+
+ ret = maps_coordinates_list_destroy(coordinates_list);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ g_free(coord);
} else {
+ ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
- g_free(coord);
return 0;
}
{
int request_id = INVALID_REQUEST_ID;
maps_coordinates_list_h coordinates_list = NULL;
- ret = maps_coordinates_list_create(&coordinates_list);
- assert_eq(ret, MAPS_ERROR_NONE);
-
maps_coordinates_h *coord = NULL;
- coord = (maps_coordinates_h *)g_malloc(sizeof(maps_coordinates_h)*3);
- maps_coordinates_create(52.5309, 13.3845, &coord[0]);
- maps_coordinates_create(50.1618996, 8.5334997, &coord[1]);
- maps_coordinates_create(40.72962607104243, -73.98685008095087, &coord[2]);
- assert(coord[0]);
- assert(coord[1]);
- assert(coord[2]);
- ret = maps_coordinates_list_append(coordinates_list, coord[0]);
- assert_eq(ret, MAPS_ERROR_NONE);
+ if (is_maps_supported) {
+ ret = maps_coordinates_list_create(&coordinates_list);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ coord = (maps_coordinates_h *)g_malloc(sizeof(maps_coordinates_h)*3);
+ maps_coordinates_create(52.5309, 13.3845, &coord[0]);
+ maps_coordinates_create(50.1618996, 8.5334997, &coord[1]);
+ maps_coordinates_create(40.72962607104243, -73.98685008095087, &coord[2]);
+ assert(coord[0]);
+ assert(coord[1]);
+ assert(coord[2]);
- ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_coordinates_list_append(coordinates_list, coord[0]);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_list_append(coordinates_list, coord[1]);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_coordinates_list_append(coordinates_list, coord[2]);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_list_append(coordinates_list, coord[1]);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_service_multi_reverse_geocode(NULL, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_coordinates_list_append(coordinates_list, coord[2]);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_service_multi_reverse_geocode(__pMaps, NULL, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_multi_reverse_geocode(NULL, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_multi_reverse_geocode(__pMaps, NULL, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, NULL, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- assert(!service_available);
+ ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_coordinates_list_destroy(coordinates_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ assert(!service_available);
- g_free(coord);
+ ret = maps_coordinates_list_destroy(coordinates_list);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ g_free(coord);
+ } else {
+ ret = maps_service_multi_reverse_geocode(NULL, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_multi_reverse_geocode(__pMaps, NULL, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, NULL, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_multi_reverse_geocode(__pMaps, coordinates_list, __preference, __utc_maps_service_multi_reverse_geocode_cb, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
}
maps_place_filter_h places_fil = NULL;
- ret = maps_place_filter_create(&places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(places_fil);
-
- ret = maps_place_filter_set_keyword(places_fil, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_place_filter_set_place_name(places_fil, "Berlin");
- assert_eq(ret, MAPS_ERROR_NONE);
-
maps_coordinates_h coords = NULL;
- ret = maps_coordinates_create(52.5167, 13.383, &coords);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(coords);
-
maps_area_h boundary = NULL;
int distance = 504295;
- ret = maps_area_create_circle(coords, distance, &boundary);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(boundary);
-
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
- if (is_internet_supported) {
- assert_eq(ret, MAPS_ERROR_NONE);
- wait_for_service();
- assert(service_available);
+ if (is_maps_supported) {
+ ret = maps_place_filter_create(&places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(places_fil);
- ret = maps_area_destroy(boundary);
+ ret = maps_place_filter_set_keyword(places_fil, "restaurant");
+ assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_place_filter_set_place_name(places_fil, "Berlin");
assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(coords);
+ ret = maps_coordinates_create(52.5167, 13.383, &coords);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(coords);
- ret = maps_place_filter_destroy(places_fil);
+ ret = maps_area_create_circle(coords, distance, &boundary);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(boundary);
+
+ ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ wait_for_service();
+ assert(service_available);
+
+ ret = maps_area_destroy(boundary);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_coordinates_destroy(coords);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_place_filter_destroy(places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
} else {
+ ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
{
int request_id = INVALID_REQUEST_ID;
maps_place_filter_h places_fil = NULL;
- ret = maps_place_filter_create(&places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(places_fil);
-
maps_coordinates_h coords = NULL;
- ret = maps_coordinates_create(52.5167, 13.383, &coords);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(coords);
-
maps_area_h boundary = NULL;
- ret = maps_area_create_circle(coords, 5234, &boundary);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(boundary);
- ret = maps_service_search_place_list(NULL, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ if (is_maps_supported) {
+ ret = maps_place_filter_create(&places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(places_fil);
+
+ ret = maps_coordinates_create(52.5167, 13.383, &coords);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(coords);
+
+ ret = maps_area_create_circle(coords, 5234, &boundary);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ assert(boundary);
- ret = maps_service_search_place_list(__pMaps, NULL, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_list(NULL, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_list(__pMaps, boundary, NULL, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_list(__pMaps, NULL, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_list(__pMaps, boundary, NULL, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, NULL, NULL, &request_id);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
- ret = maps_area_destroy(boundary);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_area_destroy(boundary);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(coords);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_coordinates_destroy(coords);
+ assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_place_filter_destroy(places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_place_filter_destroy(places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else {
+ ret = maps_service_search_place_list(NULL, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ ret = maps_service_search_place_list(__pMaps, NULL, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_list(__pMaps, boundary, NULL, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, NULL, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, NULL);
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
free(__place_uri);
__place_uri = NULL;
}
- maps_place_filter_h places_fil = NULL;
- ret = maps_place_filter_create(&places_fil);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(places_fil);
-
- ret = maps_place_filter_set_keyword(places_fil, "restaurant");
- assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_place_filter_set_place_name(places_fil, "Berlin");
- assert_eq(ret, MAPS_ERROR_NONE);
+ maps_place_filter_h places_fil = NULL;
maps_coordinates_h coords = NULL;
- ret = maps_coordinates_create(52.5167, 13.383, &coords);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(coords);
-
maps_area_h boundary = NULL;
int distance = 504295;
- ret = maps_area_create_circle(coords, distance, &boundary);
- assert_eq(ret, MAPS_ERROR_NONE);
- assert(boundary);
-
int request_id = INVALID_REQUEST_ID;
- ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
- if (is_internet_supported) {
- assert_eq(ret, MAPS_ERROR_NONE);
-
- if (!service_available)
- wait_for_service();
- assert(service_available);
- service_available = false;
- ret = maps_service_get_place_details(__pMaps, __place_uri, __utc_maps_service_get_place_details_cb, NULL, &request_id);
+ if (is_maps_supported) {
+ ret = maps_place_filter_create(&places_fil);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(places_fil);
- if (!service_available)
- wait_for_service();
- assert(service_available);
-
- ret = maps_area_destroy(boundary);
+ ret = maps_place_filter_set_keyword(places_fil, "restaurant");
+ assert_eq(ret, MAPS_ERROR_NONE);
+ ret = maps_place_filter_set_place_name(places_fil, "Berlin");
assert_eq(ret, MAPS_ERROR_NONE);
- ret = maps_coordinates_destroy(coords);
+ ret = maps_coordinates_create(52.5167, 13.383, &coords);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(coords);
- ret = maps_place_filter_destroy(places_fil);
+ ret = maps_area_create_circle(coords, distance, &boundary);
assert_eq(ret, MAPS_ERROR_NONE);
+ assert(boundary);
+
+ ret = maps_service_search_place_list(__pMaps, boundary, places_fil, __preference, __utc_maps_service_search_place_list_cb, NULL, &request_id);
+ if (is_internet_supported) {
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ if (!service_available)
+ wait_for_service();
+ assert(service_available);
+
+ service_available = false;
+ ret = maps_service_get_place_details(__pMaps, __place_uri, __utc_maps_service_get_place_details_cb, NULL, &request_id);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ if (!service_available)
+ wait_for_service();
+ assert(service_available);
+
+ ret = maps_area_destroy(boundary);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_coordinates_destroy(coords);
+ assert_eq(ret, MAPS_ERROR_NONE);
+
+ ret = maps_place_filter_destroy(places_fil);
+ assert_eq(ret, MAPS_ERROR_NONE);
+ } else
+ assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
} else {
+ ret = maps_service_get_place_details(__pMaps, __place_uri, __utc_maps_service_get_place_details_cb, NULL, &request_id);
assert_eq(ret, MAPS_ERROR_NOT_SUPPORTED);
}
-
return 0;
}
int request_id = INVALID_REQUEST_ID;
ret = maps_service_get_place_details(NULL, __place_uri, __utc_maps_service_get_place_details_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_get_place_details(__pMaps, NULL, __utc_maps_service_get_place_details_cb, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_get_place_details(__pMaps, __place_uri, NULL, NULL, &request_id);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_service_get_place_details(__pMaps, __place_uri, __utc_maps_service_get_place_details_cb, NULL, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
#include "utc_maps_utils.h"
static char *MAPS_PROVIDER_NAME = "HERE";
+//static char *MAPS_PROVIDER_NAME = "MAPZEN";
char *__utc_get_maps_provider_name()
{
if (ret == SYSTEM_INFO_ERROR_NONE && profile && *profile) {
if (!strcmp("wearable", profile))
ret = system_info_get_platform_bool("http://tizen.org/feature/network.internet", &__is_supported);
- }
+ }
if (profile)
free(profile);
return __is_supported;
}
+
+bool _is_maps_feature_supported(void)
+{
+ bool __is_supported = true;
+ system_info_get_platform_bool("http://tizen.org/feature/maps", &__is_supported);
+ return __is_supported;
+}
+
char *__utc_get_maps_provider_name();
bool _is_internet_feature_supported(void);
+bool _is_maps_feature_supported(void);
#endif /*__TCT_CAPI_MAPS_SERVICE_UTILS_H__*/
static maps_view_h maps_view_handle = NULL;
static Evas_Object *win = NULL;
static bool is_internet_supported = false;
+static bool is_maps_supported = false;
static void dummy_utc_maps_view_on_event_cb(maps_view_event_type_e type, maps_view_event_data_h event_data, void *user_data) { }
void utc_maps_view_startup(void)
{
is_internet_supported = _is_internet_feature_supported();
+ is_maps_supported = _is_maps_feature_supported();
elm_init(0, NULL);
elm_config_accel_preference_set("opengl");
int utc_maps_view_create_p(void)
{
ret = maps_view_destroy(maps_view_handle);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
maps_view_handle = NULL;
ret = maps_view_create(__pMaps, win, &maps_view_handle);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_create_n(void)
{
ret = maps_view_create(NULL, win, &maps_view_handle);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_create(__pMaps, NULL, &maps_view_handle);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_create(__pMaps, win, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_view_get_center(maps_view_handle, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_center(maps_view_handle, coord);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_view_get_center(NULL, &coord);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_center(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_center(NULL, coord);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_center(maps_view_handle, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int level = 0;
ret = maps_view_get_zoom_level(maps_view_handle, &level);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int level = 0;
ret = maps_view_get_zoom_level(NULL, &level);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_zoom_level(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_zoom_level_p(void)
{
ret = maps_view_set_zoom_level(maps_view_handle, 3);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_zoom_level_n(void)
{
ret = maps_view_set_zoom_level(NULL, 3);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int level = 0;
ret = maps_view_get_min_zoom_level(maps_view_handle, &level);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int level = 0;
ret = maps_view_get_min_zoom_level(NULL, &level);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_min_zoom_level(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int level = 0;
ret = maps_view_get_max_zoom_level(maps_view_handle, &level);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int level = 0;
ret = maps_view_get_max_zoom_level(NULL, &level);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_max_zoom_level(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_orientation_p(void)
{
ret = maps_view_set_orientation(maps_view_handle, 0.0);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_orientation_n(void)
{
ret = maps_view_set_orientation(NULL, 0.0);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
double orientation = 0.0;
ret = maps_view_get_orientation(maps_view_handle, &orientation);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
double orientation = 0.0;
ret = maps_view_get_orientation(NULL, &orientation);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_orientation(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_view_screen_to_geolocation(maps_view_handle, 0, 0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
maps_coordinates_destroy(coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_view_screen_to_geolocation(NULL, 0, 0, &coord);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_screen_to_geolocation(maps_view_handle, 0, 0, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_geolocation_to_screen(maps_view_handle, coord, &x, &y);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_geolocation_to_screen(NULL, coord, &x, &y);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_geolocation_to_screen(maps_view_handle, NULL, &x, &y);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_geolocation_to_screen(maps_view_handle, coord, NULL, &y);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_geolocation_to_screen(maps_view_handle, coord, &x, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_type_p(void)
{
ret = maps_view_set_type(maps_view_handle, MAPS_VIEW_TYPE_NORMAL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_type_n(void)
{
ret = maps_view_set_type(NULL, MAPS_VIEW_TYPE_NORMAL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_type(maps_view_handle, -1000);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_type_e type;
ret = maps_view_get_type(maps_view_handle, &type);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_type_e type;
ret = maps_view_get_type(NULL, &type);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_type(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_buildings_enabled_p(void)
{
ret = maps_view_set_buildings_enabled(maps_view_handle, false);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_buildings_enabled_n(void)
{
ret = maps_view_set_buildings_enabled(NULL, false);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_buildings_enabled(maps_view_handle, &enabled);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_buildings_enabled(NULL, &enabled);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_buildings_enabled(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_traffic_enabled_p(void)
{
ret = maps_view_set_traffic_enabled(maps_view_handle, false);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_traffic_enabled_n(void)
{
ret = maps_view_set_traffic_enabled(NULL, false);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_traffic_enabled(maps_view_handle, &enabled);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_traffic_enabled(NULL, &enabled);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_traffic_enabled(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_public_transit_enabled_p(void)
{
ret = maps_view_set_public_transit_enabled(maps_view_handle, false);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_public_transit_enabled_n(void)
{
ret = maps_view_set_public_transit_enabled(NULL, false);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_public_transit_enabled(maps_view_handle, &enabled);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_public_transit_enabled(NULL, &enabled);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_public_transit_enabled(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_language_p(void)
{
ret = maps_view_set_language(maps_view_handle, "eng");
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_language_n(void)
{
ret = maps_view_set_language(NULL, "eng");
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_language(maps_view_handle, NULL);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
dlog_print(DLOG_ERROR, "Maps", "[%s:%d] %p %p %s", __FUNCTION__, __LINE__, maps_view_handle, language, language);
ret = maps_view_get_language(maps_view_handle, &language);
dlog_print(DLOG_ERROR, "Maps", "[%s:%d] %p maps_view_get_language result = %s", __FUNCTION__, __LINE__, maps_view_handle, language);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
free(language);
char *language = NULL;
ret = maps_view_get_language(NULL, &language);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_language(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
Evas_Object *viewport = NULL;
ret = maps_view_get_viewport(maps_view_handle, &viewport);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
Evas_Object *viewport = NULL;
ret = maps_view_get_viewport(NULL, &viewport);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_viewport(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_screen_location_p(void)
{
ret = maps_view_set_screen_location(maps_view_handle, 10, 10, 10, 10);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_screen_location_n(void)
{
ret = maps_view_set_screen_location(NULL, 10, 10, 10, 10);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int x = 0, y = 0, width = 0, height = 0;
ret = maps_view_get_screen_location(maps_view_handle, &x, &y, &width, &height);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int x = 0, y = 0, width = 0, height = 0;
ret = maps_view_get_screen_location(NULL, &x, &y, &width, &height);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_screen_location(maps_view_handle, NULL, NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_move_p(void)
{
ret = maps_view_move(maps_view_handle, 10, 10);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_move_n(void)
{
ret = maps_view_move(NULL, 10, 10);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_resize_p(void)
{
ret = maps_view_resize(maps_view_handle, 10, 10);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_resize_n(void)
{
ret = maps_view_resize(NULL, 10, 10);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_resize(maps_view_handle, -1, 10);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_resize(maps_view_handle, 10, -1);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_visibility_p(void)
{
ret = maps_view_set_visibility(maps_view_handle, false);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_visibility(maps_view_handle, true);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_visibility_n(void)
{
ret = maps_view_set_visibility(NULL, false);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool visible = false;
ret = maps_view_get_visibility(maps_view_handle, &visible);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool visible = false;
ret = maps_view_get_visibility(NULL, &visible);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_visibility(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_event_cb_p(void)
{
ret = maps_view_set_event_cb(maps_view_handle, MAPS_VIEW_EVENT_GESTURE, dummy_utc_maps_view_on_event_cb, NULL);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_event_cb_n(void)
{
ret = maps_view_set_event_cb(NULL, MAPS_VIEW_EVENT_GESTURE, dummy_utc_maps_view_on_event_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_event_cb(maps_view_handle, MAPS_VIEW_EVENT_GESTURE - 1, dummy_utc_maps_view_on_event_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_event_cb(maps_view_handle, MAPS_VIEW_EVENT_GESTURE, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_unset_event_cb_p(void)
{
ret = maps_view_unset_event_cb(maps_view_handle, MAPS_VIEW_EVENT_GESTURE);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_unset_event_cb_n(void)
{
ret = maps_view_unset_event_cb(NULL, MAPS_VIEW_EVENT_GESTURE);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_unset_event_cb(maps_view_handle, MAPS_VIEW_EVENT_GESTURE - 1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_gesture_enabled_p(void)
{
ret = maps_view_set_gesture_enabled(maps_view_handle, MAPS_VIEW_GESTURE_NONE, false);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_gesture_enabled_n(void)
{
ret = maps_view_set_gesture_enabled(NULL, MAPS_VIEW_GESTURE_NONE, false);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_gesture_enabled(maps_view_handle, MAPS_VIEW_GESTURE_NONE - 1, false);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_gesture_enabled(maps_view_handle, MAPS_VIEW_GESTURE_NONE, &enabled);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_gesture_enabled(NULL, MAPS_VIEW_GESTURE_NONE, &enabled);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_gesture_enabled(maps_view_handle, MAPS_VIEW_GESTURE_NONE - 1, &enabled);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_gesture_enabled(maps_view_handle, MAPS_VIEW_GESTURE_NONE, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_scalebar_enabled_p(void)
{
ret = maps_view_set_scalebar_enabled(maps_view_handle, false);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_scalebar_enabled_n(void)
{
ret = maps_view_set_scalebar_enabled(NULL, false);
- ASSERT_IF_VAL_REF2(ret, is_internet_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+ ASSERT_IF_VAL_REF2(ret, is_internet_supported && is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_scalebar_enabled(maps_view_handle, &enabled);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
bool enabled = false;
ret = maps_view_get_scalebar_enabled(NULL, &enabled);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_get_scalebar_enabled(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polyline = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_add_object(maps_view_handle, polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_foreach_object(maps_view_handle, dummy_maps_view_object_cb, NULL);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_remove_object(maps_view_handle, polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
assert(eo);
maps_coordinates_h coord = NULL;
+ maps_view_object_h overlay = NULL;
+
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
- maps_view_object_h overlay = NULL;
ret = maps_view_object_create_overlay(coord, eo, MAPS_VIEW_OVERLAY_BUBBLE, &overlay);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_add_object(maps_view_handle, overlay);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_remove_object(maps_view_handle, overlay);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polyline = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_add_object(NULL, polyline);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_view_add_object(maps_view_handle, NULL);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
-
- ret = maps_view_add_object(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polyline = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_remove_object(NULL, polyline);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
-
- ret = maps_view_object_destroy(polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_remove_object(maps_view_handle, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
+
+ ret = maps_view_object_destroy(polyline);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_remove_all_objects_p(void)
{
ret = maps_view_remove_all_objects(maps_view_handle);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_remove_all_objects_n(void)
{
ret = maps_view_remove_all_objects(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_foreach_object_n(void)
{
ret = maps_view_foreach_object(NULL, dummy_maps_view_object_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_foreach_object(maps_view_handle, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_min_zoom_level_p(void)
{
ret = maps_view_set_min_zoom_level(maps_view_handle, 1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_min_zoom_level_n(void)
{
ret = maps_view_set_min_zoom_level(NULL, 1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_min_zoom_level(maps_view_handle, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_max_zoom_level_p(void)
{
ret = maps_view_set_max_zoom_level(maps_view_handle, 7);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_set_max_zoom_level_n(void)
{
ret = maps_view_set_max_zoom_level(NULL, 7);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_set_max_zoom_level(maps_view_handle, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_capture_snapshot_p(void)
{
ret = maps_view_capture_snapshot(maps_view_handle, MAPS_VIEW_SNAPSHOT_BMP, 90, "/tmp/maps_tmp_image.bmp");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_capture_snapshot(maps_view_handle, MAPS_VIEW_SNAPSHOT_JPEG, 90, "/tmp/maps_tmp_image.jpg");
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
char *path = "/tmp/maps_tmp_image.bmp";
ret = maps_view_capture_snapshot(NULL, MAPS_VIEW_SNAPSHOT_BMP, 50, path);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_capture_snapshot(maps_view_handle, MAPS_VIEW_SNAPSHOT_BMP - 1, 50, path);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_capture_snapshot(maps_view_handle, MAPS_VIEW_SNAPSHOT_BMP, -1, path);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_capture_snapshot(NULL, MAPS_VIEW_SNAPSHOT_BMP, 50, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_destroy_n(void)
{
ret = maps_view_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static int ret = 0;
static maps_view_event_data_h event = NULL;
+static bool is_maps_supported = false;
/**
* @function utc_map_view_startup
*/
void utc_maps_view_event_data_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
}
/**
int utc_maps_view_event_data_destroy_n(void)
{
ret = maps_view_event_data_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_event_data_h cloned = NULL;
ret = maps_view_event_data_clone(NULL, &cloned);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_clone(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_event_type_e event_type;
ret = maps_view_event_data_get_type(NULL, &event_type);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_type(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_gesture_e gesture_type;
ret = maps_view_event_data_get_gesture_type(NULL, &gesture_type);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_gesture_type(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_action_e action_type;
ret = maps_view_event_data_get_action_type(NULL, &action_type);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_action_type(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h center = NULL;
ret = maps_view_event_data_get_center(NULL, ¢er);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_center(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int delta_x = 0, delta_y = 0;
ret = maps_view_event_data_get_delta(NULL, &delta_x, &delta_y);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_delta(event, NULL, &delta_y);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_delta(event, &delta_x, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int x = 0, y = 0;
ret = maps_view_event_data_get_position(NULL, &x, &y);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_position(event, NULL, &y);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_position(event, &x, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int fingers = 0;
ret = maps_view_event_data_get_fingers(NULL, &fingers);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_fingers(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
double zoom_factor = 0.0;
ret = maps_view_event_data_get_zoom_factor(NULL, &zoom_factor);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_zoom_factor(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
double rotation_angle = 0.0;
ret = maps_view_event_data_get_rotation_angle(NULL, &rotation_angle);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_rotation_angle(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h object = NULL;
ret = maps_view_event_data_get_object(NULL, &object);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_object(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coordinates = NULL;
ret = maps_view_event_data_get_coordinates(NULL, &coordinates);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_event_data_get_coordinates(event, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
static Evas_Object *win = NULL;
static int ret = 0;
static char image_path[4096] = {0, };
+static bool is_maps_supported = false;
maps_view_object_h overlay = NULL;
static bool dummy_maps_coordinates_cb(int index, maps_coordinates_h coordinates, void *user_data)
*/
void utc_maps_view_object_startup(void)
{
+ is_maps_supported = _is_maps_feature_supported();
+
elm_init(0, NULL);
elm_config_accel_preference_set("opengl");
}
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord1, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_get_type(marker, &type);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_set_visible(marker, false);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_get_visible(marker, &visible);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_set_coordinates(marker, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_coordinates(marker, &coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_resize(marker, 10, 10);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_set_image_file(marker, new_image_path);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_image_file(marker, &file_path);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_size(marker, &width, &height);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_type(marker, &marker_type);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_set_z_order(marker, 0);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_z_order(marker, &z_order);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
-
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(NULL, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, NULL, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN - 1, &marker);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
-
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_object_destroy_n(void)
{
ret = maps_view_object_destroy(NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_get_type(NULL, &type);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_get_type(marker, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_object_set_visible_n(void)
{
ret = maps_view_object_set_visible(NULL, false);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_get_visible(NULL, &visible);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_get_visible(marker, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_set_coordinates(NULL, coord);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_set_coordinates(marker, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_resize(NULL, 10, 10);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_resize(marker, -1, 10);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_resize(marker, 10, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
}
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_set_image_file(NULL, new_image_path);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_set_image_file(marker, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_image_file(NULL, &file_path);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_image_file(marker, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_coordinates(NULL, &coord);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_coordinates(marker, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_size(NULL, &width, &height);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_size(marker, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_type(NULL, &type);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_type(marker, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_set_z_order(NULL, 0);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_set_z_order(marker, -101);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coord = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_marker(coord, image_path, MAPS_VIEW_MARKER_PIN, &marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_z_order(NULL, &z_order);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_marker_get_z_order(marker, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(marker);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int width = 0;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list1, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list1, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(5.0, 5.0, &coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(15.0, 15.0, &coord4);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list2, coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list2, coord4);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list1, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_set_polyline(polyline, coord_list2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_foreach_point(polyline, dummy_maps_coordinates_cb, NULL);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_set_color(polyline, '2', '2', '2', '2');
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_get_color(polyline, &r, &g, &b, &a);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_set_width(polyline, 2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_get_width(polyline, &width);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polyline = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(NULL, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 0, &polyline);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 1, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_destroy(coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polyline = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_set_polyline(NULL, coord_list);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_set_polyline(polyline, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_destroy(coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polyline = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_foreach_point(NULL, dummy_maps_coordinates_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_foreach_point(polyline, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_object_polyline_set_color_n(void)
{
ret = maps_view_object_polyline_set_color(NULL, '2', '2', '2', '2');
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
unsigned char r, g, b, a;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_get_color(NULL, &r, &g, &b, &a);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_get_color(polyline, NULL, NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polyline = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_set_width(NULL, 2);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_set_width(polyline, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int width = 0;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polyline(coord_list, '1', '1', '1', '1', 1, &polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_get_width(NULL, &width);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polyline_get_width(polyline, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polyline);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
unsigned char r, g, b, a;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 0.0, &coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list1, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list1, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list1, coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(0.0, 1.0, &coord4);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 11.0, &coord5);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 1.0, &coord6);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list2, coord4);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list2, coord5);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list2, coord6);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polygon(coord_list1, '1', '1', '1', '1', &polygon);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_set_polygon(polygon, coord_list2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_foreach_point(polygon, dummy_maps_coordinates_cb, NULL);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_set_fill_color(polygon, '2', '2', '2', '2');
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_get_fill_color(polygon, &r, &g, &b, &a);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polygon);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polygon = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 0.0, &coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polygon(NULL, '1', '1', '1', '1', &polygon);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polygon(coord_list, '1', '1', '1', '1', NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_destroy(coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polygon = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 0.0, &coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polygon(coord_list, '1', '1', '1', '1', &polygon);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_set_polygon(NULL, coord_list);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_set_polygon(polygon, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polygon);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h polygon = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 0.0, &coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polygon(coord_list, '1', '1', '1', '1', &polygon);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_foreach_point(NULL, dummy_maps_coordinates_cb, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_foreach_point(polygon, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polygon);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_object_polygon_set_fill_color_n(void)
{
ret = maps_view_object_polygon_set_fill_color(NULL, '1', '1', '1', '1');
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
unsigned char r, g, b, a;
ret = maps_coordinates_create(0.0, 0.0, &coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 10.0, &coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_create(10.0, 0.0, &coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_create(&coord_list);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord2);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_list_append(coord_list, coord3);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_polygon(coord_list, '1', '1', '1', '1', &polygon);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_get_fill_color(NULL, &r, &g, &b, &a);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_polygon_get_fill_color(polygon, NULL, NULL, NULL, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(polygon);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h overlay = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coordinate);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_overlay(coordinate, object, type, &overlay);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_set_visible(overlay, true);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_set_visible(overlay, false);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_destroy(overlay);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_view_object_h overlay = NULL;
ret = maps_coordinates_create(0.0, 0.0, &coordinate);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_overlay(NULL, object, type, &overlay);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_overlay(coordinate, object, type - 1, &overlay);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_create_overlay(coordinate, object, type, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(coordinate);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
Evas_Object *object = NULL;
ret = maps_view_object_overlay_get_object(overlay, &object);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
Evas_Object *object = NULL;
ret = maps_view_object_overlay_get_object(NULL, &object);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_overlay_get_object(overlay, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
{
maps_coordinates_h coordinates = NULL;
ret = maps_coordinates_create(1.0, 1.0, &coordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_overlay_set_coordinates(overlay, coordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coordinates = NULL;
ret = maps_coordinates_create(1.0, 1.0, &coordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_overlay_set_coordinates(NULL, coordinates);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_overlay_set_coordinates(overlay, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(coordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coordinates = NULL;
ret = maps_view_object_overlay_get_coordinates(overlay, &coordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_coordinates_destroy(coordinates);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
maps_coordinates_h coordinates = NULL;
ret = maps_view_object_overlay_get_coordinates(NULL, &coordinates);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_overlay_get_coordinates(overlay, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_object_overlay_set_min_zoom_level_p(void)
{
ret = maps_view_object_overlay_set_min_zoom_level(overlay, 1);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_object_overlay_set_min_zoom_level_n(void)
{
ret = maps_view_object_overlay_set_min_zoom_level(NULL, 1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_overlay_set_min_zoom_level(overlay, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int zoom_level = 0;
ret = maps_view_object_overlay_get_min_zoom_level(overlay, &zoom_level);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int zoom_level = 0;
ret = maps_view_object_overlay_get_min_zoom_level(NULL, &zoom_level);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_overlay_get_min_zoom_level(overlay, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_object_overlay_set_max_zoom_level_p(void)
{
ret = maps_view_object_overlay_set_max_zoom_level(overlay, 20);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int utc_maps_view_object_overlay_set_max_zoom_level_n(void)
{
ret = maps_view_object_overlay_set_max_zoom_level(NULL, 5);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_overlay_set_max_zoom_level(overlay, -1);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int zoom_level = 0;
ret = maps_view_object_overlay_get_max_zoom_level(overlay, &zoom_level);
- assert_eq(ret, MAPS_ERROR_NONE);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_NONE, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}
int zoom_level = 0;
ret = maps_view_object_overlay_get_max_zoom_level(NULL, &zoom_level);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
ret = maps_view_object_overlay_get_max_zoom_level(overlay, NULL);
- assert_eq(ret, MAPS_ERROR_INVALID_PARAMETER);
+ ASSERT_IF_VAL_REF2(ret, is_maps_supported, MAPS_ERROR_INVALID_PARAMETER, MAPS_ERROR_NOT_SUPPORTED);
return 0;
}