Movie Info Provider: Initial test added
authorSimón Pena <spenap@gmail.com>
Sun, 16 May 2010 09:39:41 +0000 (11:39 +0200)
committerSimón Pena <spenap@gmail.com>
Sun, 16 May 2010 11:35:58 +0000 (13:35 +0200)
A test file is added (and the project build is updated) so that
the new GObject movie info provider can be tested

Makefile.am
configure.ac
test/Makefile.am [new file with mode: 0644]
test/mvs-info-provider-test.c [new file with mode: 0644]

index e77d513..849f15a 100644 (file)
@@ -1,3 +1,3 @@
-SUBDIRS = src examples
+SUBDIRS = src examples test
 
 ACLOCAL_AMFLAGS = -I m4
index a99e5e3..45fba89 100644 (file)
@@ -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 (file)
index 0000000..5ff431a
--- /dev/null
@@ -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 (file)
index 0000000..55de014
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * mvs-info-provider-test.c
+ *
+ * This file is part of maevies
+ * Copyright (C) 2010 Simón Pena <spenap@gmail.com>
+ *
+ * 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 <stdio.h>
+#include <glib.h>
+
+#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;
+}