--- /dev/null
+make: `utc_UIFW_elm_index_item_level_get_func' is up to date.
idx = elm_index_add(NULL);
evas_object_show(idx);
elm_index_item_go(idx, 0);
- if (!idx) {
+ if (idx) {
tet_infoline("elm_index_add() failed in negative test case");
tet_result(TET_FAIL);
return;
static void utc_UIFW_elm_index_item_append_func_01(void)
{
Evas_Object *idx = NULL;
- Elm_Genlist_Item *it = NULL;
- Elm_Index_Item *idx_it = NULL;
+ Elm_Genlist_Item *it = NULL,*it_gl = NULL;
+ Elm_Index_Item *it_idx = NULL;
Evas_Object *gl = NULL;
int i = 0, j = 0;
const char *letter = NULL;
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
elm_index_item_append(idx, buf, it);
}
- if(i == 39)
- idx_it = it;
+ if(i == 40)
+ it_gl = it;
j += 2;
}
elm_index_item_go(idx, 0);
- letter = elm_index_item_letter_get(idx_it);
+ it_idx = elm_index_item_find(idx,(void*)it_gl);
+ letter = elm_index_item_letter_get(it_idx);
+ if((strcmp(letter,"K"))){
+ tet_infoline("elm_index_item_append() failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
tet_result(TET_PASS);
}
static void utc_UIFW_elm_index_item_append_func_02(void)
{
Evas_Object *idx = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
+ Elm_Index_Item *it_idx = NULL;
Evas_Object *gl = NULL;
int i = 0, j = 0;
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
- evas_object_show(gl);
+ evas_object_show(gl);
evas_object_show(idx);
- itci.item_style = "default";
- itci.func.label_get = gli_label_get;
- itci.func.icon_get = NULL;
- itci.func.state_get = NULL;
- itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
- it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
- if ((j & 0xf) == 0) {
- char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_append(NULL, buf, it);
- }
- j += 2;
- }
+ itci.item_style = "default";
+ itci.func.label_get = gli_label_get;
+ itci.func.icon_get = NULL;
+ itci.func.state_get = NULL;
+ itci.func.del = NULL;
+ for (i = 0; i <=40; i++) {
+ it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+ if ((j & 0xf) == 0) {
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append(NULL, buf, it);
+ }
+ if(i == 40)
+ it_gl = it;
+ j += 2;
+ }
elm_index_item_go(idx, 0);
+ it_idx = elm_index_item_find(idx,(void*)it_gl);
+ if(it_idx) {
+ tet_infoline("elm_index_item_append() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
tet_result(TET_PASS);
+
}
static void utc_UIFW_elm_index_item_append_relative_func_01(void)
{
Evas_Object *idx = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
Evas_Object *gl = NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
+ const char *letter = NULL;
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
evas_object_show(gl);
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_append_relative(idx, buf, it,(void*)2);
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append(idx, buf, it);
}
- j += 2;
+ if(i==0)
+ it_gl=it;
+ j += 2;
}
- elm_index_item_go(idx, 0);
- tet_result(TET_PASS);
+ it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append_relative(idx, buf, it, it_gl);
+ elm_index_item_go(idx, 0);
+ it_idx = elm_index_item_find(idx,(void*)it_gl);
+ letter = elm_index_item_letter_get(it_idx);
+ if((strcmp(letter,"A")&&(strcmp(buf,"K")))) {
+ tet_infoline("elm_index_item_append_relative() failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
}
/**
static void utc_UIFW_elm_index_item_append_relative_func_02(void)
{
Evas_Object *idx = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
Evas_Object *gl = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
gl = elm_genlist_add(main_win);
- idx= elm_index_add(main_win);
- evas_object_show(gl);
- evas_object_show(idx);
- itci.item_style = "default";
- itci.func.label_get = gli_label_get;
- itci.func.icon_get = NULL;
- itci.func.state_get = NULL;
- itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ idx= elm_index_add(main_win);
+ evas_object_show(gl);
+ evas_object_show(idx);
+ itci.item_style = "default";
+ itci.func.label_get = gli_label_get;
+ itci.func.icon_get = NULL;
+ itci.func.state_get = NULL;
+ itci.func.del = NULL;
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_append_relative(NULL, buf, it,(void*)2);
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append(idx, buf, it);
}
+ if(i==0)
+ it_gl=it;
j += 2;
- }
- elm_index_item_go(idx, 0);
- tet_result(TET_PASS);
+ }
+ it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append_relative(NULL, buf, it, it_gl);
+ elm_index_item_go(idx, 0);
+ it_idx = elm_index_item_find(idx,(void*)it);
+ if(it_idx) {
+ tet_infoline("elm_index_item_append_relative() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
}
Evas_Object *idx = NULL;
Elm_Genlist_Item *it = NULL;
Evas_Object *gl = NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
elm_index_item_append(idx, buf, it);
}
- j += 2;
+ j += 2;
}
elm_index_item_go(idx, 0);
elm_index_item_clear(idx);
- tet_result(TET_PASS);
+ it_idx = elm_index_item_find(idx,(void*)it);
+ if(it_idx){
+ tet_infoline("elm_index_item_clear() failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
}
/**
static void utc_UIFW_elm_index_item_clear_func_02(void)
{
Evas_Object *idx = NULL;
- Elm_Genlist_Item *it = NULL;
Evas_Object *gl = NULL;
+ Elm_Genlist_Item *it = NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
gl = elm_genlist_add(main_win);
- idx= elm_index_add(main_win);
+ idx= elm_index_add(main_win);
evas_object_show(gl);
- evas_object_show(idx);
+ evas_object_show(idx);
itci.item_style = "default";
itci.func.label_get = gli_label_get;
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_append(NULL, buf, it);
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append(idx, buf, it);
}
- j += 2;
- }
+ j += 2;
+ }
elm_index_item_go(idx, 0);
elm_index_item_clear(NULL);
+ it_idx = elm_index_item_find(idx,(void*)it);
+ if(!it_idx){
+ tet_infoline("elm_index_item_clear() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
tet_result(TET_PASS);
}
{
Evas_Object *idx = NULL;
Evas_Object *gl = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
- char ch='C';
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
evas_object_show(gl);
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
elm_index_item_append(idx, buf, it);
}
+ if(i==24)
+ it_gl=it;
j += 2;
}
elm_index_item_go(idx, 0);
- elm_index_item_del(idx, &ch);
+ elm_index_item_del(idx,it_gl);
+ it_idx = elm_index_item_find(idx,(void*)it_gl);
+ if(it_idx){
+ tet_infoline("elm_index_item_del() failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
tet_result(TET_PASS);
}
static void utc_UIFW_elm_index_item_del_func_02(void)
{
Evas_Object *idx = NULL;
- Elm_Genlist_Item *it = NULL;
Evas_Object *gl = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
- char ch='C';
gl = elm_genlist_add(main_win);
- idx= elm_index_add(main_win);
+ idx= elm_index_add(main_win);
evas_object_show(gl);
- evas_object_show(idx);
+ evas_object_show(idx);
itci.item_style = "default";
itci.func.label_get = gli_label_get;
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
elm_index_item_append(idx, buf, it);
}
- j += 2;
+ if(i==24)
+ it_gl=it;
+ j += 2;
}
elm_index_item_go(idx, 0);
- elm_index_item_del(NULL, &ch);
- tet_result(TET_PASS);
+ elm_index_item_del(NULL,it_gl);
+ it_idx = elm_index_item_find(idx,(void*)it_gl);
+ if(!it_idx){
+ tet_infoline("elm_index_item_del() with argument as NULL failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
}
Evas_Object *idx = NULL;
Elm_Genlist_Item *it = NULL;
Evas_Object *gl = NULL;
- int i = 0, j = 0;
+ int i = 0, j = 0, level=-1;
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
evas_object_show(gl);
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
elm_index_item_append(idx, buf, it);
}
j += 2;
}
elm_index_item_go(idx,0);
- tet_result(TET_PASS);
+ level = elm_index_item_level_get(idx);
+ if(level){
+ tet_infoline("elm_index_item_go() failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
}
/**
Evas_Object *idx = NULL;
Elm_Genlist_Item *it = NULL;
Evas_Object *gl = NULL;
- int i = 0, j = 0;
+ int i = 0, j = 0, level=-1;
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
evas_object_show(gl);
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_append(NULL, buf, it);
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append(idx, buf, it);
}
j += 2;
}
- elm_index_item_go(NULL,0);
- tet_result(TET_PASS);
+ elm_index_item_go(NULL,1);
+ level = elm_index_item_level_get(idx);
+ if(level){
+ tet_infoline("elm_index_item_go() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
}
static void utc_UIFW_elm_index_item_prepend_func_01(void)
{
Evas_Object *idx = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Genlist_Item *it = NULL,*it_gl = NULL;
+ Elm_Index_Item *it_idx = NULL;
Evas_Object *gl = NULL;
int i = 0, j = 0;
+ const char *letter = NULL;
gl = elm_genlist_add(main_win);
- idx= elm_index_add(main_win);
- evas_object_show(gl);
- evas_object_show(idx);
+ idx= elm_index_add(main_win);
+ evas_object_show(gl);
+ evas_object_show(idx);
itci.item_style = "default";
itci.func.label_get = gli_label_get;
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
elm_index_item_prepend(idx, buf, it);
}
+ if(i == 40)
+ it_gl = it;
j += 2;
}
elm_index_item_go(idx, 0);
+ it_idx = elm_index_item_find(idx,(void*)it_gl);
+ letter = elm_index_item_letter_get(it_idx);
+ if((strcmp(letter,"K"))){
+ tet_infoline("elm_index_item_prepend() with argument as NULL failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
tet_result(TET_PASS);
}
static void utc_UIFW_elm_index_item_prepend_func_02(void)
{
Evas_Object *idx = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
+ Elm_Index_Item *it_idx = NULL;
Evas_Object *gl = NULL;
int i = 0, j = 0;
-
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
- evas_object_show(gl);
+ evas_object_show(gl);
evas_object_show(idx);
- itci.item_style = "default";
- itci.func.label_get = gli_label_get;
- itci.func.icon_get = NULL;
- itci.func.state_get = NULL;
- itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
- it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
- if ((j & 0xf) == 0) {
- char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_prepend(NULL, buf, it);
- }
- j += 2;
- }
+ itci.item_style = "default";
+ itci.func.label_get = gli_label_get;
+ itci.func.icon_get = NULL;
+ itci.func.state_get = NULL;
+ itci.func.del = NULL;
+ for (i = 0; i <=40; i++) {
+ it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+ if ((j & 0xf) == 0) {
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_prepend(NULL, buf, it);
+ }
+ if(i == 40)
+ it_gl = it;
+ j += 2;
+ }
elm_index_item_go(idx, 0);
- tet_result(TET_PASS);
+ it_idx = elm_index_item_find(idx,(void*)it_gl);
+ if(it_idx) {
+ tet_infoline("elm_index_item_prepend() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
}
static void utc_UIFW_elm_index_item_prepend_relative_func_01(void)
{
Evas_Object *idx = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
Evas_Object *gl = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
-
+ const char *letter = NULL;
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
- evas_object_show(gl);
+ evas_object_show(gl);
evas_object_show(idx);
itci.item_style = "default";
itci.func.label_get = gli_label_get;
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_prepend_relative(idx, buf, it,(void*)2);
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append(idx, buf, it);
}
+ if(i==0)
+ it_gl=it;
j += 2;
}
+ it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_prepend_relative(idx, buf, it, it_gl);
elm_index_item_go(idx, 0);
+ it_idx = elm_index_item_find(idx,(void*)it_gl);
+ letter = elm_index_item_letter_get(it_idx);
+ if((strcmp(letter,"A")&&(strcmp(buf,"K")))) {
+ tet_infoline("elm_index_item_prepend_relative() failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
tet_result(TET_PASS);
}
static void utc_UIFW_elm_index_item_prepend_relative_func_02(void)
{
Evas_Object *idx = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
Evas_Object *gl = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
-
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
evas_object_show(gl);
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_prepend_relative(NULL, buf, it,(void*)2);
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append(idx, buf, it);
}
+ if(i==0)
+ it_gl=it;
j += 2;
}
+ it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_prepend_relative(NULL, buf, it, it_gl);
elm_index_item_go(idx, 0);
- tet_result(TET_PASS);
+ it_idx = elm_index_item_find(idx,(void*)it);
+ if(it_idx) {
+ tet_infoline("elm_index_item_prepend_relative() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
}
);
return strdup(buf);
}
+
+int
+test_index2_cmp(const void *data1, const void *data2)
+{
+ const char *label1, *label2;
+ const Elm_List_Item *it1 = data1;
+ const Elm_List_Item *it2 = data2;
+
+ label1 = elm_list_item_label_get(it1);
+ label2 = elm_list_item_label_get(it2);
+
+ return strcasecmp(label1, label2);
+}
+
+int
+test_index2_icmp(const void *data1, const void *data2)
+{
+ const char *label1, *label2;
+ const Elm_Index_Item *it1 = data1;
+ const Elm_Index_Item *it2 = data2;
+
+ label1 = elm_index_item_letter_get(it1);
+ label2 = elm_index_item_letter_get(it2);
+
+ return strcasecmp(label1, label2);
+}
/**
* @brief Positive test case of elm_index_item_sorted_insert()
*/
static void utc_UIFW_elm_index_item_sorted_insert_func_01(void)
{
Evas_Object *idx = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
Evas_Object *gl = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
-
+ const char *letter = NULL;
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
- evas_object_show(gl);
+ evas_object_show(gl);
evas_object_show(idx);
- itci.item_style = "default";
- itci.func.label_get = gli_label_get;
- itci.func.icon_get = NULL;
- itci.func.state_get = NULL;
- itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
- it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
- if ((j & 0xf) == 0) {
+ itci.item_style = "default";
+ itci.func.label_get = gli_label_get;
+ itci.func.icon_get = NULL;
+ itci.func.state_get = NULL;
+ itci.func.del = NULL;
+ for (i = 0; i <=40; i++) {
+ it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+ if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
elm_index_item_append(idx, buf, it);
- }
+ }
+ if(i==0)
+ it_gl=it;
j += 2;
- }
- it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
- elm_index_item_sorted_insert(idx, NULL, it, NULL, NULL);
- elm_index_item_go(idx, 0);
+ }
+ it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+
+ elm_index_item_sorted_insert(idx, buf, it, test_index2_icmp, test_index2_cmp);
+ elm_index_item_go(idx, 0);
+ it_idx = elm_index_item_find(idx,(void*)it_gl);
+ letter = elm_index_item_letter_get(it_idx);
+ if((strcmp(letter,"A")&&(strcmp(buf,"K")))) {
+ tet_infoline("elm_index_item_sorted_insert() with argument as NULL failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
tet_result(TET_PASS);
}
static void utc_UIFW_elm_index_item_sorted_insert_func_02(void)
{
Evas_Object *idx = NULL;
+ Elm_Genlist_Item *it = NULL, *it_gl=NULL;
Evas_Object *gl = NULL;
- Elm_Genlist_Item *it = NULL;
+ Elm_Index_Item *it_idx = NULL;
int i = 0, j = 0;
-
gl = elm_genlist_add(main_win);
idx= elm_index_add(main_win);
- evas_object_show(gl);
+ evas_object_show(gl);
evas_object_show(idx);
itci.item_style = "default";
itci.func.label_get = gli_label_get;
itci.func.icon_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
- for (i = 0; i < 40; i++) {
+ for (i = 0; i <=40; i++) {
it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
if ((j & 0xf) == 0) {
char buf[32];
- snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
- elm_index_item_sorted_insert(NULL, buf, it, NULL, NULL);
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_append(idx, buf, it);
}
+ if(i==0)
+ it_gl=it;
j += 2;
}
- elm_index_item_go(idx, 0);
- tet_result(TET_PASS);
+ it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 3) & 0xf));
+ elm_index_item_sorted_insert(NULL, buf, it, NULL,NULL);
+ elm_index_item_go(idx, 0);
+ it_idx = elm_index_item_find(idx,(void*)it);
+ if(it_idx) {
+ tet_infoline("elm_index_item_sorted_insert() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
}
--- /dev/null
+CC ?= gcc
+
+
+TARGETS = utc_UIFW_elm_nocontents_add_func \
+ utc_UIFW_elm_nocontents_custom_get_func \
+ utc_UIFW_elm_nocontents_custom_set_func \
+ utc_UIFW_elm_nocontents_label_get_func \
+ utc_UIFW_elm_nocontents_label_set_func
+
+PKGS = elementary
+
+LDFLAGS = `pkg-config --libs $(PKGS)`
+LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
+
+CFLAGS = -I. `pkg-config --cflags $(PKGS)`
+CFLAGS += -I$(TET_ROOT)/inc/tet3
+CFLAGS += -Wall
+
+all: $(TARGETS)
+
+$(TARGET): %: %.c
+ $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
+
+clean:
+ rm -f $(TARGETS)
+ rm -f tet_captured
+ rm -f *~
--- /dev/null
+#!/bin/sh
+
+TMPSTR=$0
+SCRIPT=${TMPSTR##*/}
+
+if [ $# -lt 3 ]; then
+ echo "Usage) $SCRIPT module_name winset_name api_name"
+ exit 1
+fi
+
+MODULE=$1
+WINSET=$2
+API=$3
+TEMPLATE=utc_MODULE_API_func.c.in
+TESTCASE=utc_${MODULE}_${API}_func
+
+sed -e '
+ s^@API@^'"$API"'^g
+ s^@MODULE@^'"$MODULE"'^g
+ ' $TEMPLATE > $TESTCASE.c
+
+if [ ! -e "$TESTCASE.c" ]; then
+ echo "Failed"
+ exit 1
+fi
+
+echo "/elm_ts/$WINSET/$TESTCASE" >> tslist
+
+echo "Testcase file is $TESTCASE.c"
+echo "$TESTCASE is added to tslist"
+echo "Done"
+echo "please put \"$TESTCASE\" as Target in Makefile"
--- /dev/null
+make: `utc_UIFW_elm_nocontents_label_set_func' is up to date.
--- /dev/null
+/elm_ts/nocontents/utc_UIFW_elm_nocontents_add_func
+/elm_ts/nocontents/utc_UIFW_elm_nocontents_custom_get_func
+/elm_ts/nocontents/utc_UIFW_elm_nocontents_custom_set_func
+/elm_ts/nocontents/utc_UIFW_elm_nocontents_label_get_func
+/elm_ts/nocontents/utc_UIFW_elm_nocontents_label_set_func
+
+
--- /dev/null
+#include <tet_api.h>\r
+#include <Elementary.h>\r
+\r
+// Definitions\r
+// For checking the result of the positive test case.\r
+#define TET_CHECK_PASS(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err == (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+// For checking the result of the negative test case.\r
+#define TET_CHECK_FAIL(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err != (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+\r
+Evas_Object *main_win;\r
+\r
+static void startup(void);\r
+static void cleanup(void);\r
+\r
+void (*tet_startup)(void) = startup;\r
+void (*tet_cleanup)(void) = cleanup;\r
+\r
+static void utc_UIFW_elm_nocontents_add_func_01(void);\r
+static void utc_UIFW_elm_nocontents_add_func_02(void);\r
+\r
+enum {\r
+ POSITIVE_TC_no_contents = 0x01,\r
+ NEGATIVE_TC_no_contents,\r
+};\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+ { utc_UIFW_elm_nocontents_add_func_01, POSITIVE_TC_no_contents },\r
+ { utc_UIFW_elm_nocontents_add_func_02, NEGATIVE_TC_no_contents },\r
+};\r
+\r
+static void startup(void)\r
+{\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");\r
+ elm_init(0, NULL);\r
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);\r
+ evas_object_show(main_win); \r
+}\r
+\r
+static void cleanup(void)\r
+{\r
+ if ( NULL != main_win ) {\r
+ evas_object_del(main_win);\r
+ main_win = NULL;\r
+ }\r
+ elm_shutdown();\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");\r
+}\r
+\r
+/**\r
+ * @brief Positive test case of elm_nocontents_add()\r
+ */\r
+static void utc_UIFW_elm_nocontents_add_func_01(void)\r
+{\r
+ Evas_Object *no_contents = NULL;\r
+ no_contents = elm_nocontents_add(main_win);\r
+ evas_object_show(no_contents);\r
+ if (!no_contents) {\r
+ tet_infoline("elm_nocontents_add() failed in positive test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r
+\r
+/**\r
+ * @brief Negative test case of elm_nocontents_add()\r
+ */\r
+static void utc_UIFW_elm_nocontents_add_func_02(void)\r
+{\r
+ Evas_Object *no_contents = NULL;\r
+ no_contents = elm_nocontents_add(NULL);\r
+ evas_object_show(no_contents);\r
+ if (no_contents) {\r
+ tet_infoline("elm_nocontents_add() failed in negative test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r
--- /dev/null
+#include <tet_api.h>\r
+#include <Elementary.h>\r
+#define PKG_DATA_DIR "/usr/share/beat_winset_test/icon/"
+\r
+// Definitions\r
+// For checking the result of the positive test case.\r
+#define TET_CHECK_PASS(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err == (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+// For checking the result of the negative test case.\r
+#define TET_CHECK_FAIL(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err != (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+\r
+Evas_Object *main_win;\r
+\r
+static void startup(void);\r
+static void cleanup(void);\r
+\r
+void (*tet_startup)(void) = startup;\r
+void (*tet_cleanup)(void) = cleanup;\r
+\r
+static void utc_UIFW_elm_nocontents_custom_get_func_01(void);\r
+static void utc_UIFW_elm_nocontents_custom_get_func_02(void);\r
+\r
+enum {\r
+ POSITIVE_TC_no_contents = 0x01,\r
+ NEGATIVE_TC_no_contents,\r
+};\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+ { utc_UIFW_elm_nocontents_custom_get_func_01, POSITIVE_TC_no_contents },\r
+ { utc_UIFW_elm_nocontents_custom_get_func_02, NEGATIVE_TC_no_contents },\r
+};\r
+\r
+static void startup(void)\r
+{\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");\r
+ elm_init(0, NULL);\r
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);\r
+ evas_object_show(main_win); \r
+}\r
+\r
+static void cleanup(void)\r
+{\r
+ if ( NULL != main_win ) {\r
+ evas_object_del(main_win);\r
+ main_win = NULL;\r
+ }\r
+ elm_shutdown();\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");\r
+}\r
+\r
+/**\r
+ * @brief Positive test case of elm_nocontents_custom_get()\r
+ */\r
+static void utc_UIFW_elm_nocontents_custom_get_func_01(void)\r
+{\r
+ Evas_Object *no_contents = NULL;
+ Evas_Object *custom_area,*btn , *icon;
+ Evas_Object *custom;
+ char buf[255] = {0,};\r
+ no_contents = elm_nocontents_add(main_win);\r
+ evas_object_show(no_contents);
+ custom_area = elm_layout_add (main_win);
+ elm_layout_file_set (custom_area, NULL, "winset-test/nocontents/search_google");
+ elm_nocontents_custom_set(no_contents,custom_area);
+ btn = elm_button_add (main_win);
+ icon = elm_icon_add (main_win);
+ snprintf (buf, sizeof(buf), "%s/30_SmartSearch_google_icon.png", PKG_DATA_DIR);
+ elm_icon_file_set (icon, buf, NULL);
+ elm_icon_scale_set (icon, 1, 1);
+ elm_button_icon_set (btn, icon);
+ elm_layout_content_set (custom_area, "buttons", btn);
+ custom = elm_nocontents_custom_get(no_contents);\r
+ if (!custom) {\r
+ tet_infoline("elm_nocontents_custom_get() failed in positive test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r
+\r
+/**\r
+ * @brief Negative test case of elm_nocontents_custom_get()\r
+ */\r
+static void utc_UIFW_elm_nocontents_custom_get_func_02(void)\r
+{\r
+ Evas_Object *no_contents = NULL;
+ Evas_Object *custom_area,*btn , *icon;
+ Evas_Object *custom;
+ char buf[255] = {0,};\r
+ no_contents = elm_nocontents_add(main_win);\r
+ evas_object_show(no_contents);
+ custom_area = elm_layout_add (main_win);
+ elm_layout_file_set (custom_area, NULL, "winset-test/nocontents/search_google");
+ elm_nocontents_custom_set(no_contents,custom_area);
+ btn = elm_button_add (main_win);
+ icon = elm_icon_add (main_win);
+ snprintf (buf, sizeof(buf), "%s/30_SmartSearch_google_icon.png", PKG_DATA_DIR);
+ elm_icon_file_set (icon, buf, NULL);
+ elm_icon_scale_set (icon, 1, 1);
+ elm_button_icon_set (btn, icon);
+ elm_layout_content_set (custom_area, "buttons", btn);
+ custom = elm_nocontents_custom_get(NULL);\r
+ if (custom) {\r
+ tet_infoline("elm_nocontents_custom_get() failed in negative test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r
--- /dev/null
+#include <tet_api.h>\r
+#include <Elementary.h>\r
+#define PKG_DATA_DIR "/usr/share/beat_winset_test/icon/"
+\r
+// Definitions\r
+// For checking the result of the positive test case.\r
+#define TET_CHECK_PASS(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err == (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+// For checking the result of the negative test case.\r
+#define TET_CHECK_FAIL(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err != (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+\r
+Evas_Object *main_win;\r
+\r
+static void startup(void);\r
+static void cleanup(void);\r
+\r
+void (*tet_startup)(void) = startup;\r
+void (*tet_cleanup)(void) = cleanup;\r
+\r
+static void utc_UIFW_elm_nocontents_custom_set_func_01(void);\r
+static void utc_UIFW_elm_nocontents_custom_set_func_02(void);\r
+\r
+enum {\r
+ POSITIVE_TC_no_contents = 0x01,\r
+ NEGATIVE_TC_no_contents,\r
+};\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+ { utc_UIFW_elm_nocontents_custom_set_func_01, POSITIVE_TC_no_contents },\r
+ { utc_UIFW_elm_nocontents_custom_set_func_02, NEGATIVE_TC_no_contents },\r
+};\r
+\r
+static void startup(void)\r
+{\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");\r
+ elm_init(0, NULL);\r
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);\r
+ evas_object_show(main_win); \r
+}\r
+\r
+static void cleanup(void)\r
+{\r
+ if ( NULL != main_win ) {\r
+ evas_object_del(main_win);\r
+ main_win = NULL;\r
+ }\r
+ elm_shutdown();\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");\r
+}\r
+\r
+/**\r
+ * @brief Positive test case of elm_nocontents_custom_set()\r
+ */\r
+static void utc_UIFW_elm_nocontents_custom_set_func_01(void)\r
+{\r
+ Evas_Object *no_contents = NULL;
+ Evas_Object *custom_area,*btn , *icon;
+ Evas_Object *custom;
+ char buf[255] = {0,};\r
+ no_contents = elm_nocontents_add(main_win);\r
+ evas_object_show(no_contents);
+ custom_area = elm_layout_add (main_win);
+ elm_layout_file_set (custom_area, NULL, "winset-test/nocontents/search_google");
+ elm_nocontents_custom_set(no_contents,custom_area);
+ btn = elm_button_add (main_win);
+ icon = elm_icon_add (main_win);
+ snprintf (buf, sizeof(buf), "%s/30_SmartSearch_google_icon.png", PKG_DATA_DIR);
+ elm_icon_file_set (icon, buf, NULL);
+ elm_icon_scale_set (icon, 1, 1);
+ elm_button_icon_set (btn, icon);
+ elm_layout_content_set (custom_area, "buttons", btn);
+ custom = elm_nocontents_custom_get(no_contents);\r
+ if (!custom) {\r
+ tet_infoline("elm_nocontents_custom_set() failed in positive test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r
+\r
+/**\r
+ * @brief Negative test case of elm_nocontents_custom_set()\r
+ */\r
+static void utc_UIFW_elm_nocontents_custom_set_func_02(void)\r
+{\r
+ Evas_Object *no_contents = NULL;
+ Evas_Object *custom_area,*btn , *icon;
+ Evas_Object *custom;
+ char buf[255] = {0,};\r
+ no_contents = elm_nocontents_add(main_win);\r
+ evas_object_show(no_contents);
+ custom_area = elm_layout_add (main_win);
+ elm_layout_file_set (custom_area, NULL, "winset-test/nocontents/search_google");
+ elm_nocontents_custom_set(NULL,custom_area);
+ btn = elm_button_add (main_win);
+ icon = elm_icon_add (main_win);
+ snprintf (buf, sizeof(buf), "%s/30_SmartSearch_google_icon.png", PKG_DATA_DIR);
+ elm_icon_file_set (icon, buf, NULL);
+ elm_icon_scale_set (icon, 1, 1);
+ elm_button_icon_set (btn, icon);
+ elm_layout_content_set (custom_area, "buttons", btn);
+ custom = elm_nocontents_custom_get(no_contents);\r
+ if (custom) {\r
+ tet_infoline("elm_nocontents_custom_set() failed in negative test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r
--- /dev/null
+#include <tet_api.h>\r
+#include <Elementary.h>\r
+\r
+// Definitions\r
+// For checking the result of the positive test case.\r
+#define TET_CHECK_PASS(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err == (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+// For checking the result of the negative test case.\r
+#define TET_CHECK_FAIL(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err != (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+\r
+Evas_Object *main_win;\r
+\r
+static void startup(void);\r
+static void cleanup(void);\r
+\r
+void (*tet_startup)(void) = startup;\r
+void (*tet_cleanup)(void) = cleanup;\r
+\r
+static void utc_UIFW_elm_nocontents_label_get_func_01(void);\r
+static void utc_UIFW_elm_nocontents_label_get_func_02(void);\r
+\r
+enum {\r
+ POSITIVE_TC_nocont = 0x01,\r
+ NEGATIVE_TC_nocont,\r
+};\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+ { utc_UIFW_elm_nocontents_label_get_func_01, POSITIVE_TC_nocont },\r
+ { utc_UIFW_elm_nocontents_label_get_func_02, NEGATIVE_TC_nocont },\r
+};\r
+\r
+static void startup(void)\r
+{\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");\r
+ elm_init(0, NULL);\r
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);\r
+ evas_object_show(main_win); \r
+}\r
+\r
+static void cleanup(void)\r
+{\r
+ if ( NULL != main_win ) {\r
+ evas_object_del(main_win);\r
+ main_win = NULL;\r
+ }\r
+ elm_shutdown();\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");\r
+}\r
+\r
+/**\r
+ * @brief Positive test case of elm_nocontents_label_get()\r
+ */\r
+static void utc_UIFW_elm_nocontents_label_get_func_01(void)\r
+{\r
+ Evas_Object *nocont = NULL;
+ const char *ch = "no cotents";
+ const char *label_nocont;\r
+ nocont = elm_nocontents_add(main_win);\r
+ evas_object_show(nocont);
+ elm_nocontents_label_set(nocont, ch);
+ label_nocont = elm_nocontents_label_get(nocont);\r
+ if (!label_nocont) {\r
+ tet_infoline("elm_nocontents_label_get() failed in positive test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r
+\r
+/**\r
+ * @brief Negative test case of elm_nocontents_label_get()\r
+ */\r
+static void utc_UIFW_elm_nocontents_label_get_func_02(void)\r
+{\r
+ Evas_Object *nocont = NULL;
+ const char *ch = "no cotents";
+ const char *label_nocont = NULL;\r
+ nocont = elm_nocontents_add(main_win);\r
+ evas_object_show(nocont);
+ elm_nocontents_label_set(nocont, ch);
+ label_nocont = elm_nocontents_label_get(NULL);\r
+ if (label_nocont) {\r
+ tet_infoline("elm_nocontents_label_get() failed in positive test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r
--- /dev/null
+#include <tet_api.h>\r
+#include <Elementary.h>\r
+\r
+// Definitions\r
+// For checking the result of the positive test case.\r
+#define TET_CHECK_PASS(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err == (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+// For checking the result of the negative test case.\r
+#define TET_CHECK_FAIL(x1, y...) \\r
+{ \\r
+ Evas_Object *err = y; \\r
+ if (err != (x1)) \\r
+ { \\r
+ tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+ tet_result(TET_FAIL); \\r
+ return; \\r
+ } \\r
+}\r
+\r
+\r
+Evas_Object *main_win;\r
+\r
+static void startup(void);\r
+static void cleanup(void);\r
+\r
+void (*tet_startup)(void) = startup;\r
+void (*tet_cleanup)(void) = cleanup;\r
+\r
+static void utc_UIFW_elm_nocontents_label_set_func_01(void);\r
+static void utc_UIFW_elm_nocontents_label_set_func_02(void);\r
+\r
+enum {\r
+ POSITIVE_TC_nocont = 0x01,\r
+ NEGATIVE_TC_nocont,\r
+};\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+ { utc_UIFW_elm_nocontents_label_set_func_01, POSITIVE_TC_nocont },\r
+ { utc_UIFW_elm_nocontents_label_set_func_02, NEGATIVE_TC_nocont },\r
+};\r
+\r
+static void startup(void)\r
+{\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");\r
+ elm_init(0, NULL);\r
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);\r
+ evas_object_show(main_win); \r
+}\r
+\r
+static void cleanup(void)\r
+{\r
+ if ( NULL != main_win ) {\r
+ evas_object_del(main_win);\r
+ main_win = NULL;\r
+ }\r
+ elm_shutdown();\r
+ tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");\r
+}\r
+\r
+/**\r
+ * @brief Positive test case of elm_nocontents_label_set()\r
+ */\r
+static void utc_UIFW_elm_nocontents_label_set_func_01(void)\r
+{\r
+ Evas_Object *nocont = NULL;
+ const char *ch = "no cotents";
+ const char *char_nocont;\r
+ nocont = elm_nocontents_add(main_win);\r
+ evas_object_show(nocont);
+ elm_nocontents_label_set(nocont, ch);
+ char_nocont = elm_nocontents_label_get(nocont);\r
+ if (!char_nocont) {\r
+ tet_infoline("elm_nocontents_label_set() failed in positive test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r
+\r
+/**\r
+ * @brief Negative test case of elm_nocontents_label_set()\r
+ */\r
+static void utc_UIFW_elm_nocontents_label_set_func_02(void)\r
+{\r
+ Evas_Object *nocont = NULL;
+ const char *ch = "no cotents";
+ const char *char_nocont = NULL;\r
+ nocont = elm_nocontents_add(main_win);\r
+ evas_object_show(nocont);
+ elm_nocontents_label_set(NULL, ch);
+ char_nocont = elm_nocontents_label_get(nocont);\r
+ if (char_nocont) {\r
+ tet_infoline("elm_nocontents_label_set() failed in positive test case");\r
+ tet_result(TET_FAIL);\r
+ return;\r
+ }\r
+ tet_result(TET_PASS);\r
+}\r