From: Lukasz Pawlik Date: Thu, 1 Mar 2012 07:52:43 +0000 (+0100) Subject: tests: fix Search calls in tests X-Git-Tag: RYGEL_0_15_2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=820cf2cdd99dea580ad85d751c499342a75f0451;p=profile%2Fivi%2Frygel.git tests: fix Search calls in tests Fixing test after 1f41782911fb7a5bd20021ec45c6027f8f2734e1 https://bugzilla.gnome.org/show_bug.cgi?id=661482 --- diff --git a/tests/rygel-item-creator-test.vala b/tests/rygel-item-creator-test.vala index f395906..3ee0435 100644 --- a/tests/rygel-item-creator-test.vala +++ b/tests/rygel-item-creator-test.vala @@ -223,6 +223,7 @@ public class Rygel.SearchableContainer : Rygel.MediaContainer { int offset, int count, out int total_matches, + string soer_criteria, Cancellable? cancellable = null) { Idle.add (() => { search.callback (); return false; }); yield; diff --git a/tests/rygel-searchable-container-test.vala b/tests/rygel-searchable-container-test.vala index f7024fb..3490479 100644 --- a/tests/rygel-searchable-container-test.vala +++ b/tests/rygel-searchable-container-test.vala @@ -42,10 +42,12 @@ public class MediaObject : Object { public class MediaContainer : MediaObject { public uint child_count = 10; - public async MediaObjects? get_children (uint offset, - uint max_count, - Cancellable? cancellable) - throws Error { + public async MediaObjects? get_children ( + uint offset, + uint max_count, + string sort_criteria, + Cancellable? cancellable) + throws Error { Idle.add ( () => { get_children.callback (); return false; }); yield; @@ -67,16 +69,16 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { uint total_matches; // check corners - var result = yield search (null, 0, 0, out total_matches, null); + var result = yield search (null, 0, 0, out total_matches, "", null); assert (total_matches == 10); assert (result.size == 10); - result = yield search (null, 10, 0, out total_matches, null); + result = yield search (null, 10, 0, out total_matches, "", null); assert (total_matches == 10); assert (result.size == 0); for (int i = 1; i < 10; ++i) { - result = yield search (null, i, 0, out total_matches, null); + result = yield search (null, i, 0, out total_matches, "", null); assert (total_matches == 10); assert (result.size == 10 - i); } @@ -88,16 +90,16 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { uint total_matches; // check corners - var result = yield search (null, 0, 4, out total_matches, null); + var result = yield search (null, 0, 4, out total_matches, "", null); assert (total_matches == 0); assert (result.size == 4); - result = yield search (null, 10, 4, out total_matches, null); + result = yield search (null, 10, 4, out total_matches, "", null); assert (total_matches == 0); assert (result.size == 0); for (int i = 1; i < 10; ++i) { - result = yield search (null, i, 3, out total_matches, null); + result = yield search (null, i, 3, out total_matches, "", null); assert (total_matches == 0); assert (result.size == int.min (10 - i, 3)); } @@ -110,12 +112,14 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { uint offset, uint max_count, out uint total_matches, + string sort_criteria, Cancellable? cancellable) throws Error { return yield this.simple_search (expression, offset, max_count, out total_matches, + sort_criteria, cancellable); }