summaryrefslogtreecommitdiff
path: root/src/tests/eolian/eolian_parsing.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-17 22:14:52 +0900
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-17 22:23:01 +0900
commit8e487069c9700c6e8f9d81a93bf5a09feabdc6ed (patch)
tree1629263c4b39e026a99895415f7e01176ec06328 /src/tests/eolian/eolian_parsing.c
parentceac54b23b9db53c224e82d2bf79ccc6260c4149 (diff)
eolian: add api to access the requires field
Summary: This is needed in order to support checking the correct regular classes in efl#. ref T7240 Depends on D7673 Test Plan: run ninja test / make check Reviewers: q66, felipealmeida, segfaultxavi Reviewed By: felipealmeida Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7240 Differential Revision: https://phab.enlightenment.org/D7674
Diffstat (limited to '')
-rw-r--r--src/tests/eolian/eolian_parsing.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index d93906bc56..41c4790f81 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -1583,14 +1583,35 @@ EFL_START_TEST(eolian_mixins_require)
1583 //check that implements contains this one class 1583 //check that implements contains this one class
1584 { 1584 {
1585 Eolian_Implement *impl; 1585 Eolian_Implement *impl;
1586 Eina_Iterator *i = eolian_class_extensions_get (cl); 1586 Eina_Iterator *i = eolian_class_implements_get(cl);
1587 Eina_Array *tmp = eina_array_new(1);
1587 1588
1588 EINA_ITERATOR_FOREACH(i, impl) 1589 EINA_ITERATOR_FOREACH(i, impl)
1589 { 1590 {
1590 ck_assert_ptr_eq(eolian_implement_class_get(impl), base); 1591 if (eolian_implement_class_get(impl) != cl)
1592 {
1593 eina_array_push(tmp, eolian_implement_class_get(impl));
1594 ck_assert_ptr_eq(eolian_implement_class_get(impl), base);
1595 }
1591 } 1596 }
1597 ck_assert_int_eq(eina_array_count(tmp), 1);
1598 eina_array_free(tmp);
1592 eina_iterator_free(i); 1599 eina_iterator_free(i);
1593 } 1600 }
1601 //check that the mixins has the right require
1602 {
1603 Eina_Iterator *iter = eolian_class_requires_get(cl);
1604 Eina_Array *tmp = eina_array_new(1);
1605
1606 EINA_ITERATOR_FOREACH(iter, cl)
1607 {
1608 eina_array_push(tmp, cl);
1609 }
1610 ck_assert_int_eq(eina_array_count(tmp), 1);
1611 ck_assert_ptr_eq(eina_array_data_get(tmp, 0), base);
1612 eina_array_free(tmp);
1613 eina_iterator_free(iter);
1614 }
1594 eolian_state_free(eos); 1615 eolian_state_free(eos);
1595} 1616}
1596EFL_END_TEST 1617EFL_END_TEST