summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-02-11 16:23:14 +0100
committerBastien Nocera <hadess@hadess.net>2022-02-11 16:34:24 +0100
commitc16df464d1c47f6419054e9eaac804d6d32b5395 (patch)
tree1a7efc567b4ab735f6328582fd9a440451de6b3c
parent21086a666f012b54a1d2a08eeec6695d4ad624c4 (diff)
downloadtotem-c16df464d1c47f6419054e9eaac804d6d32b5395.tar.gz
tests: Prepare for using title as part of sub/lang naming
-rw-r--r--src/test-totem.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/test-totem.c b/src/test-totem.c
index 3440dc5cd..1de005b1b 100644
--- a/src/test-totem.c
+++ b/src/test-totem.c
@@ -10,12 +10,14 @@
#include "totem-menu.h"
static BvwLangInfo *
-bvw_lang_info_new (const char *language,
+bvw_lang_info_new (const char *title,
+ const char *language,
const char *codec)
{
BvwLangInfo *info;
info = g_new0 (BvwLangInfo, 1);
+ info->title = g_strdup (title);
info->language = g_strdup (language);
info->codec = g_strdup (codec);
return info;
@@ -28,8 +30,8 @@ test_menus_lang_info (void)
/* No language, no codec */
l = NULL;
- l = g_list_append (l, bvw_lang_info_new ("und", NULL));
- l = g_list_append (l, bvw_lang_info_new ("und", NULL));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "und", NULL));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "und", NULL));
ret = bvw_lang_info_to_menu_labels (l, BVW_TRACK_TYPE_AUDIO);
g_list_free_full (l, (GDestroyNotify) bacon_video_widget_lang_info_free);
@@ -40,9 +42,9 @@ test_menus_lang_info (void)
/* Same language, same codecs */
l = NULL;
- l = g_list_append (l, bvw_lang_info_new ("eng", "Dolby Pro Racing"));
- l = g_list_append (l, bvw_lang_info_new ("eng", "Dolby Pro Racing"));
- l = g_list_append (l, bvw_lang_info_new ("fre", "Dolby Amateur 5.1"));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "eng", "Dolby Pro Racing"));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "eng", "Dolby Pro Racing"));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "fre", "Dolby Amateur 5.1"));
ret = bvw_lang_info_to_menu_labels (l, BVW_TRACK_TYPE_AUDIO);
g_list_free_full (l, (GDestroyNotify) bacon_video_widget_lang_info_free);
@@ -54,9 +56,9 @@ test_menus_lang_info (void)
/* Same language, different codecs */
l = NULL;
- l = g_list_append (l, bvw_lang_info_new ("eng", "Dolby Pro Racing"));
- l = g_list_append (l, bvw_lang_info_new ("eng", "Dolby Amateur 5.1"));
- l = g_list_append (l, bvw_lang_info_new ("fre", "Dolby Amateur 5.1"));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "eng", "Dolby Pro Racing"));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "eng", "Dolby Amateur 5.1"));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "fre", "Dolby Amateur 5.1"));
ret = bvw_lang_info_to_menu_labels (l, BVW_TRACK_TYPE_AUDIO);
g_list_free_full (l, (GDestroyNotify) bacon_video_widget_lang_info_free);
@@ -68,9 +70,9 @@ test_menus_lang_info (void)
/* Different languages */
l = NULL;
- l = g_list_append (l, bvw_lang_info_new ("eng", "Dolby Amateur 5.1"));
- l = g_list_append (l, bvw_lang_info_new ("spa", "Dolby Amateur 5.1"));
- l = g_list_append (l, bvw_lang_info_new ("fre", "Dolby Amateur 5.1"));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "eng", "Dolby Amateur 5.1"));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "spa", "Dolby Amateur 5.1"));
+ l = g_list_append (l, bvw_lang_info_new (NULL, "fre", "Dolby Amateur 5.1"));
ret = bvw_lang_info_to_menu_labels (l, BVW_TRACK_TYPE_AUDIO);
g_list_free_full (l, (GDestroyNotify) bacon_video_widget_lang_info_free);