Commit 914c060a1dacb5b42b4bb9ded036c5c6951d842a

Ran Benita 2016-10-22T20:13:11

test/state: move wrongly-placed assert Signed-off-by: Ran Benita <ran234@gmail.com>

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 8ae718c..d774496 100644
--- a/test/state.c
+++ b/test/state.c
@@ -445,6 +445,7 @@ test_consume(struct xkb_keymap *keymap)
 
     /* More complicated - CTRL+ALT */
     state = xkb_state_new(keymap);
+    assert(state);
 
     mask = xkb_state_key_get_consumed_mods(state, KEY_F1 + EVDEV_OFFSET);
     assert(mask == ((1U << shift) | (1U << alt) | (1U << ctrl) | (1U << mod5)));
@@ -458,8 +459,6 @@ test_consume(struct xkb_keymap *keymap)
     mask = xkb_state_key_get_consumed_mods(state, KEY_F1 + EVDEV_OFFSET);
     assert(mask == ((1U << shift) | (1U << alt) | (1U << ctrl) | (1U << mod5)));
 
-    assert(state);
-
     xkb_state_unref(state);
 }