From 125324e958dd659dafc33237e2c897df5aef6a76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sim=C3=B3n=20Pena?= Date: Mon, 17 May 2010 12:06:17 +0200 Subject: [PATCH] Movie Info Provider test: Check WATC movie A WATC Movie is created and destroyed in the test file, and introduced in the test/Makefile.am, so that we check for easy errors. --- test/Makefile.am | 4 +++- test/mvs-minfo-provider-test.c | 9 ++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index e92ffef..4285b6d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -5,7 +5,9 @@ mvs_minfo_provider_test_SOURCES = \ $(top_srcdir)/src/mvs-minfo-provider.c \ $(top_srcdir)/src/mvs-minfo-provider.h \ $(top_srcdir)/src/mvs-tmdb-movie.c \ - $(top_srcdir)/src/mvs-tmdb-movie.h + $(top_srcdir)/src/mvs-tmdb-movie.h \ + $(top_srcdir)/src/mvs-watc-movie.c \ + $(top_srcdir)/src/mvs-watc-movie.h mvs_minfo_provider_test_CFLAGS = \ -I $(top_srcdir)/src/ \ diff --git a/test/mvs-minfo-provider-test.c b/test/mvs-minfo-provider-test.c index a2964ab..54cf39c 100644 --- a/test/mvs-minfo-provider-test.c +++ b/test/mvs-minfo-provider-test.c @@ -21,6 +21,7 @@ #include "mvs-minfo-provider.h" #include "mvs-tmdb-movie.h" +#include "mvs-watc-movie.h" static GMainLoop *loop = NULL; static gchar *query = "Zombieland"; @@ -56,7 +57,7 @@ int main (int argc, char **argv) { MvsMInfoProvider *minfo_provider = NULL; - MvsTmdbMovie *movie_info = NULL; + MvsWatcMovie *watc_movie = NULL; GOptionContext *context = NULL; GOptionGroup *gst_option_group = NULL; GError *error = NULL; @@ -72,20 +73,18 @@ main (int argc, char **argv) return -1; } - + watc_movie = mvs_watc_movie_new (); minfo_provider = mvs_minfo_provider_new (); g_signal_connect (minfo_provider, "response-received", G_CALLBACK (response_received_callback), NULL); - movie_info = mvs_tmdb_movie_new (); loop = g_main_loop_new (NULL, FALSE); mvs_minfo_provider_query (minfo_provider, query); g_main_loop_run (loop); - + g_object_unref (watc_movie); g_object_unref (minfo_provider); - g_object_unref (movie_info); g_main_loop_unref (loop); return 0; -- 1.7.9.5