diff options
author | Rashi Aswani <aswanirashi19@gmail.com> | 2015-06-18 16:31:11 +0530 |
---|---|---|
committer | Rashi Aswani <aswanirashi19@gmail.com> | 2015-08-27 15:16:43 +0530 |
commit | ba28f3702008f74e9ef03794d031ad25b118e9b8 (patch) | |
tree | aa832852561be67ac4da9916d92f7b627a9c67e7 | |
parent | 6bc4ca5623974ec9eab0ed90256ca6baf239a3a6 (diff) | |
download | gnome-logs-ba28f3702008f74e9ef03794d031ad25b118e9b8.tar.gz |
Add tests/gnome-logs-test.c to assert log message
-rw-r--r-- | 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 (); +} |