diff options
author | Ted Gould <ted@gould.cx> | 2011-06-20 16:37:42 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-06-20 16:37:42 -0500 |
commit | 2f1adbf33420ba6c79a99938af18f9d7c4ec3484 (patch) | |
tree | f32468ab20257237622db64477c534d65ba1080f /tests/test-gtk-parser.c | |
parent | ddd6e111fef609b37ab31198e3494c4b0873ee2e (diff) | |
parent | 6a217805e685c47223da9513c31d2a26f0141ccf (diff) | |
download | libdbusmenu-2f1adbf33420ba6c79a99938af18f9d7c4ec3484.tar.gz libdbusmenu-2f1adbf33420ba6c79a99938af18f9d7c4ec3484.tar.bz2 libdbusmenu-2f1adbf33420ba6c79a99938af18f9d7c4ec3484.zip |
Import upstream version 0.4.90
Diffstat (limited to 'tests/test-gtk-parser.c')
-rw-r--r-- | tests/test-gtk-parser.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test-gtk-parser.c b/tests/test-gtk-parser.c index b66b46a..87b0a7f 100644 --- a/tests/test-gtk-parser.c +++ b/tests/test-gtk-parser.c @@ -55,9 +55,23 @@ const gchar * test_parser_children_builder = "</object>" "</interface>"; +/* Checks the log level to let warnings not stop the program */ +static gboolean +test_parser_children_log_handler (const gchar * domain, GLogLevelFlags level, const gchar * message, gpointer user_data) +{ + if (level & (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG)) { + return FALSE; + } + + return TRUE; +} + /* Ensure the parser can find children */ static void test_parser_children (void) { + /* Hide GTK errors */ + g_test_log_set_fatal_handler(test_parser_children_log_handler, NULL); + GtkBuilder * builder = gtk_builder_new(); g_assert(builder != NULL); |