[gnome-photos/wip/rishi/unit-tests: 4/4] tests: Test the Pipeline
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/unit-tests: 4/4] tests: Test the Pipeline
- Date: Fri, 2 Nov 2018 13:26:46 +0000 (UTC)
commit 28dca80af5ba5f048dfbf7751fd577dcd2a10069
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Nov 2 14:19:46 2018 +0100
tests: Test the Pipeline
tests/unit/Makefile.am | 12 ++++++++++++
tests/unit/meson.build | 2 ++
tests/unit/photos-test-pipeline.c | 40 +++++++++++++++++++++++++++++++++++++++
3 files changed, 54 insertions(+)
---
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
index 690c96f6..419f2a2e 100644
--- a/tests/unit/Makefile.am
+++ b/tests/unit/Makefile.am
@@ -5,12 +5,24 @@ AM_TESTS_ENVIRONMENT += \
$(NULL)
test_programs = \
+ photos-test-pipeline
$(NULL)
AM_CFLAGS = \
$(WARN_CFLAGS) \
$(NULL)
+AM_CPPFLAGS = \
+ $(GLIB_CFLAGS) \
+ -I$(top_builddir)/src \
+ -I$(top_srcdir)/src \
+ $(NULL)
+
+LDADD = \
+ $(GLIB_LIBS) \
+ $(top_builddir)/src/libgnome-photos.la \
+ $(NULL)
+
AM_LDFLAGS = \
$(WARN_LDFLAGS) \
$(NULL)
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 4ab7aae2..f6535d5f 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -12,10 +12,12 @@ test_env.set('MALLOC_CHECK_', '2')
test_env.set('MALLOC_PERTURB_', '@0@'.format(random_number % 256))
test_deps = [
+ glib_dep,
libgnome_photos_dep,
]
tests = {
+ 'photos-test-pipeline': {},
}
foreach test_name, extra_args: tests
diff --git a/tests/unit/photos-test-pipeline.c b/tests/unit/photos-test-pipeline.c
new file mode 100644
index 00000000..ce0f2e75
--- /dev/null
+++ b/tests/unit/photos-test-pipeline.c
@@ -0,0 +1,40 @@
+/*
+ * Photos - access, organize and share your photos on GNOME
+ * Copyright © 2018 Red Hat, Inc.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "config.h"
+
+#include <locale.h>
+
+#include <glib.h>
+
+#include "photos-debug.h"
+
+
+gint
+main (gint argc, gchar *argv[])
+{
+ gint exit_status;
+
+ setlocale (LC_ALL, "");
+ g_test_init (&argc, &argv, NULL);
+ photos_debug_init ();
+
+ exit_status = g_test_run ();
+ return exit_status;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]