xserver: Branch 'master'

Peter Hutterer whot at kemper.freedesktop.org
Thu Jun 4 23:48:16 PDT 2009


 test/Makefile.am |    1 
 test/input.c     |   56 +++++++++++++++++++++++++------------------------------
 2 files changed, 26 insertions(+), 31 deletions(-)

New commits:
commit 7f3456a4080d1bf21010170e126128cb653bd2ac
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Jun 5 16:44:46 2009 +1000

    Revert "test: check from INT_MIN to INT_MAX for core type conversion"
    
    This patch requires extra special casing to check if the linker supports the
    -wrap option. Patches to do so will follow, in the meantime, revert this
    commit. It shouldn't have been pushed in the first place anyway.
    
    This reverts commit d979f443946011158b6a183582728a6899c33b85.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/test/Makefile.am b/test/Makefile.am
index 57a31c2..dbad93b 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -10,7 +10,6 @@ TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS)
 
 xkb_LDADD=$(TEST_LDADD)
 input_LDADD=$(TEST_LDADD)
-input_CFLAGS=$(AM_CFLAGS) -Wl,-wrap,ErrorF
 
 libxservertest_la_LIBADD = \
             $(XSERVER_LIBS) \
diff --git a/test/input.c b/test/input.c
index dcce719..b80e1f5 100644
--- a/test/input.c
+++ b/test/input.c
@@ -40,10 +40,6 @@
 
 #include <glib.h>
 
-void __wrap_ErrorF(const char *f, ...)
-{
-}
-
 /**
  * Init a device with axes.
  * Verify values set on the device.
@@ -258,36 +254,36 @@ static void dix_event_to_core_conversion(void)
 {
     DeviceEvent ev;
     xEvent core;
-    int rc, i;
+    int rc;
 
     ev.header   = 0xFF;
     ev.length   = sizeof(DeviceEvent);
 
-    for (i = INT_MIN; i < INT_MAX; i++)
-    {
-        switch(i)
-        {
-            case ET_KeyPress:
-            case ET_KeyRelease:
-            case ET_ButtonPress:
-            case ET_ButtonRelease:
-            case ET_Motion:
-                dix_event_to_core(i);
-                break;
-            case ET_Raw:
-            case ET_ProximityIn:
-            case ET_ProximityOut:
-                ev.type = i;
-                rc = EventToCore((InternalEvent*)&ev, &core);
-                g_assert(rc == BadMatch);
-                break;
-            default:
-                ev.type = i;
-                rc = EventToCore((InternalEvent*)&ev, &core);
-                g_assert(rc == BadImplementation);
-                break;
-        }
-    }
+    ev.type     = 0;
+    rc = EventToCore((InternalEvent*)&ev, &core);
+    g_assert(rc == BadImplementation);
+
+    ev.type     = 1;
+    rc = EventToCore((InternalEvent*)&ev, &core);
+    g_assert(rc == BadImplementation);
+
+    ev.type     = ET_ProximityOut + 1;
+    rc = EventToCore((InternalEvent*)&ev, &core);
+    g_assert(rc == BadImplementation);
+
+    ev.type     = ET_ProximityIn;
+    rc = EventToCore((InternalEvent*)&ev, &core);
+    g_assert(rc == BadMatch);
+
+    ev.type     = ET_ProximityOut;
+    rc = EventToCore((InternalEvent*)&ev, &core);
+    g_assert(rc == BadMatch);
+
+    dix_event_to_core(ET_KeyPress);
+    dix_event_to_core(ET_KeyRelease);
+    dix_event_to_core(ET_ButtonPress);
+    dix_event_to_core(ET_ButtonRelease);
+    dix_event_to_core(ET_Motion);
 }
 
 static void xi2_struct_sizes(void)


More information about the xorg-commit mailing list