[gnome-logs/wip/test: 13/16] Add test file



commit b1edc6a68daa6cff6e8e68a8b1f68e299a4c9936
Author: Rashi Aswani <aswanirashi19 gmail com>
Date:   Thu Jun 18 16:31:11 2015 +0530

    Add test file

 tests/gnome-logs-test.c |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/tests/gnome-logs-test.c b/tests/gnome-logs-test.c
new file mode 100644
index 0000000..cbdef30
--- /dev/null
+++ b/tests/gnome-logs-test.c
@@ -0,0 +1,37 @@
+/*
+ *  GNOME Logs - View and search logs
+ *  Copyright (C) 2015 Ekaterina Gerasimova
+ *
+ *  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 "gl-journal-mock.h"
+
+static void
+check_log_message (void)
+{
+   GlMockJournalEntry *entry;
+   gchar *mystring = gl_mock_journal_entry_get_message(entry);
+   g_assert_cmpstr(mystring, ==, "Test");
+}
+
+int
+main (int argc, char** argv)
+{
+    g_test_init (&argc, &argv, NULL);
+
+    g_test_add_func ("/util/check_log_message", check_log_message);
+
+    return g_test_run ();
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]