[gnome-taquin] Add tests infrastructure.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-taquin] Add tests infrastructure.
- Date: Fri, 8 Feb 2019 11:19:39 +0000 (UTC)
commit f851f08e200880d0416119ec03227d00a401230f
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Feb 8 07:17:36 2019 +0100
Add tests infrastructure.
meson.build | 1 +
src/meson.build | 13 +++++++++++++
src/test-taquin.vala | 38 ++++++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+)
---
diff --git a/meson.build b/meson.build
index ecdee01..2f9edc6 100644
--- a/meson.build
+++ b/meson.build
@@ -7,6 +7,7 @@ gnome = import('gnome')
i18n = import('i18n')
python3 = import('python3')
+gio_dependency = dependency('gio-2.0', version: '>= 2.40.0')
glib_dependency = dependency('glib-2.0', version: '>= 2.40.0')
gtk_dependency = dependency('gtk+-3.0', version: '>= 3.20.0')
rsvg_dependency = dependency('librsvg-2.0', version: '>= 2.32.0')
diff --git a/src/meson.build b/src/meson.build
index 594ad78..467f45d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,3 +1,16 @@
+# Tests
+taquin_tests = executable(
+ 'taquin_tests',
+ [
+ 'test-taquin.vala'
+ ],
+ dependencies : [
+ gio_dependency
+ ]
+)
+test('taquin-tests', taquin_tests)
+
+# Application
resources = gnome.compile_resources (meson.project_name(), 'taquin.gresource.xml')
executable(meson.project_name(),[
diff --git a/src/test-taquin.vala b/src/test-taquin.vala
new file mode 100644
index 0000000..1e87a5e
--- /dev/null
+++ b/src/test-taquin.vala
@@ -0,0 +1,38 @@
+/* -*- Mode: vala; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * Copyright (C) 2019 Arnaud Bonatti <arnaud bonatti gmail com>
+ *
+ * This file is part of Taquin.
+ *
+ * Taquin 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.
+ *
+ * Taquin 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 Taquin. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+private class TestTaquin : Object
+{
+ private static int main (string [] args)
+ {
+ Test.init (ref args);
+ Test.add_func ("/Taquin/test tests", test_tests);
+ return Test.run ();
+ }
+
+ private static void test_tests ()
+ {
+ assert (1 + 1 == 2);
+ }
+
+ /*\
+ * * tests
+ \*/
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]