summaryrefslogtreecommitdiff
path: root/src/tests/eo/constructors/constructors_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eo/constructors/constructors_main.c')
-rw-r--r--src/tests/eo/constructors/constructors_main.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/tests/eo/constructors/constructors_main.c b/src/tests/eo/constructors/constructors_main.c
index cab5e7f..5844e46 100644
--- a/src/tests/eo/constructors/constructors_main.c
+++ b/src/tests/eo/constructors/constructors_main.c
@@ -28,10 +28,13 @@ main(int argc, char *argv[])
28 28
29 fail_if(my_init_count != 2); 29 fail_if(my_init_count != 2);
30 30
31 eo_do(obj, simple_a_set(1), simple_b_set(2)); 31 simple_a_set(obj, 1);
32 simple_b_set(obj, 2);
32 33
33 int a = 0, b = 0; 34 int a = 0, b = 0;
34 eo_do(obj, a = simple_a_get(), b = simple_b_get(), mixin_add_and_print(5)); 35 a = simple_a_get(obj);
36 b = simple_b_get(obj);
37 mixin_add_and_print(obj, 5);
35 fail_if(a != 1); 38 fail_if(a != 1);
36 fail_if(b != 2); 39 fail_if(b != 2);
37 40
@@ -69,19 +72,18 @@ main(int argc, char *argv[])
69 obj = eo_add(SIMPLE_CLASS, NULL); 72 obj = eo_add(SIMPLE_CLASS, NULL);
70 fail_if(!obj); 73 fail_if(!obj);
71 fail_if(my_init_count != 2); 74 fail_if(my_init_count != 2);
72 eo_do(obj, a = simple_a_get()); 75 a = simple_a_get(obj);
73 fail_if(a != 0); 76 fail_if(a != 0);
74 77
75 my_init_count = 0; 78 my_init_count = 0;
76 obj = eo_add(SIMPLE_CLASS, NULL, simple_a_set(7)); 79 obj = eo_add(SIMPLE_CLASS, NULL, simple_a_set(eoid, 7));
77 fail_if(!obj); 80 fail_if(!obj);
78 fail_if(my_init_count != 2); 81 fail_if(my_init_count != 2);
79 eo_do(obj, a = simple_a_get();); 82 a = simple_a_get(obj);
80 fail_if(a != 7); 83 fail_if(a != 7);
81 84
82 my_init_count = 0; 85 my_init_count = 0;
83 obj = eo_add(SIMPLE_CLASS, NULL, simple_b_set(6), simple_a_set(-1), 86 obj = eo_add(SIMPLE_CLASS, NULL, simple_b_set(eoid, 6), simple_a_set(eoid, -1), b = simple_b_get(eoid));
84 b = simple_b_get());
85 fail_if(obj); 87 fail_if(obj);
86 fail_if(b != 6); 88 fail_if(b != 6);
87 fail_if(my_init_count != 0); 89 fail_if(my_init_count != 0);