tests: fix patch names and g_object_unref

This commit is contained in:
Wim Taymans 2011-03-28 18:17:45 +02:00
parent 171dfbc632
commit dcd09840d4

View file

@ -289,7 +289,7 @@ GST_START_TEST (test_saving_profile)
fail_unless (gst_encoding_target_save (orig, NULL)); fail_unless (gst_encoding_target_save (orig, NULL));
/* Check we can load it */ /* Check we can load it */
profile_file_name = g_build_filename (g_get_home_dir (), ".gstreamer-0.10", profile_file_name = g_build_filename (g_get_home_dir (), ".gstreamer-0.11",
"encoding-profiles", "herding", "myponytarget2.gep", NULL); "encoding-profiles", "herding", "myponytarget2.gep", NULL);
GST_DEBUG ("Loading target from '%s'", profile_file_name); GST_DEBUG ("Loading target from '%s'", profile_file_name);
loaded = gst_encoding_target_load_from_file (profile_file_name, NULL); loaded = gst_encoding_target_load_from_file (profile_file_name, NULL);
@ -411,7 +411,7 @@ GST_START_TEST (test_loading_profile)
gst_encoding_target_unref (target); gst_encoding_target_unref (target);
/* Test loading using fully specified path */ /* Test loading using fully specified path */
profile_file_name = g_build_filename (g_get_home_dir (), ".gstreamer-0.10", profile_file_name = g_build_filename (g_get_home_dir (), ".gstreamer-0.11",
"encoding-profiles", "herding", "myponytarget.gep", NULL); "encoding-profiles", "herding", "myponytarget.gep", NULL);
GST_DEBUG ("Loading target from '%s'", profile_file_name); GST_DEBUG ("Loading target from '%s'", profile_file_name);
@ -489,7 +489,7 @@ GST_START_TEST (test_target_list)
/* If tmp is NULL, it means we iterated the whole list without finding /* If tmp is NULL, it means we iterated the whole list without finding
* our target */ * our target */
fail_if (tmp == NULL); fail_if (tmp == NULL);
g_list_foreach (targets, (GFunc) gst_mini_object_unref, NULL); g_list_foreach (targets, (GFunc) g_object_unref, NULL);
g_list_free (targets); g_list_free (targets);
/* Try getting all available targets without a specified category */ /* Try getting all available targets without a specified category */
@ -503,7 +503,7 @@ GST_START_TEST (test_target_list)
/* If tmp is NULL, it means we iterated the whole list without finding /* If tmp is NULL, it means we iterated the whole list without finding
* our target */ * our target */
fail_if (tmp == NULL); fail_if (tmp == NULL);
g_list_foreach (targets, (GFunc) gst_mini_object_unref, NULL); g_list_foreach (targets, (GFunc) g_object_unref, NULL);
g_list_free (targets); g_list_free (targets);
} }
@ -544,11 +544,11 @@ remove_profile_file (void)
{ {
gchar *profile_file_name; gchar *profile_file_name;
profile_file_name = g_build_filename (g_get_home_dir (), ".gstreamer-0.10", profile_file_name = g_build_filename (g_get_home_dir (), ".gstreamer-0.11",
"encoding-profiles", "herding", "myponytarget.gep", NULL); "encoding-profiles", "herding", "myponytarget.gep", NULL);
g_unlink (profile_file_name); g_unlink (profile_file_name);
g_free (profile_file_name); g_free (profile_file_name);
profile_file_name = g_build_filename (g_get_home_dir (), ".gstreamer-0.10", profile_file_name = g_build_filename (g_get_home_dir (), ".gstreamer-0.11",
"encoding-profiles", "herding", "myponytarget2.gep", NULL); "encoding-profiles", "herding", "myponytarget2.gep", NULL);
g_unlink (profile_file_name); g_unlink (profile_file_name);
g_free (profile_file_name); g_free (profile_file_name);
@ -562,10 +562,10 @@ create_profile_file (void)
GError *error = NULL; GError *error = NULL;
profile_dir = profile_dir =
g_build_filename (g_get_home_dir (), ".gstreamer-0.10", g_build_filename (g_get_home_dir (), ".gstreamer-0.11",
"encoding-profiles", "herding", NULL); "encoding-profiles", "herding", NULL);
profile_file_name = profile_file_name =
g_build_filename (g_get_home_dir (), ".gstreamer-0.10", g_build_filename (g_get_home_dir (), ".gstreamer-0.11",
"encoding-profiles", "herding", "myponytarget.gep", NULL); "encoding-profiles", "herding", "myponytarget.gep", NULL);
g_mkdir_with_parents (profile_dir, S_IRUSR | S_IWUSR | S_IXUSR); g_mkdir_with_parents (profile_dir, S_IRUSR | S_IWUSR | S_IXUSR);
if (!g_file_set_contents (profile_file_name, profile_string, if (!g_file_set_contents (profile_file_name, profile_string,
@ -597,7 +597,7 @@ profile_suite (void)
gchar *gst_dir; gchar *gst_dir;
/* cehck if we can create profiles */ /* cehck if we can create profiles */
gst_dir = g_build_filename (g_get_home_dir (), ".gstreamer-0.10", NULL); gst_dir = g_build_filename (g_get_home_dir (), ".gstreamer-0.11", NULL);
can_write = (g_access (gst_dir, R_OK | W_OK | X_OK) == 0); can_write = (g_access (gst_dir, R_OK | W_OK | X_OK) == 0);
g_free (gst_dir); g_free (gst_dir);