summaryrefslogtreecommitdiff
path: root/src/tests/eo/function_overrides
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-01 18:06:28 +0000
committerTom Hacohen <tom@stosb.com>2016-03-03 09:58:08 +0000
commitf21ade6123b9053fca8d1632644c48525a99d6e0 (patch)
treec5eb0445f471d21365a7a5a7b0ec7d279c11b398 /src/tests/eo/function_overrides
parent3faf3f3fc68a839f06b311c35ba020cb25e7c9c4 (diff)
Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL automatically. This commit is *only* the automatic conversion, so it can be easily reverted and re-run.
Diffstat (limited to 'src/tests/eo/function_overrides')
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit2.c12
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit3.c2
-rw-r--r--src/tests/eo/function_overrides/function_overrides_main.c27
-rw-r--r--src/tests/eo/function_overrides/function_overrides_simple.c4
4 files changed, 23 insertions, 22 deletions
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit2.c b/src/tests/eo/function_overrides/function_overrides_inherit2.c
index e250ee3d2c..b4602aac00 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit2.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit2.c
@@ -15,11 +15,11 @@ static void
15_a_set(Eo *obj, void *class_data EINA_UNUSED, int a) 15_a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
16{ 16{
17 printf("%s %d\n", eo_class_name_get(MY_CLASS), a); 17 printf("%s %d\n", eo_class_name_get(MY_CLASS), a);
18 eo_do(obj, simple_a_print()); 18 simple_a_print(obj);
19 eo_do_super(obj, MY_CLASS, simple_a_set(a + 1)); 19 simple_a_set(eo_super(obj, MY_CLASS), a + 1);
20 20
21 Eina_Bool called = EINA_FALSE; 21 Eina_Bool called = EINA_FALSE;
22 eo_do_super(obj, MY_CLASS, called = simple_a_print()); 22 called = simple_a_print(eo_super(obj, MY_CLASS));
23 fail_if(!called); 23 fail_if(!called);
24} 24}
25 25
@@ -28,7 +28,7 @@ _print(Eo *obj, void *class_data EINA_UNUSED)
28{ 28{
29 Eina_Bool called = EINA_FALSE; 29 Eina_Bool called = EINA_FALSE;
30 printf("Hey\n"); 30 printf("Hey\n");
31 eo_do_super(obj, MY_CLASS, called = inherit2_print()); 31 called = inherit2_print(eo_super(obj, MY_CLASS));
32 fail_if(called); 32 fail_if(called);
33 33
34 return EINA_TRUE; 34 return EINA_TRUE;
@@ -47,10 +47,10 @@ _class_print(Eo_Class *klass, void *data EINA_UNUSED)
47{ 47{
48 Eina_Bool called = EINA_FALSE; 48 Eina_Bool called = EINA_FALSE;
49 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS)); 49 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS));
50 eo_do_super(klass, MY_CLASS, called = simple_class_print()); 50 called = simple_class_print(eo_super(klass, MY_CLASS));
51 fail_if(!called); 51 fail_if(!called);
52 52
53 eo_do_super(klass, MY_CLASS, called = simple_class_print2()); 53 called = simple_class_print2(eo_super(klass, MY_CLASS));
54 fail_if(!called); 54 fail_if(!called);
55 55
56 return EINA_TRUE; 56 return EINA_TRUE;
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit3.c b/src/tests/eo/function_overrides/function_overrides_inherit3.c
index 2f96d590ee..4c23281587 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit3.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit3.c
@@ -13,7 +13,7 @@ static void
13_a_set(Eo *obj, void *class_data EINA_UNUSED, int a) 13_a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
14{ 14{
15 printf("%s %d\n", eo_class_name_get(MY_CLASS), a); 15 printf("%s %d\n", eo_class_name_get(MY_CLASS), a);
16 eo_do_super(obj, MY_CLASS, simple_a_set(a + 1)); 16 simple_a_set(eo_super(obj, MY_CLASS), a + 1);
17} 17}
18 18
19static Eo_Op_Description op_descs[] = { 19static Eo_Op_Description op_descs[] = {
diff --git a/src/tests/eo/function_overrides/function_overrides_main.c b/src/tests/eo/function_overrides/function_overrides_main.c
index 920595c077..b2aa840897 100644
--- a/src/tests/eo/function_overrides/function_overrides_main.c
+++ b/src/tests/eo/function_overrides/function_overrides_main.c
@@ -20,7 +20,7 @@ main(int argc, char *argv[])
20 Eina_Bool called = EINA_FALSE; 20 Eina_Bool called = EINA_FALSE;
21 Eo *obj = eo_add(INHERIT2_CLASS, NULL); 21 Eo *obj = eo_add(INHERIT2_CLASS, NULL);
22 22
23 eo_do(obj, simple_a_set(1)); 23 simple_a_set(obj, 1);
24 Simple_Public_Data *pd = eo_data_scope_get(obj, SIMPLE_CLASS); 24 Simple_Public_Data *pd = eo_data_scope_get(obj, SIMPLE_CLASS);
25 fail_if(pd->a != 2); 25 fail_if(pd->a != 2);
26 26
@@ -28,47 +28,48 @@ main(int argc, char *argv[])
28 28
29 obj = eo_add(INHERIT3_CLASS, NULL); 29 obj = eo_add(INHERIT3_CLASS, NULL);
30 30
31 eo_do(obj, simple_a_set(1)); 31 simple_a_set(obj, 1);
32 pd = eo_data_scope_get(obj, SIMPLE_CLASS); 32 pd = eo_data_scope_get(obj, SIMPLE_CLASS);
33 fail_if(pd->a != 3); 33 fail_if(pd->a != 3);
34 34
35 eo_unref(obj); 35 eo_unref(obj);
36 36
37 obj = eo_add(INHERIT2_CLASS, NULL); 37 obj = eo_add(INHERIT2_CLASS, NULL);
38 eo_do(obj, called = inherit2_print()); 38 called = inherit2_print(obj);
39 fail_if(!called); 39 fail_if(!called);
40 eo_do(obj, called = inherit2_print(), called = inherit2_print()); 40 called = inherit2_print(obj);
41 called = inherit2_print(obj);
41 fail_if(!called); 42 fail_if(!called);
42 eo_unref(obj); 43 eo_unref(obj);
43 44
44 obj = eo_add(SIMPLE_CLASS, NULL); 45 obj = eo_add(SIMPLE_CLASS, NULL);
45 eo_do(obj, called = inherit2_print()); 46 called = inherit2_print(obj);
46 fail_if(called); 47 fail_if(called);
47 48
48#ifdef EO_DEBUG 49#ifdef EO_DEBUG
49 eo_do(obj, called = simple_class_print()); 50 called = simple_class_print(obj);
50 fail_if(called); 51 fail_if(called);
51#endif 52#endif
52 53
53 eo_do(SIMPLE_CLASS, called = simple_class_print()); 54 called = simple_class_print(SIMPLE_CLASS);
54 fail_if(!called); 55 fail_if(!called);
55 56
56 eo_do(INHERIT_CLASS, called = simple_class_print()); 57 called = simple_class_print(INHERIT_CLASS);
57 fail_if(!called); 58 fail_if(!called);
58 59
59 eo_do(INHERIT2_CLASS, called = simple_class_print()); 60 called = simple_class_print(INHERIT2_CLASS);
60 fail_if(!called); 61 fail_if(!called);
61 62
62 eo_do(INHERIT3_CLASS, called = simple_class_print()); 63 called = simple_class_print(INHERIT3_CLASS);
63 fail_if(!called); 64 fail_if(!called);
64 65
65#ifdef EO_DEBUG 66#ifdef EO_DEBUG
66 eo_do(SIMPLE_CLASS, called = simple_a_print()); 67 called = simple_a_print(SIMPLE_CLASS);
67 fail_if(called); 68 fail_if(called);
68#endif 69#endif
69 70
70 eo_do_super(obj, SIMPLE_CLASS, eo_constructor()); 71 eo_constructor(eo_super(obj, SIMPLE_CLASS));
71 eo_do_super(obj, SIMPLE_CLASS, eo_destructor()); 72 eo_destructor(eo_super(obj, SIMPLE_CLASS));
72 73
73 eo_unref(obj); 74 eo_unref(obj);
74 75
diff --git a/src/tests/eo/function_overrides/function_overrides_simple.c b/src/tests/eo/function_overrides/function_overrides_simple.c
index dc5f0dd4a1..57942f7efe 100644
--- a/src/tests/eo/function_overrides/function_overrides_simple.c
+++ b/src/tests/eo/function_overrides/function_overrides_simple.c
@@ -34,10 +34,10 @@ _class_print(Eo_Class *klass, void *class_data EINA_UNUSED)
34{ 34{
35 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS)); 35 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS));
36 Eina_Bool called = EINA_FALSE; 36 Eina_Bool called = EINA_FALSE;
37 eo_do_super(klass, MY_CLASS, called = simple_class_print()); 37 called = simple_class_print(eo_super(klass, MY_CLASS));
38 fail_if(called); 38 fail_if(called);
39 39
40 eo_do_super(klass, MY_CLASS, called = simple_class_print2()); 40 called = simple_class_print2(eo_super(klass, MY_CLASS));
41 fail_if(called); 41 fail_if(called);
42 42
43 return EINA_TRUE; 43 return EINA_TRUE;