mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
tests: Fix mode_result test warning
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
7416f344a3
commit
a6605b6f4d
1 changed files with 16 additions and 5 deletions
|
@ -135,12 +135,23 @@ END_TEST
|
|||
|
||||
START_TEST(test_mode_result)
|
||||
{
|
||||
char res[] = "";
|
||||
ck_assert_int_eq ( mode_result ( &help_keys_mode, MENU_NEXT, &res,0), NEXT_DIALOG);
|
||||
ck_assert_int_eq ( mode_result ( &help_keys_mode, MENU_PREVIOUS, &res,0), PREVIOUS_DIALOG);
|
||||
ck_assert_int_eq ( mode_result ( &help_keys_mode, MENU_QUICK_SWITCH|1, &res,0), 1);
|
||||
ck_assert_int_eq ( mode_result ( &help_keys_mode, MENU_QUICK_SWITCH|2, &res,0), 2);
|
||||
char *res;
|
||||
|
||||
res = NULL;
|
||||
ck_assert_int_eq ( mode_result ( &help_keys_mode, MENU_NEXT, &res,0), NEXT_DIALOG);
|
||||
g_free ( res );
|
||||
|
||||
res = NULL;
|
||||
ck_assert_int_eq ( mode_result ( &help_keys_mode, MENU_PREVIOUS, &res,0), PREVIOUS_DIALOG);
|
||||
g_free ( res );
|
||||
|
||||
res = NULL;
|
||||
ck_assert_int_eq ( mode_result ( &help_keys_mode, MENU_QUICK_SWITCH|1, &res,0), 1);
|
||||
g_free ( res );
|
||||
|
||||
res = NULL;
|
||||
ck_assert_int_eq ( mode_result ( &help_keys_mode, MENU_QUICK_SWITCH|2, &res,0), 2);
|
||||
g_free ( res );
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
Loading…
Reference in a new issue