summaryrefslogtreecommitdiff
path: root/src/tests/edje/edje_test_edje.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/edje/edje_test_edje.c')
-rw-r--r--src/tests/edje/edje_test_edje.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index 536de1db44..407ff9af30 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -327,6 +327,41 @@ START_TEST(edje_test_size_class)
327} 327}
328END_TEST 328END_TEST
329 329
330START_TEST(edje_test_color_class)
331{
332 Evas *evas = EDJE_TEST_INIT_EVAS();
333
334 Eina_File *f;
335 Eina_Iterator *it;
336 Edje_Color_Class *itcc, *cc = NULL;
337 char *filename;
338
339 filename = realpath(test_layout_get("test_color_class.edj"), NULL);
340 fail_if(!filename);
341
342 f = eina_file_open(filename, EINA_FALSE);
343 fail_if(!f);
344
345 it = edje_mmap_color_class_iterator_new(f);
346 fail_if(!it);
347 EINA_ITERATOR_FOREACH(it, itcc)
348 {
349 if (!strcmp(itcc->name, "test_color_class"))
350 {
351 cc = itcc;
352 break;
353 }
354 }
355 fail_if((!cc) || (cc->r != 100) || (cc->g != 100) || (cc->b != 100) || (cc->a != 100));
356
357 eina_iterator_free(it);
358 eina_file_close(f);
359 free(filename);
360
361 EDJE_TEST_FREE_EVAS();
362}
363END_TEST
364
330void edje_test_edje(TCase *tc) 365void edje_test_edje(TCase *tc)
331{ 366{
332 tcase_add_test(tc, edje_test_edje_init); 367 tcase_add_test(tc, edje_test_edje_init);
@@ -339,4 +374,5 @@ void edje_test_edje(TCase *tc)
339 tcase_add_test(tc, edje_test_filters); 374 tcase_add_test(tc, edje_test_filters);
340 tcase_add_test(tc, edje_test_snapshot); 375 tcase_add_test(tc, edje_test_snapshot);
341 tcase_add_test(tc, edje_test_size_class); 376 tcase_add_test(tc, edje_test_size_class);
377 tcase_add_test(tc, edje_test_color_class);
342} 378}