[gnome-logs/wip/test: 12/31] Add tests/gnome-logs-test.c to assert log message
- From: Rashi Aswani <aswanirashi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-logs/wip/test: 12/31] Add tests/gnome-logs-test.c to assert log message
- Date: Fri, 28 Aug 2015 13:46:02 +0000 (UTC)
commit ba28f3702008f74e9ef03794d031ad25b118e9b8
Author: Rashi Aswani <aswanirashi19 gmail com>
Date: Thu Jun 18 16:31:11 2015 +0530
Add tests/gnome-logs-test.c to assert log message
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]