* @step 1 Set an overlay icon
* @step 2 Get an overlay icon
* @step 3 Set NULL instead of the icon
- * @step 4 Get an overlay icon
+ * @step 4 Get an overlay icon, it should be NULL
*
* @passcondition Returned value is equal to icon at step 2 and at step 4 and there is no segmentation fault
* @}
}
elm_map_overlay_icon_set(ovl, NULL);
ic = elm_map_overlay_icon_get(ovl);
- if (ic != icon)
+ if (ic != NULL)
{
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed, returned value is not NULL..", __FILE__, __LINE__);
}
* works properly and doesn't cause segmentation fault
* @n Input Data:
* @li the ovl object
- * @li NULL, the icon object
+ * @li the icon object
*
* @procedure
- * @step 1 Set an overlay icon
+ * @step 1 Set icon to default overlay
* @step 2 Get an overlay icon
* @step 3 Set NULL instead of the icon
* @step 4 Get an overlay icon
+ * @step 5 Delete default overlay
+ * @step 6 Set icon to class overlay
+ * @step 7 Get an overlay icon
+ * @step 8 Delete class overlay
+ * @step 9 Set icon to bubble overlay
+ * @step 10 Get an overlay icon
+ * @step 11 Delete bubble overlay
*
- * @passcondition Returned value is equal to icon at step 2 and NULL at step 4 and there is no segmentation fault
+ * @passcondition Returned value is equal to icon at step 2 and 7; NULL at step 4 and 10 and there is no segmentation fault
* @}
*/
START_TEST(utc_elm_map_overlay_icon_set_p)
{
const Evas_Object *ic = NULL;
+ Elm_Map_Overlay *class = NULL;
+ Elm_Map_Overlay *bubble = NULL;
if ((ovl == NULL) || (icon == NULL))
{
ic = elm_map_overlay_icon_get(ovl);
if (ic != icon)
{
+ elm_map_overlay_del(ovl);
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed, returned value is not icon..", __FILE__, __LINE__);
}
+
elm_map_overlay_icon_set(ovl, NULL);
ic = elm_map_overlay_icon_get(ovl);
- if (ic == NULL)
+ if (ic != NULL)
+ {
+ elm_map_overlay_del(ovl);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed, returned value is not NULL..", __FILE__, __LINE__);
+ }
+ elm_map_overlay_del(ovl);
+ ic = NULL;
+
+ class = elm_map_overlay_class_add(map);
+ if (class == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create an overlay..", __FILE__, __LINE__);
+ }
+ elm_map_overlay_icon_set(class, icon);
+ ic = elm_map_overlay_icon_get(class);
+ if (ic != icon)
+ {
+ elm_map_overlay_del(class);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed, returned value is not icon..", __FILE__, __LINE__);
+ }
+ elm_map_overlay_del(class);
+ ic = NULL;
+
+ bubble = elm_map_overlay_bubble_add(map);
+ if (bubble == NULL)
{
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create an overlay..", __FILE__, __LINE__);
+ }
+ elm_map_overlay_icon_set(bubble, icon);
+ ic = elm_map_overlay_icon_get(bubble);
+ if (ic != NULL)
+ {
+ elm_map_overlay_del(bubble);
ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed, returned value is not NULL..", __FILE__, __LINE__);
}
+ elm_map_overlay_del(bubble);
+
printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
}
END_TEST