tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e1c0928ea377bcb6886335a8d4eeb1b581f67a17

commit e1c0928ea377bcb6886335a8d4eeb1b581f67a17
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Oct 22 11:43:45 2014 +0100

    Eo id: Add regression tests to eo id sanity checks
    
    Relevant commit: 0b86334a858d9ba88a1642ec5671185292e75ce5
---
 src/tests/eo/suite/eo_test_general.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/tests/eo/suite/eo_test_general.c 
b/src/tests/eo/suite/eo_test_general.c
index 18b1a00..feef06a 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -8,6 +8,9 @@
 #include "eo_suite.h"
 #include "eo_test_class_simple.h"
 
+/* Loading this internal header for testing purposes. */
+#include "eo_ptr_indirection.h"
+
 START_TEST(eo_simple)
 {
    eo_init();
@@ -848,6 +851,13 @@ START_TEST(eo_pointers_indirection)
    fail_if(eo_isa(obj1, klass));
    eo_unref(obj2);
 
+   /* Check id sanity checks for "close enough" ids. */
+   obj1 = eo_add(klass, NULL);
+   fail_if(!obj1);
+   obj2 = (Eo *) (((Eo_Id) obj1) & ~MASK_OBJ_TAG);
+   fail_if(eo_class_get(obj2));
+   eo_unref(obj1);
+
 #define NB_OBJS 10000
    unsigned int obj_id;
    Eo **objs = calloc(NB_OBJS, sizeof(Eo *));

-- 


Reply via email to