[gtk+] tests: Check "without keycode" code path too



commit ef5476f16aeaf817f4fbc291807d336ebdc0db9e
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Nov 16 16:13:01 2011 +0000

    tests: Check "without keycode" code path too
    
    And see whether the output of gtk_accelerator_parse()
    matches that of gtk_accelerator_parse_with_keycode()

 gtk/tests/accel.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/tests/accel.c b/gtk/tests/accel.c
index 0726413..5d36b38 100644
--- a/gtk/tests/accel.c
+++ b/gtk/tests/accel.c
@@ -36,6 +36,18 @@ test_one_accel (const char *accel,
 				      &mods);
 
   if (has_keysym)
+    {
+      guint accel_key_2;
+      GdkModifierType mods_2;
+
+      gtk_accelerator_parse (accel,
+                             &accel_key_2,
+                             &mods_2);
+      g_assert (accel_key == accel_key_2);
+      g_assert (mods == mods_2);
+    }
+
+  if (has_keysym)
     g_assert (accel_key != 0);
   g_assert (keycodes);
   g_assert (keycodes[0] != 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]