tests: Check "without keycode" code path too

And see whether the output of gtk_accelerator_parse()
matches that of gtk_accelerator_parse_with_keycode()
This commit is contained in:
Bastien Nocera 2011-11-16 16:13:01 +00:00
parent c1bdbe610a
commit ef5476f16a

View File

@ -35,6 +35,18 @@ test_one_accel (const char *accel,
&keycodes,
&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);