/**
 * @brief Positive test case of elm_multibuttonentry_items_get()
 */
static void utc_UIFW_elm_multibuttonentry_items_get_func_01(void)
{
	const Eina_List *items = NULL;
	int i=0;
	unsigned int count = 0;

	test_eo = elm_multibuttonentry_add(test_win);

	// test 1
	items = elm_multibuttonentry_items_get(test_eo);
	if (items) {
		tet_infoline("elm_multibuttonentry_items_get() failed in positive test case");
		tet_result(TET_FAIL);
		return;
	}

	for(i=0; i< 5; i++){
		elm_multibuttonentry_item_append(test_eo, "item", NULL);
	}

	// test 2
	items = elm_multibuttonentry_items_get(test_eo);
	TET_CHECK_PASS(NULL, (Eina_List*)items);

	// test 3
	count = eina_list_count(items);
	if (count != 5) {
		tet_infoline("elm_multibuttonentry_items_get() failed in positive test case");
		tet_result(TET_FAIL);
		return;
	}

	tet_result(TET_PASS);
	tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, elm_multibuttonentry_items_get().");
}
示例#2
0
/**
 * @brief Gets multibuttonentry items list
 *
 * @param multibuttonentry an EailMultibuttonentry
 * @return multibuttonentry items list
 * */
static const Eina_List *
eail_multibuttonentry_get_items(EailMultibuttonentry *multibuttonentry)
{
   Evas_Object *widget = eail_widget_get_widget(EAIL_WIDGET(multibuttonentry));
   if (!widget) return NULL;

   return elm_multibuttonentry_items_get(widget);
}
/**
 * @brief Negative test case of ug_init elm_multibuttonentry_items_get()
 */
static void utc_UIFW_elm_multibuttonentry_items_get_func_02(void)
{
	const Eina_List *items = NULL;
	int i=0;

	test_eo = elm_multibuttonentry_add(NULL);
	for(i=0; i< 5; i++){
		elm_multibuttonentry_item_prepend(test_eo, "item", NULL);
	}
	items = elm_multibuttonentry_items_get(NULL);
	TET_CHECK_FAIL(NULL, items);

	tet_result(TET_PASS);
	tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, Adding an Multi Button Entry has failed.");
}
示例#4
0
/**
 * @brief Helper function for getting multibuttonentry text
 *
 * @param text an AtkText (EailMultibutton object)
 *
 * @return string representation of multibutton entry text
 */
static const gchar*
_eail_multibuttonentry_get_entry_string(AtkText *text)
{
   const gchar *string = NULL;
   Evas_Object *widget = eail_widget_get_widget(EAIL_WIDGET(text));
   Evas_Object *entry = elm_multibuttonentry_entry_get(widget);

   if (entry)
     string = elm_entry_entry_get(entry);

   /* if entry string is empty then trying to return "guide" part*/
   if (!string || 0 == g_strcmp0(string, ""))
     {
        /* If there are some children of widget, then it means that guide
         * is not visible. So returning guide as text only if no children
         * exist */
        if (!elm_multibuttonentry_items_get(widget))
          string = elm_object_part_text_get(widget, "guide");
     }

   return string;
}