Commit ecac663d authored by Jens Georg's avatar Jens Georg

tests: Fix for previous vala api change

parent c5445ef5
...@@ -284,9 +284,9 @@ public class Rygel.SearchableContainer : Rygel.MediaContainer { ...@@ -284,9 +284,9 @@ public class Rygel.SearchableContainer : Rygel.MediaContainer {
public async MediaObjects search (SearchExpression expression, public async MediaObjects search (SearchExpression expression,
int offset, int offset,
int count, int count,
out int total_matches,
string soer_criteria, string soer_criteria,
Cancellable? cancellable = null) { Cancellable? cancellable,
out int total_matches) {
total_matches = 0; total_matches = 0;
Idle.add (() => { search.callback (); return false; }); Idle.add (() => { search.callback (); return false; });
yield; yield;
......
...@@ -77,7 +77,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { ...@@ -77,7 +77,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer {
// check corners // check corners
try { try {
var result = yield search (null, 0, 0, out total_matches, "", null); var result = yield search (null, 0, 0, "", null, out total_matches);
assert (total_matches == 10); assert (total_matches == 10);
assert (result.size == 10); assert (result.size == 10);
} catch (GLib.Error error) { } catch (GLib.Error error) {
...@@ -85,7 +85,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { ...@@ -85,7 +85,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer {
} }
try { try {
var result = yield search (null, 10, 0, out total_matches, "", null); var result = yield search (null, 10, 0, "", null, out total_matches);
assert (total_matches == 10); assert (total_matches == 10);
assert (result.size == 0); assert (result.size == 0);
} catch (GLib.Error error) { } catch (GLib.Error error) {
...@@ -94,7 +94,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { ...@@ -94,7 +94,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer {
for (int i = 1; i < 10; ++i) { for (int i = 1; i < 10; ++i) {
try { try {
var result = yield search (null, i, 0, out total_matches, "", null); var result = yield search (null, i, 0, "", null, out total_matches);
assert (total_matches == 10); assert (total_matches == 10);
assert (result.size == 10 - i); assert (result.size == 10 - i);
} catch (GLib.Error error) { } catch (GLib.Error error) {
...@@ -110,7 +110,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { ...@@ -110,7 +110,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer {
// check corners // check corners
try { try {
var result = yield search (null, 0, 4, out total_matches, "", null); var result = yield search (null, 0, 4, "", null, out total_matches);
assert (total_matches == 0); assert (total_matches == 0);
assert (result.size == 4); assert (result.size == 4);
} catch (GLib.Error error) { } catch (GLib.Error error) {
...@@ -119,7 +119,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { ...@@ -119,7 +119,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer {
try try
{ {
var result = yield search (null, 10, 4, out total_matches, "", null); var result = yield search (null, 10, 4, "", null, out total_matches);
assert (total_matches == 0); assert (total_matches == 0);
assert (result.size == 0); assert (result.size == 0);
} catch (GLib.Error error) { } catch (GLib.Error error) {
...@@ -128,7 +128,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { ...@@ -128,7 +128,7 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer {
for (int i = 1; i < 10; ++i) { for (int i = 1; i < 10; ++i) {
try { try {
var result = yield search (null, i, 3, out total_matches, "", null); var result = yield search (null, i, 3, "", null, out total_matches);
assert (total_matches == 0); assert (total_matches == 0);
assert (result.size == int.min (10 - i, 3)); assert (result.size == int.min (10 - i, 3));
} catch (GLib.Error error) { } catch (GLib.Error error) {
...@@ -152,16 +152,16 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer { ...@@ -152,16 +152,16 @@ public class TestContainer : MediaContainer, Rygel.SearchableContainer {
public async MediaObjects? search (SearchExpression? expression, public async MediaObjects? search (SearchExpression? expression,
uint offset, uint offset,
uint max_count, uint max_count,
out uint total_matches,
string sort_criteria, string sort_criteria,
Cancellable? cancellable) Cancellable? cancellable,
out uint total_matches)
throws Error { throws Error {
return yield this.simple_search (expression, return yield this.simple_search (expression,
offset, offset,
max_count, max_count,
out total_matches,
sort_criteria ?? this.sort_criteria, sort_criteria ?? this.sort_criteria,
cancellable); cancellable,
out total_matches);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment