From: Rico Tzschichholz Date: Mon, 12 Nov 2018 09:27:45 +0000 (+0100) Subject: tests: Avoid use of g_ptr_array_find() which requires glib >= 2.54 X-Git-Tag: 0.43.1~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28c9e2f7788c1027be39eaaf0076f01268faca43;p=thirdparty%2Fvala.git tests: Avoid use of g_ptr_array_find() which requires glib >= 2.54 --- diff --git a/tests/basic-types/gptrarray.vala b/tests/basic-types/gptrarray.vala index f32a7330c..6d8aa2d1a 100644 --- a/tests/basic-types/gptrarray.vala +++ b/tests/basic-types/gptrarray.vala @@ -41,11 +41,13 @@ void main () { assert (foo4.ref_count == 1); assert (array.length == 3); +#if GLIB_2_54 uint index; assert (array.find (foo5, out index)); assert (foo5.ref_count == 2); assert (index == 1); assert (array.length == 3); +#endif array.sort (compare_foo); array.sort_with_data (compare_foo); @@ -86,11 +88,13 @@ void main () { assert (foo4.ref_count == 1); assert (array.length == 3); +#if GLIB_2_54 uint index; assert (array.find (foo5, out index)); assert (foo5.ref_count == 1); assert (index == 1); assert (array.length == 3); +#endif array.sort (compare_foo); array.sort_with_data (compare_foo);