forked from enlightenment/efl
edje: add test for omitting "name" keyword in color_classes.color_class block
Summary: This test checks whether omitting "name" keyword in color_classes.color_class block in EDC work normally. Depends on D3598 Test Plan: make check Reviewers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3615 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
02d724e716
commit
a416f73790
|
@ -256,6 +256,7 @@ tests/edje/data/test_masking.edc \
|
||||||
tests/edje/data/test_filters.edc \
|
tests/edje/data/test_filters.edc \
|
||||||
tests/edje/data/test_snapshot.edc \
|
tests/edje/data/test_snapshot.edc \
|
||||||
tests/edje/data/test_size_class.edc \
|
tests/edje/data/test_size_class.edc \
|
||||||
|
tests/edje/data/test_color_class.edc \
|
||||||
tests/edje/data/filter.lua
|
tests/edje/data/filter.lua
|
||||||
|
|
||||||
|
|
||||||
|
@ -299,6 +300,7 @@ EDJE_DATA_FILES = tests/edje/data/test_layout.edc \
|
||||||
tests/edje/data/test_filters.edc \
|
tests/edje/data/test_filters.edc \
|
||||||
tests/edje/data/test_snapshot.edc \
|
tests/edje/data/test_snapshot.edc \
|
||||||
tests/edje/data/test_size_class.edc \
|
tests/edje/data/test_size_class.edc \
|
||||||
|
tests/edje/data/test_color_class.edc \
|
||||||
tests/edje/data/filter.lua
|
tests/edje/data/filter.lua
|
||||||
|
|
||||||
edjedatafilesdir = $(datadir)/edje/data
|
edjedatafilesdir = $(datadir)/edje/data
|
||||||
|
@ -308,7 +310,8 @@ edjedatafiles_DATA = tests/edje/data/test_layout.edj \
|
||||||
tests/edje/data/test_masking.edj \
|
tests/edje/data/test_masking.edj \
|
||||||
tests/edje/data/test_filters.edj \
|
tests/edje/data/test_filters.edj \
|
||||||
tests/edje/data/test_snapshot.edj \
|
tests/edje/data/test_snapshot.edj \
|
||||||
tests/edje/data/test_size_class.edj
|
tests/edje/data/test_size_class.edj \
|
||||||
|
tests/edje/data/test_color_class.edj
|
||||||
|
|
||||||
CLEANFILES += tests/edje/data/test_layout.edj \
|
CLEANFILES += tests/edje/data/test_layout.edj \
|
||||||
tests/edje/data/complex_layout.edj \
|
tests/edje/data/complex_layout.edj \
|
||||||
|
@ -316,7 +319,8 @@ CLEANFILES += tests/edje/data/test_layout.edj \
|
||||||
tests/edje/data/test_masking.edj \
|
tests/edje/data/test_masking.edj \
|
||||||
tests/edje/data/test_filters.edj \
|
tests/edje/data/test_filters.edj \
|
||||||
tests/edje/data/test_snapshot.edj \
|
tests/edje/data/test_snapshot.edj \
|
||||||
tests/edje/data/test_size_class.edj
|
tests/edje/data/test_size_class.edj \
|
||||||
|
tests/edje/data/test_color_class.edj
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
collections {
|
||||||
|
color_classes {
|
||||||
|
color_class { "test_color_class";
|
||||||
|
color: 100 100 100 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
group { name: "test_group";
|
||||||
|
parts {
|
||||||
|
rect { "rect";
|
||||||
|
desc { "default";
|
||||||
|
color_class: "test_color_class";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -327,6 +327,41 @@ START_TEST(edje_test_size_class)
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
START_TEST(edje_test_color_class)
|
||||||
|
{
|
||||||
|
Evas *evas = EDJE_TEST_INIT_EVAS();
|
||||||
|
|
||||||
|
Eina_File *f;
|
||||||
|
Eina_Iterator *it;
|
||||||
|
Edje_Color_Class *itcc, *cc = NULL;
|
||||||
|
char *filename;
|
||||||
|
|
||||||
|
filename = realpath(test_layout_get("test_color_class.edj"), NULL);
|
||||||
|
fail_if(!filename);
|
||||||
|
|
||||||
|
f = eina_file_open(filename, EINA_FALSE);
|
||||||
|
fail_if(!f);
|
||||||
|
|
||||||
|
it = edje_mmap_color_class_iterator_new(f);
|
||||||
|
fail_if(!it);
|
||||||
|
EINA_ITERATOR_FOREACH(it, itcc)
|
||||||
|
{
|
||||||
|
if (!strcmp(itcc->name, "test_color_class"))
|
||||||
|
{
|
||||||
|
cc = itcc;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fail_if((!cc) || (cc->r != 100) || (cc->g != 100) || (cc->b != 100) || (cc->a != 100));
|
||||||
|
|
||||||
|
eina_iterator_free(it);
|
||||||
|
eina_file_close(f);
|
||||||
|
free(filename);
|
||||||
|
|
||||||
|
EDJE_TEST_FREE_EVAS();
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
void edje_test_edje(TCase *tc)
|
void edje_test_edje(TCase *tc)
|
||||||
{
|
{
|
||||||
tcase_add_test(tc, edje_test_edje_init);
|
tcase_add_test(tc, edje_test_edje_init);
|
||||||
|
@ -339,4 +374,5 @@ void edje_test_edje(TCase *tc)
|
||||||
tcase_add_test(tc, edje_test_filters);
|
tcase_add_test(tc, edje_test_filters);
|
||||||
tcase_add_test(tc, edje_test_snapshot);
|
tcase_add_test(tc, edje_test_snapshot);
|
||||||
tcase_add_test(tc, edje_test_size_class);
|
tcase_add_test(tc, edje_test_size_class);
|
||||||
|
tcase_add_test(tc, edje_test_color_class);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue