tasn pushed a commit to branch master.

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

commit ab6d7b44dfada31a2faa45455b00215959a0708e
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Sep 29 09:14:32 2015 +0100

    Eo: add a regression test for broken callback comparison.
    
    This bug was fixed in d889da6b12e6123073edb54d766c9af1fc6db822, but it was 
too
    late at night to start hacking on extracting a regression test and adding 
it to
    the suite, so adding it now.
    
    This test makes sure that we only fallback to string comparison with legacy
    events.
---
 src/lib/ecore_buffer/Ecore_Buffer_Queue.h | 4 ++--
 src/tests/eo/suite/eo_test_class_simple.c | 3 +++
 src/tests/eo/suite/eo_test_class_simple.h | 3 +++
 src/tests/eo/suite/eo_test_general.c      | 4 ++++
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_buffer/Ecore_Buffer_Queue.h 
b/src/lib/ecore_buffer/Ecore_Buffer_Queue.h
index 4bc79ae..81dad17 100644
--- a/src/lib/ecore_buffer/Ecore_Buffer_Queue.h
+++ b/src/lib/ecore_buffer/Ecore_Buffer_Queue.h
@@ -51,7 +51,7 @@ extern "C" {
  * @ingroup Ecore_Buffer_Queue_Group
  *
  * This group of functions is applied to an Ecore_Buffer_Provider object.
- * Ecore_Buffer_Provider provides Ecore_Buffer to Ecore_Buffer_Consumer(usually
+ * Ecore_Buffer_Provider provides Ecore_Buffer to Ecore_Buffer_Consumer(usally
  * different process or thread from Ecore_Buffer_Provider).
  * Ecore_Buffer_Provider should creates Ecore_Buffer as a provider.
  */
@@ -353,7 +353,7 @@ EAPI void                      
ecore_buffer_provider_free(Ecore_Buffer_Provider
  *
  * This function gives you drawable buffer and inform you the state of Queue.
  * Each return value of enumeration has meaning as below.
- * @li ECORE_BUFFER_RETURN_ERROR, means error occurred.
+ * @li ECORE_BUFFER_RETURN_ERROR, means error occured.
  * @li ECORE_BUFFER_RETURN_SUCCESS, means success to dequeue, therefore 
ret_buf is valid.
  * @li ECORE_BUFFER_RETURN_EMPTY, means queue is empty, not available slot in 
Queue.
  *  in other words, there is no free drawable buffer in Queue.
diff --git a/src/tests/eo/suite/eo_test_class_simple.c 
b/src/tests/eo/suite/eo_test_class_simple.c
index 8e75eed..cb4cb72 100644
--- a/src/tests/eo/suite/eo_test_class_simple.c
+++ b/src/tests/eo/suite/eo_test_class_simple.c
@@ -10,6 +10,9 @@
 EAPI const Eo_Event_Description _EV_A_CHANGED =
         EO_EVENT_DESCRIPTION("a,changed");
 
+EAPI const Eo_Event_Description _EV_A_CHANGED2 =
+        EO_EVENT_DESCRIPTION("a,changed");
+
 static void
 _a_set(Eo *obj EINA_UNUSED, void *class_data, int a)
 {
diff --git a/src/tests/eo/suite/eo_test_class_simple.h 
b/src/tests/eo/suite/eo_test_class_simple.h
index 2fce591..8fbb46e 100644
--- a/src/tests/eo/suite/eo_test_class_simple.h
+++ b/src/tests/eo/suite/eo_test_class_simple.h
@@ -18,6 +18,9 @@ EAPI Eo *simple_part_get(const char *name);
 extern const Eo_Event_Description _EV_A_CHANGED;
 #define EV_A_CHANGED (&(_EV_A_CHANGED))
 
+extern const Eo_Event_Description _EV_A_CHANGED2;
+#define EV_A_CHANGED2 (&(_EV_A_CHANGED2))
+
 #define SIMPLE_CLASS simple_class_get()
 const Eo_Class *simple_class_get(void);
 
diff --git a/src/tests/eo/suite/eo_test_general.c 
b/src/tests/eo/suite/eo_test_general.c
index b483a80..d8f9291 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -134,11 +134,15 @@ START_TEST(eo_signals)
 
         /* Call Eo event with legacy and non-legacy callbacks. */
         _eo_signals_cb_current = 0;
+        eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED2, -1000, 
_eo_signals_a_changed_never, (void *) 1));
         eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, -100, 
_eo_signals_a_changed_cb, (void *) 1));
         eo_do(obj, eo_event_callback_add(a_desc, _eo_signals_a_changed_cb2, 
NULL));
         eo_do(obj, simple_a_set(1));
         ck_assert_int_eq(_eo_signals_cb_flag, 0x3);
 
+        /* We don't need this one anymore. */
+        eo_do(obj, eo_event_callback_del(EV_A_CHANGED2, 
_eo_signals_a_changed_never, (void *) 1));
+
         /* Call legacy event with legacy and non-legacy callbacks. */
         int a = 3;
         _eo_signals_cb_current = 0;

-- 


Reply via email to