summaryrefslogtreecommitdiff
path: root/src/tests/eo/function_overrides
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-04-02 09:46:34 +0100
committerTom Hacohen <tom@stosb.com>2014-04-10 04:20:21 +0100
commitc32bb4fe958cca857f7f74171bc1be6b53c4fe99 (patch)
treea139f4ac8b0147bcb944afd08609e58e298d7377 /src/tests/eo/function_overrides
parent80faa56ed3399fb10dafa0a88831f52e6769a7d4 (diff)
Eo2: Updated naming Eo2->Eo.
Diffstat (limited to 'src/tests/eo/function_overrides')
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit.c4
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit2.c32
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit3.c12
-rw-r--r--src/tests/eo/function_overrides/function_overrides_main.c34
-rw-r--r--src/tests/eo/function_overrides/function_overrides_simple.c32
5 files changed, 57 insertions, 57 deletions
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit.c b/src/tests/eo/function_overrides/function_overrides_inherit.c
index 641c07c49e..3a767f9e1a 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit.c
@@ -9,10 +9,10 @@
9#define MY_CLASS INHERIT_CLASS 9#define MY_CLASS INHERIT_CLASS
10 10
11static const Eo_Class_Description class_desc = { 11static const Eo_Class_Description class_desc = {
12 EO2_VERSION, 12 EO_VERSION,
13 "Inherit", 13 "Inherit",
14 EO_CLASS_TYPE_REGULAR, 14 EO_CLASS_TYPE_REGULAR,
15 EO2_CLASS_DESCRIPTION_NOOPS(), 15 EO_CLASS_DESCRIPTION_NOOPS(),
16 NULL, 16 NULL,
17 0, 17 0,
18 NULL, 18 NULL,
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit2.c b/src/tests/eo/function_overrides/function_overrides_inherit2.c
index 6a2369a6fc..a892aaf96e 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 eo2_do(obj, simple_a_print()); 18 eo_do(obj, simple_a_print());
19 eo2_do_super(obj, MY_CLASS, simple_a_set(a + 1)); 19 eo_do_super(obj, MY_CLASS, simple_a_set(a + 1));
20 20
21 Eina_Bool called = EINA_FALSE; 21 Eina_Bool called = EINA_FALSE;
22 eo2_do_super(obj, MY_CLASS, called = simple_a_print()); 22 eo_do_super(obj, MY_CLASS, called = simple_a_print());
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 eo2_do_super(obj, MY_CLASS, called = inherit2_print()); 31 eo_do_super(obj, MY_CLASS, called = inherit2_print());
32 fail_if(called); 32 fail_if(called);
33 33
34 return EINA_TRUE; 34 return EINA_TRUE;
@@ -47,31 +47,31 @@ _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 eo2_do_super(klass, MY_CLASS, called = simple_class_print()); 50 eo_do_super(klass, MY_CLASS, called = simple_class_print());
51 fail_if(!called); 51 fail_if(!called);
52 52
53 eo2_do_super(klass, MY_CLASS, called = simple_class_print2()); 53 eo_do_super(klass, MY_CLASS, called = simple_class_print2());
54 fail_if(!called); 54 fail_if(!called);
55 55
56 return EINA_TRUE; 56 return EINA_TRUE;
57} 57}
58 58
59EAPI EO2_FUNC_BODY(inherit2_print, Eina_Bool, EINA_FALSE); 59EAPI EO_FUNC_BODY(inherit2_print, Eina_Bool, EINA_FALSE);
60EAPI EO2_FUNC_BODY(inherit2_print2, Eina_Bool, EINA_FALSE); 60EAPI EO_FUNC_BODY(inherit2_print2, Eina_Bool, EINA_FALSE);
61 61
62static Eo2_Op_Description op_descs[] = { 62static Eo_Op_Description op_descs[] = {
63 EO2_OP_FUNC(inherit2_print, _print, "Print hey"), 63 EO_OP_FUNC(inherit2_print, _print, "Print hey"),
64 EO2_OP_FUNC(inherit2_print2, _print2, "Print hey2"), 64 EO_OP_FUNC(inherit2_print2, _print2, "Print hey2"),
65 EO2_OP_CLASS_FUNC_OVERRIDE(simple_class_print, _class_print), 65 EO_OP_CLASS_FUNC_OVERRIDE(simple_class_print, _class_print),
66 EO2_OP_FUNC_OVERRIDE(simple_a_set, _a_set), 66 EO_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
67 EO2_OP_SENTINEL 67 EO_OP_SENTINEL
68}; 68};
69 69
70static const Eo_Class_Description class_desc = { 70static const Eo_Class_Description class_desc = {
71 EO2_VERSION, 71 EO_VERSION,
72 "Inherit2", 72 "Inherit2",
73 EO_CLASS_TYPE_REGULAR, 73 EO_CLASS_TYPE_REGULAR,
74 EO2_CLASS_DESCRIPTION_OPS(op_descs), 74 EO_CLASS_DESCRIPTION_OPS(op_descs),
75 NULL, 75 NULL,
76 0, 76 0,
77 NULL, 77 NULL,
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit3.c b/src/tests/eo/function_overrides/function_overrides_inherit3.c
index 68214b7b26..d8b6190098 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit3.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit3.c
@@ -13,19 +13,19 @@ 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 eo2_do_super(obj, MY_CLASS, simple_a_set(a + 1)); 16 eo_do_super(obj, MY_CLASS, simple_a_set(a + 1));
17} 17}
18 18
19static Eo2_Op_Description op_descs[] = { 19static Eo_Op_Description op_descs[] = {
20 EO2_OP_FUNC_OVERRIDE(simple_a_set, _a_set), 20 EO_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
21 EO2_OP_SENTINEL 21 EO_OP_SENTINEL
22}; 22};
23 23
24static const Eo_Class_Description class_desc = { 24static const Eo_Class_Description class_desc = {
25 EO2_VERSION, 25 EO_VERSION,
26 "Inherit3", 26 "Inherit3",
27 EO_CLASS_TYPE_REGULAR, 27 EO_CLASS_TYPE_REGULAR,
28 EO2_CLASS_DESCRIPTION_OPS(op_descs), 28 EO_CLASS_DESCRIPTION_OPS(op_descs),
29 NULL, 29 NULL,
30 0, 30 0,
31 NULL, 31 NULL,
diff --git a/src/tests/eo/function_overrides/function_overrides_main.c b/src/tests/eo/function_overrides/function_overrides_main.c
index 17aab2910d..920595c077 100644
--- a/src/tests/eo/function_overrides/function_overrides_main.c
+++ b/src/tests/eo/function_overrides/function_overrides_main.c
@@ -18,57 +18,57 @@ main(int argc, char *argv[])
18 eo_init(); 18 eo_init();
19 19
20 Eina_Bool called = EINA_FALSE; 20 Eina_Bool called = EINA_FALSE;
21 Eo *obj = eo2_add(INHERIT2_CLASS, NULL); 21 Eo *obj = eo_add(INHERIT2_CLASS, NULL);
22 22
23 eo2_do(obj, simple_a_set(1)); 23 eo_do(obj, simple_a_set(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
27 eo_unref(obj); 27 eo_unref(obj);
28 28
29 obj = eo2_add(INHERIT3_CLASS, NULL); 29 obj = eo_add(INHERIT3_CLASS, NULL);
30 30
31 eo2_do(obj, simple_a_set(1)); 31 eo_do(obj, simple_a_set(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 = eo2_add(INHERIT2_CLASS, NULL); 37 obj = eo_add(INHERIT2_CLASS, NULL);
38 eo2_do(obj, called = inherit2_print()); 38 eo_do(obj, called = inherit2_print());
39 fail_if(!called); 39 fail_if(!called);
40 eo2_do(obj, called = inherit2_print(), called = inherit2_print()); 40 eo_do(obj, called = inherit2_print(), called = inherit2_print());
41 fail_if(!called); 41 fail_if(!called);
42 eo_unref(obj); 42 eo_unref(obj);
43 43
44 obj = eo2_add(SIMPLE_CLASS, NULL); 44 obj = eo_add(SIMPLE_CLASS, NULL);
45 eo2_do(obj, called = inherit2_print()); 45 eo_do(obj, called = inherit2_print());
46 fail_if(called); 46 fail_if(called);
47 47
48#ifdef EO_DEBUG 48#ifdef EO_DEBUG
49 eo2_do(obj, called = simple_class_print()); 49 eo_do(obj, called = simple_class_print());
50 fail_if(called); 50 fail_if(called);
51#endif 51#endif
52 52
53 eo2_do(SIMPLE_CLASS, called = simple_class_print()); 53 eo_do(SIMPLE_CLASS, called = simple_class_print());
54 fail_if(!called); 54 fail_if(!called);
55 55
56 eo2_do(INHERIT_CLASS, called = simple_class_print()); 56 eo_do(INHERIT_CLASS, called = simple_class_print());
57 fail_if(!called); 57 fail_if(!called);
58 58
59 eo2_do(INHERIT2_CLASS, called = simple_class_print()); 59 eo_do(INHERIT2_CLASS, called = simple_class_print());
60 fail_if(!called); 60 fail_if(!called);
61 61
62 eo2_do(INHERIT3_CLASS, called = simple_class_print()); 62 eo_do(INHERIT3_CLASS, called = simple_class_print());
63 fail_if(!called); 63 fail_if(!called);
64 64
65#ifdef EO_DEBUG 65#ifdef EO_DEBUG
66 eo2_do(SIMPLE_CLASS, called = simple_a_print()); 66 eo_do(SIMPLE_CLASS, called = simple_a_print());
67 fail_if(called); 67 fail_if(called);
68#endif 68#endif
69 69
70 eo2_do_super(obj, SIMPLE_CLASS, eo2_constructor()); 70 eo_do_super(obj, SIMPLE_CLASS, eo_constructor());
71 eo2_do_super(obj, SIMPLE_CLASS, eo2_destructor()); 71 eo_do_super(obj, SIMPLE_CLASS, eo_destructor());
72 72
73 eo_unref(obj); 73 eo_unref(obj);
74 74
diff --git a/src/tests/eo/function_overrides/function_overrides_simple.c b/src/tests/eo/function_overrides/function_overrides_simple.c
index 1e2ef0e6f7..ce6590b143 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 eo2_do_super(klass, MY_CLASS, called = simple_class_print()); 37 eo_do_super(klass, MY_CLASS, called = simple_class_print());
38 fail_if(called); 38 fail_if(called);
39 39
40 eo2_do_super(klass, MY_CLASS, called = simple_class_print2()); 40 eo_do_super(klass, MY_CLASS, called = simple_class_print2());
41 fail_if(called); 41 fail_if(called);
42 42
43 return EINA_TRUE; 43 return EINA_TRUE;
@@ -51,29 +51,29 @@ _class_print2(Eo_Class *klass, void *class_data EINA_UNUSED)
51 return EINA_TRUE; 51 return EINA_TRUE;
52} 52}
53 53
54EAPI EO2_VOID_FUNC_BODYV(simple_a_set, EO2_FUNC_CALL(a), int a); 54EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
55EAPI EO2_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE); 55EAPI EO_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE);
56EAPI EO2_FUNC_BODY(simple_class_print, Eina_Bool, EINA_FALSE); 56EAPI EO_FUNC_BODY(simple_class_print, Eina_Bool, EINA_FALSE);
57EAPI EO2_FUNC_BODY(simple_class_print2, Eina_Bool, EINA_FALSE); 57EAPI EO_FUNC_BODY(simple_class_print2, Eina_Bool, EINA_FALSE);
58 58
59static Eo2_Op_Description op_descs[] = { 59static Eo_Op_Description op_descs[] = {
60 EO2_OP_FUNC(simple_a_set, _a_set, "Set property A"), 60 EO_OP_FUNC(simple_a_set, _a_set, "Set property A"),
61 EO2_OP_FUNC(simple_a_print, _a_print, "Print property A"), 61 EO_OP_FUNC(simple_a_print, _a_print, "Print property A"),
62 EO2_OP_FUNC(simple_class_print, _class_print, "Print class name."), 62 EO_OP_FUNC(simple_class_print, _class_print, "Print class name."),
63 EO2_OP_FUNC(simple_class_print2, _class_print2, "Print2 class name."), 63 EO_OP_FUNC(simple_class_print2, _class_print2, "Print2 class name."),
64 EO2_OP_SENTINEL 64 EO_OP_SENTINEL
65}; 65};
66 66
67static const Eo_Class_Description class_desc = { 67static const Eo_Class_Description class_desc = {
68 EO2_VERSION, 68 EO_VERSION,
69 "Simple", 69 "Simple",
70 EO_CLASS_TYPE_REGULAR, 70 EO_CLASS_TYPE_REGULAR,
71 EO2_CLASS_DESCRIPTION_OPS(op_descs), 71 EO_CLASS_DESCRIPTION_OPS(op_descs),
72 NULL, 72 NULL,
73 sizeof(Simple_Public_Data), 73 sizeof(Simple_Public_Data),
74 NULL, 74 NULL,
75 NULL 75 NULL
76}; 76};
77 77
78EO_DEFINE_CLASS(simple_class_get, &class_desc, EO2_BASE_CLASS, NULL); 78EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_BASE_CLASS, NULL);
79 79