aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-05 15:11:06 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-07-05 15:11:55 -0400
commit0f2a9e15cd940449ecb39954e278ab9e6a92c452 (patch)
tree58a9f2ccd30008a32775d131bdd2594baaedf26e
parenteo/base_class: explicitly refuse to set an object as its own parent (diff)
downloadefl-0f2a9e15cd940449ecb39954e278ab9e6a92c452.tar.gz
tests/eo: add explicit test case for setting an object as its own parent
Summary: Depends on https://phab.enlightenment.org/D6489 Reviewers: bu5hm4n, devilhorns Reviewed By: bu5hm4n Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6490
-rw-r--r--src/tests/eo/suite/eo_test_general.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index acc35501d4..603b14e836 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -629,6 +629,9 @@ EFL_START_TEST(efl_refs)
obj2 = efl_ref(efl_add(SIMPLE_CLASS, obj));
obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
+ efl_parent_set(obj, obj);
+ ck_assert_ptr_eq(efl_parent_get(obj), NULL);
+
efl_parent_set(obj2, obj3);
efl_parent_set(obj3, obj);
ck_assert_int_eq(efl_ref_count(obj2), 2);