From 0f097334f6f09c38c8cd6a68c248e65aa0eb5dc5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sim=C3=B3n=20Pena?= Date: Sun, 16 May 2010 11:39:41 +0200 Subject: [PATCH] Movie Info Provider: Initial test added A test file is added (and the project build is updated) so that the new GObject movie info provider can be tested --- Makefile.am | 2 +- configure.ac | 1 + test/Makefile.am | 19 +++++++++++++++++++ test/mvs-info-provider-test.c | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 test/Makefile.am create mode 100644 test/mvs-info-provider-test.c diff --git a/Makefile.am b/Makefile.am index e77d513..849f15a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = src examples +SUBDIRS = src examples test ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index a99e5e3..45fba89 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,7 @@ AC_CONFIG_FILES([ Makefile src/Makefile examples/Makefile + test/Makefile ]) AC_OUTPUT diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..5ff431a --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,19 @@ +bin_PROGRAMS = mvs-minfo-provider-test + +mvs_minfo_provider_test_SOURCES = \ + mvs-info-provider-test.c \ + $(top_srcdir)/src/mvs-minfo-provider.c \ + $(top_srcdir)/src/mvs-minfo-provider.h + +mvs_minfo_provider_test_CFLAGS = \ + -I $(top_srcdir)/src/ \ + $(DEPS_CFLAGS) + +mvs_minfo_provider_test_LDADD = \ + $(DEPS_LIBS) + +MAINTAINERCLEANFILES = \ + *.in \ + *~ + +DISTCLEANFILES = $(MAINTAINERCLEANFILES) diff --git a/test/mvs-info-provider-test.c b/test/mvs-info-provider-test.c new file mode 100644 index 0000000..55de014 --- /dev/null +++ b/test/mvs-info-provider-test.c @@ -0,0 +1,39 @@ +/* + * mvs-info-provider-test.c + * + * This file is part of maevies + * Copyright (C) 2010 Simón Pena + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#include +#include + +#include "mvs-minfo-provider.h" + +int +main (int argc, char **argv) +{ + MvsMInfoProvider *minfo_provider = NULL; + + g_type_init (); + + g_thread_init (NULL); + + minfo_provider = mvs_minfo_provider_new (); + + mvs_minfo_provider_query (minfo_provider, "A query"); + + g_object_unref (minfo_provider); + return 0; +} -- 1.7.9.5