Commit 6d606d1068197453db40d78dc44e7bbe816f0623

Daniel Stone 2012-06-22T15:29:47

state: Add more comprehensive repeating test Signed-off-by: Daniel Stone <daniel@fooishbar.org>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/test/state.c b/test/state.c
index d32a1ea..b0974ef 100644
--- a/test/state.c
+++ b/test/state.c
@@ -230,13 +230,11 @@ test_serialisation(struct xkb_keymap *keymap)
 static void
 test_repeat(struct xkb_keymap *keymap)
 {
-    xkb_keycode_t key;
-    fprintf(stderr, "%s\n", xkb_map_get_as_string(keymap));
-    for (key = keymap->min_key_code; key < keymap->max_key_code; key++)
-        if (xkb_key_repeats(keymap, key))
-            fprintf(stderr, "%d repeats!\n", key);
     assert(!xkb_key_repeats(keymap, KEY_LEFTSHIFT + 8));
     assert(xkb_key_repeats(keymap, KEY_A + 8));
+    assert(xkb_key_repeats(keymap, KEY_8 + 8));
+    assert(xkb_key_repeats(keymap, KEY_DOWN + 8));
+    assert(xkb_key_repeats(keymap, KEY_KBDILLUMDOWN + 8));
 }
 
 int