aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-11-20 12:16:47 +0000
committerTom Hacohen <tom@stosb.com>2013-11-20 12:23:18 +0000
commit46a3f014659f3097d99cdbd8d170daab7fc8885b (patch)
treed2a9b6d736335b8e575e02a07c62063fc0252a35
parentEo: Check parent is valid in eo_parent_set. (diff)
downloadefl-46a3f014659f3097d99cdbd8d170daab7fc8885b.tar.gz
Eo tests: Added a parent_set parameter validity test.
-rw-r--r--src/tests/eo/suite/eo_test_general.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index e2dde96094..900ec58915 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -657,6 +657,7 @@ START_TEST(eo_magic_checks)
{
Eo *parent = NULL;
Eo *wref = NULL;
+ Eo *obj2 = NULL;
obj = eo_add((Eo_Class *) buf, NULL);
fail_if(obj);
@@ -715,6 +716,11 @@ START_TEST(eo_magic_checks)
eo_manual_free((Eo *) buf);
eo_destructed_is((Eo *) buf);
+ obj2 = NULL;
+ eo_do(obj, eo_parent_set((Eo *) buf));
+ eo_do(obj, eo_parent_get(&obj2));
+ fail_if(obj2 && (obj2 == (Eo *) buf));
+
eo_unref(obj);
if (!buf)