summaryrefslogtreecommitdiff
path: root/src/tests/eo/composite_objects/composite_objects_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eo/composite_objects/composite_objects_main.c')
-rw-r--r--src/tests/eo/composite_objects/composite_objects_main.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/tests/eo/composite_objects/composite_objects_main.c b/src/tests/eo/composite_objects/composite_objects_main.c
index 5ad11c6..9e90eb4 100644
--- a/src/tests/eo/composite_objects/composite_objects_main.c
+++ b/src/tests/eo/composite_objects/composite_objects_main.c
@@ -32,49 +32,49 @@ main(int argc, char *argv[])
32 eo_init(); 32 eo_init();
33 33
34 Eo *obj = eo_add(COMP_CLASS, NULL); 34 Eo *obj = eo_add(COMP_CLASS, NULL);
35 eo_do(obj, eo_event_callback_add(EV_A_CHANGED, _a_changed_cb, NULL)); 35 eo_event_callback_add(obj, EV_A_CHANGED, _a_changed_cb, NULL);
36 36
37 fail_if(!eo_isa(obj, COMP_CLASS)); 37 fail_if(!eo_isa(obj, COMP_CLASS));
38 fail_if(!eo_isa(obj, SIMPLE_CLASS)); 38 fail_if(!eo_isa(obj, SIMPLE_CLASS));
39 39
40 int a = 0; 40 int a = 0;
41 cb_called = EINA_FALSE; 41 cb_called = EINA_FALSE;
42 eo_do(obj, simple_a_set(1)); 42 simple_a_set(obj, 1);
43 fail_if(!cb_called); 43 fail_if(!cb_called);
44 44
45 /* Test functions from all across the chain. */ 45 /* Test functions from all across the chain. */
46 cb_called = EINA_FALSE; 46 cb_called = EINA_FALSE;
47 eo_do(obj, simple_a_set1(1)); 47 simple_a_set1(obj, 1);
48 fail_if(!cb_called); 48 fail_if(!cb_called);
49 cb_called = EINA_FALSE; 49 cb_called = EINA_FALSE;
50 eo_do(obj, simple_a_set15(1)); 50 simple_a_set15(obj, 1);
51 fail_if(!cb_called); 51 fail_if(!cb_called);
52 cb_called = EINA_FALSE; 52 cb_called = EINA_FALSE;
53 eo_do(obj, simple_a_set32(1)); 53 simple_a_set32(obj, 1);
54 fail_if(!cb_called); 54 fail_if(!cb_called);
55 55
56 eo_do(obj, a = simple_a_get()); 56 a = simple_a_get(obj);
57 fail_if(a != 1); 57 fail_if(a != 1);
58 58
59 /* disable the callback forwarder, and fail if it's still called. */ 59 /* disable the callback forwarder, and fail if it's still called. */
60 Eo *simple = NULL; 60 Eo *simple = NULL;
61 eo_do(obj, simple = eo_key_data_get("simple-obj")); 61 simple = eo_key_data_get(obj, "simple-obj");
62 eo_ref(simple); 62 eo_ref(simple);
63 eo_do(simple, eo_event_callback_forwarder_del(EV_A_CHANGED, obj)); 63 eo_event_callback_forwarder_del(simple, EV_A_CHANGED, obj);
64 64
65 cb_called = EINA_FALSE; 65 cb_called = EINA_FALSE;
66 eo_do(obj, simple_a_set(2)); 66 simple_a_set(obj, 2);
67 fail_if(cb_called); 67 fail_if(cb_called);
68 68
69 fail_if(!eo_do_ret(simple, tmp,eo_composite_part_is())); 69 fail_if(!eo_composite_part_is(simple));
70 fail_if(!eo_do_ret(obj, tmp,eo_composite_detach(simple))); 70 fail_if(!eo_composite_detach(obj, simple));
71 fail_if(eo_do_ret(obj, tmp,eo_composite_detach(simple))); 71 fail_if(eo_composite_detach(obj, simple));
72 fail_if(eo_do_ret(simple, tmp,eo_composite_part_is())); 72 fail_if(eo_composite_part_is(simple));
73 fail_if(!eo_do_ret(obj, tmp,eo_composite_attach(simple))); 73 fail_if(!eo_composite_attach(obj, simple));
74 fail_if(!eo_do_ret(simple, tmp,eo_composite_part_is())); 74 fail_if(!eo_composite_part_is(simple));
75 fail_if(eo_do_ret(obj, tmp,eo_composite_attach(simple))); 75 fail_if(eo_composite_attach(obj, simple));
76 76
77 fail_if(eo_do_ret(simple, tmp,eo_composite_attach(obj))); 77 fail_if(eo_composite_attach(simple, obj));
78 78
79 eo_unref(simple); 79 eo_unref(simple);
80 eo_unref(obj); 80 eo_unref(obj);