[vlc-devel] [PATCH 5/5] test: libvlc: test program pre-selection
Thomas Guillem
thomas at gllm.fr
Mon Feb 1 15:52:25 UTC 2021
---
test/libvlc/media_player.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/libvlc/media_player.c b/test/libvlc/media_player.c
index 4906fb7bdd..ab2c38dd5f 100644
--- a/test/libvlc/media_player.c
+++ b/test/libvlc/media_player.c
@@ -571,6 +571,8 @@ static void test_media_player_programs(const char** argv, int argc)
res = libvlc_event_attach(em, libvlc_MediaPlayerProgramSelected, on_event, &ctx);
assert(!res);
+ libvlc_media_player_select_program_id(mp, 2);
+
libvlc_media_player_play (mp);
/* check that all programs are added and that one is selected */
@@ -600,7 +602,7 @@ static void test_media_player_programs(const char** argv, int argc)
/* Check that we can fetch the program 0 and that it is enabled */
program = libvlc_media_player_get_selected_program(mp);
- assert(program != NULL && program->i_group_id == 0 && program->b_selected);
+ assert(program != NULL && program->i_group_id == 2 && program->b_selected);
libvlc_player_program_delete(program);
/* Change the program selection, select the last program */
@@ -610,7 +612,7 @@ static void test_media_player_programs(const char** argv, int argc)
{
const struct libvlc_event_t *ev = even_ctx_wait_event(&ctx);
assert(ev->type == libvlc_MediaPlayerProgramSelected);
- assert(ev->u.media_player_program_selection_changed.i_unselected_id == 0);
+ assert(ev->u.media_player_program_selection_changed.i_unselected_id == 2);
assert(ev->u.media_player_program_selection_changed.i_selected_id == 8);
event_ctx_release(&ctx);
}
--
2.29.2
More information about the vlc-devel
mailing list