aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-30 19:00:55 +0900
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-31 16:16:26 +0900
commit81e1688fb6477dc10984b2189e4845bca6c44006 (patch)
tree9cf4e1c13930f9781bda59cab65cdab75bb10823
parentefl-mono: Create workaround for DotNet Core inability to Marshal bool and cha... (diff)
downloadefl-81e1688fb6477dc10984b2189e4845bca6c44006.tar.gz
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 5567f1ef33..f71da855f0 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -10,6 +10,13 @@ class TestEo
{
}
+ public static void return_null_object()
+ {
+ var testing = new Dummy.TestObject();
+ var o1 = testing.ReturnNullObject();
+ Test.Assert(o1 == null);
+ }
+
//
// Test cases:
//
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
return: Dummy.Test_Object;
}
+ return_null_object {
+ return: Dummy.Test_Object;
+ }
+
int_out {
params {
@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 986cd1fa53..e015010655 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -154,6 +154,11 @@ Efl_Object *_dummy_test_object_return_object(Eo *obj, EINA_UNUSED Dummy_Test_Obj
return obj;
}
+Efl_Object *_dummy_test_object_return_null_object(Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd)
+{
+ return NULL;
+}
+
void _dummy_test_object_int_out(EINA_UNUSED Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd, int x, int *y)
{
*y = -x;