summaryrefslogtreecommitdiff
path: root/src/tests/eo/mixin/mixin_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eo/mixin/mixin_main.c')
-rw-r--r--src/tests/eo/mixin/mixin_main.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/tests/eo/mixin/mixin_main.c b/src/tests/eo/mixin/mixin_main.c
index 6ab6af2..d3c1dbf 100644
--- a/src/tests/eo/mixin/mixin_main.c
+++ b/src/tests/eo/mixin/mixin_main.c
@@ -20,13 +20,17 @@ main(int argc, char *argv[])
20 20
21 Eo *obj = eo_add(SIMPLE_CLASS, NULL); 21 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
22 22
23 eo_do(obj, simple_a_set(1), simple_b_set(2)); 23 simple_a_set(obj, 1);
24 simple_b_set(obj, 2);
24 25
25 int a = 0, b = 0, sum = 0; 26 int a = 0, b = 0, sum = 0;
26 eo_do(obj, a = simple_a_get(), b = simple_b_get(), sum = mixin_ab_sum_get()); 27 a = simple_a_get(obj);
28 b = simple_b_get(obj);
29 sum = mixin_ab_sum_get(obj);
27 fail_if(sum != a + b + 2); /* 2 for the two mixins... */ 30 fail_if(sum != a + b + 2); /* 2 for the two mixins... */
28 31
29 eo_do(obj, sum = mixin_ab_sum_get(), sum = mixin_ab_sum_get()); 32 sum = mixin_ab_sum_get(obj);
33 sum = mixin_ab_sum_get(obj);
30 34
31 Mixin2_Public_Data *pd2 = eo_data_scope_get(obj, MIXIN2_CLASS); 35 Mixin2_Public_Data *pd2 = eo_data_scope_get(obj, MIXIN2_CLASS);
32 fail_if(pd2->count != 6); 36 fail_if(pd2->count != 6);
@@ -37,7 +41,8 @@ main(int argc, char *argv[])
37 eo_unref(obj); 41 eo_unref(obj);
38 42
39 obj = eo_add(INHERIT_CLASS, NULL); 43 obj = eo_add(INHERIT_CLASS, NULL);
40 eo_do(obj, simple_a_set(5), a = simple_a_get()); 44 simple_a_set(obj, 5);
45 a = simple_a_get(obj);
41 printf("%d\n", a); 46 printf("%d\n", a);
42 fail_if(a != 5); 47 fail_if(a != 5);
43 48