summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-30 19:00:55 +0900
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-02-20 11:54:21 -0300
commitcf7948014a4eaf6c870ec663fe5ca7fa0fbf4574 (patch)
tree3628f3747c941cc5fc558ee23119abb2f2e05065
parentaf23c51b009d773576986f77806aee5b7200faf7 (diff)
efl-mono: Add test for returning NULL for objects
-rw-r--r--src/tests/efl_mono/Eo.cs7
-rw-r--r--src/tests/efl_mono/dummy_test_object.eo4
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c5
3 files changed, 16 insertions, 0 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index ed1d65a779..af63831e3e 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -10,6 +10,13 @@ class TestEo
10 { 10 {
11 } 11 }
12 12
13 public static void return_null_object()
14 {
15 var testing = new Dummy.TestObject();
16 var o1 = testing.ReturnNullObject();
17 Test.Assert(o1 == null);
18 }
19
13 // 20 //
14 // Test cases: 21 // Test cases:
15 // 22 //
diff --git a/src/tests/efl_mono/dummy_test_object.eo b/src/tests/efl_mono/dummy_test_object.eo
index 2081f3f4e0..3fdd652fd1 100644
--- a/src/tests/efl_mono/dummy_test_object.eo
+++ b/src/tests/efl_mono/dummy_test_object.eo
@@ -102,6 +102,10 @@ class Dummy.Test_Object extends Efl.Object implements Efl.Part, Dummy.Test_Iface
102 return: Dummy.Test_Object; 102 return: Dummy.Test_Object;
103 } 103 }
104 104
105 return_null_object {
106 return: Dummy.Test_Object;
107 }
108
105 int_out { 109 int_out {
106 params { 110 params {
107 @in x: int; 111 @in x: int;
diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c
index 674d1f8f23..e0731b9a24 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -158,6 +158,11 @@ Efl_Object *_dummy_test_object_return_object(Eo *obj, EINA_UNUSED Dummy_Test_Obj
158 return obj; 158 return obj;
159} 159}
160 160
161Efl_Object *_dummy_test_object_return_null_object(Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd)
162{
163 return NULL;
164}
165
161void _dummy_test_object_int_out(EINA_UNUSED Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd, int x, int *y) 166void _dummy_test_object_int_out(EINA_UNUSED Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd, int x, int *y)
162{ 167{
163 *y = -x; 168 *y = -x;