Commit 2ce89264 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

test: test libvlc_media_player_(set|get)_role

parent c659faff
......@@ -1982,6 +1982,7 @@ typedef enum libvlc_media_player_role {
libvlc_role_Production /**< Audio editting/production */,
libvlc_role_Accessibility /**< Accessibility */,
libvlc_role_Test /** Testing */,
#define libvlc_role_Last libvlc_role_Test
} libvlc_media_player_role_t;
/**
......
......@@ -80,6 +80,19 @@ static void test_audio_video(libvlc_media_player_t *mp)
libvlc_audio_output_device_list_release( aouts );
}
static void test_role(libvlc_media_player_t *mp)
{
int role;
/* Test default value */
assert(libvlc_media_player_get_role(mp) == libvlc_role_Video);
for (role = 0; libvlc_media_player_set_role(mp, role) == 0; role++)
assert(libvlc_media_player_get_role(mp) == role);
assert(role > libvlc_role_Last);
}
static void test_media_player_set_media(const char** argv, int argc)
{
const char * file = test_default_sample;
......@@ -158,6 +171,7 @@ static void test_media_player_pause_stop(const char** argv, int argc)
libvlc_media_release (md);
test_audio_video(mi);
test_role(mi);
libvlc_media_player_play (mi);
log ("Waiting for playing\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment