From d217069ff79639016196df7818dd9c41850a1ac8 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Thu, 6 Dec 2012 16:29:01 +0100 Subject: [PATCH] tests: Avoid some warnings --- tests/rygel-http-post-test.vala | 2 +- tests/rygel-item-creator-test.vala | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/rygel-http-post-test.vala b/tests/rygel-http-post-test.vala index 8097840..af8acdd 100644 --- a/tests/rygel-http-post-test.vala +++ b/tests/rygel-http-post-test.vala @@ -254,7 +254,7 @@ public class Rygel.HTTPServer : GLib.Object { public string uri { owned get { - var item = new MediaItem (this.root_container.ITEM_ID, this.root_container); + var item = new MediaItem (MediaContainer.ITEM_ID, this.root_container); var item_uri = new HTTPItemURI (item, this); return item_uri.to_string (); } diff --git a/tests/rygel-item-creator-test.vala b/tests/rygel-item-creator-test.vala index 21d8e1b..b5547ca 100644 --- a/tests/rygel-item-creator-test.vala +++ b/tests/rygel-item-creator-test.vala @@ -147,7 +147,7 @@ public class Rygel.MediaItem : Rygel.MediaObject { } public class Rygel.MusicItem : Rygel.AudioItem { - public const string UPNP_CLASS = "object.item.audioItem.musicTrack"; + public new const string UPNP_CLASS = "object.item.audioItem.musicTrack"; public MusicItem (string id, MediaContainer parent, string title) { base (id, parent, title); @@ -164,7 +164,7 @@ public class Rygel.AudioItem : Rygel.MediaItem { } } public class Rygel.ImageItem : Rygel.MediaItem { - public const string UPNP_CLASS = "object.item.imageItem"; + public new const string UPNP_CLASS = "object.item.imageItem"; public ImageItem (string id, MediaContainer parent, string title) { base (id, parent, title); } @@ -210,7 +210,8 @@ public class Rygel.MediaContainer : Rygel.MediaObject { public MediaObject found_object = null; public async MediaObject? find_object (string id, - Cancellable? cancellable = null) { + Cancellable? cancellable = null) + throws Error { Idle.add (() => { find_object.callback (); return false; }); yield; @@ -246,6 +247,7 @@ public class Rygel.SearchableContainer : Rygel.MediaContainer { out int total_matches, string soer_criteria, Cancellable? cancellable = null) { + total_matches = 0; Idle.add (() => { search.callback (); return false; }); yield; @@ -265,8 +267,10 @@ public class Rygel.Transcoder { } public class Rygel.TestMediaEngine : Rygel.MediaEngine { + private GLib.List dlna_profiles = new GLib.List(); + public override unowned GLib.List get_dlna_profiles () { - return null; + return dlna_profiles; } public override unowned GLib.List? get_transcoders () { -- 2.7.4