From f5b262a94e8d4dbdc7417d79bce579cf057e90b2 Mon Sep 17 00:00:00 2001 From: Jens Georg Date: Wed, 3 Oct 2012 13:48:33 +0200 Subject: [PATCH] test: Silence warnings in ItemCreator test --- tests/rygel-item-creator-test.vala | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/rygel-item-creator-test.vala b/tests/rygel-item-creator-test.vala index 53971c0..b11ac01 100644 --- a/tests/rygel-item-creator-test.vala +++ b/tests/rygel-item-creator-test.vala @@ -267,9 +267,29 @@ public class Rygel.EngineLoader { } } +public static void log_func (string? domain, + LogLevelFlags flags, + string message) { + + // Ignore critical of gee 0.6 and recent glib + if (message.has_prefix ("Read-only property 'read-only-view' on class")) { + Log.default_handler (domain, flags, message); + + return; + } + + if (LogLevelFlags.LEVEL_CRITICAL in flags || + LogLevelFlags.LEVEL_ERROR in flags || + LogLevelFlags.FLAG_FATAL in flags) { + print ("======> FAILED: %s: %s\n", domain ?? "", message); + assert_not_reached (); + } +} + public class Rygel.HTTPItemCreatorTest : GLib.Object { public static int main (string[] args) { + Log.set_default_handler (log_func); var test = new HTTPItemCreatorTest (); test.test_parse_args (); test.test_didl_parsing (); -- 2.7.4