summaryrefslogtreecommitdiff
path: root/src/tests/eo/suite/eo_test_class_simple.c
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-12-30 15:24:44 +0100
committerTom Hacohen <tom@stosb.com>2014-04-10 04:20:20 +0100
commitd497459f931ba829d8917c432661477f80b30011 (patch)
treec325d30efc940c86bd07157ab8630c1b5e2d5996 /src/tests/eo/suite/eo_test_class_simple.c
parentae536bdd84f497ffd9cdf7ec58fc11abe8445b6f (diff)
eo2: add tests for call stack grow and shrink
Diffstat (limited to 'src/tests/eo/suite/eo_test_class_simple.c')
-rw-r--r--src/tests/eo/suite/eo_test_class_simple.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c
index 8690dfc540..d6fc49d233 100644
--- a/src/tests/eo/suite/eo_test_class_simple.c
+++ b/src/tests/eo/suite/eo_test_class_simple.c
@@ -45,6 +45,22 @@ _class_hi_print(Eo_Class *klass, void *data EINA_UNUSED)
45 return EINA_TRUE; 45 return EINA_TRUE;
46} 46}
47 47
48EO2_VOID_FUNC_BODYV(simple_recursive, EO2_FUNC_CALL(n), int n);
49
50static void
51_recursive(Eo *obj, void *class_data EINA_UNUSED, int n)
52{
53 static int count = 0;
54
55 if (count < n)
56 {
57 count++;
58 eo2_do(obj, simple_recursive(n));
59 }
60 else
61 count = 0;
62}
63
48static void 64static void
49_dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, Eo_Dbg_Info *root) 65_dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, Eo_Dbg_Info *root)
50{ 66{
@@ -64,6 +80,7 @@ static Eo2_Op_Description op_descs[] = {
64 EO2_OP_FUNC(simple_a_get, _a_get, "Get property a"), 80 EO2_OP_FUNC(simple_a_get, _a_get, "Get property a"),
65 EO2_OP_FUNC(simple_a_print, _a_print, "Print property a"), 81 EO2_OP_FUNC(simple_a_print, _a_print, "Print property a"),
66 EO2_OP_CLASS_FUNC(simple_class_hi_print, _class_hi_print, "Print property a"), 82 EO2_OP_CLASS_FUNC(simple_class_hi_print, _class_hi_print, "Print property a"),
83 EO2_OP_FUNC(simple_recursive, _recursive, "Recursive function"),
67 EO2_OP_SENTINEL 84 EO2_OP_SENTINEL
68}; 85};
69 86