}
END_TEST
-/* MULTI */
-
-static Eina_Bool
-_a_print(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED)
-{
- printf("Hey\n");
-
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_class_hi_print(Efl_Class *klass EINA_UNUSED, void *class_data EINA_UNUSED)
-{
- printf("Hi\n");
-
- return EINA_TRUE;
-}
-
-EFL_FUNC_BODY(multi_a_print, Eina_Bool, EINA_FALSE);
-EFL_FUNC_BODY_CONST(multi_class_hi_print, Eina_Bool, EINA_FALSE);
-
-static Eina_Bool
-_multi_class_initializer(Efl_Class *klass)
-{
- EFL_OPS_DEFINE(ops,
- EFL_OBJECT_OP_FUNC(multi_a_print, _a_print),
- EFL_OBJECT_OP_FUNC(multi_class_hi_print, _class_hi_print),
- );
-
- return efl_class_functions_set(klass, &ops, NULL);
-}
-
-START_TEST(eo_multiple_do)
-{
- efl_object_init();
-
- /* Usually should be const, not const only for the test... */
- static Efl_Class_Description class_desc = {
- EO_VERSION,
- "Inherit",
- EFL_CLASS_TYPE_REGULAR,
- 0,
- _multi_class_initializer,
- NULL,
- NULL
- };
-
- const Efl_Class *klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
- fail_if(!klass);
-
- Eo *obj = efl_add(klass, NULL);
- fail_if(!obj);
-
- Eina_Bool ca, cb, cc;
-
- ca = cb = cc = EINA_FALSE;
- ca = simple_a_print(obj);
- cb = multi_a_print(obj);
- cc = multi_a_print(obj);
- fail_if(!(ca && cb && cc));
-
- ca = cb = cc = EINA_FALSE;
- ca = simple_class_hi_print(klass);
- cb = multi_class_hi_print(klass);
- cc = multi_class_hi_print(klass);
- fail_if(!(ca && cb && cc));
-
- efl_unref(obj);
-
- efl_object_shutdown();
-}
-END_TEST
-
START_TEST(efl_add_do_and_custom)
{
Simple_Public_Data *pd = NULL;
tcase_add_test(tc, efl_weak_reference);
tcase_add_test(tc, eo_generic_data);
tcase_add_test(tc, eo_magic_checks);
- tcase_add_test(tc, eo_multiple_do);
tcase_add_test(tc, efl_add_do_and_custom);
tcase_add_test(tc, eo_pointers_indirection);
tcase_add_test(tc, efl_add_failures);