]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Avoid use of g_ptr_array_find() which requires glib >= 2.54
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 12 Nov 2018 09:27:45 +0000 (10:27 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 12 Nov 2018 11:50:19 +0000 (12:50 +0100)
tests/basic-types/gptrarray.vala

index f32a7330c48d7718214a11daba4ca793b4669fae..6d8aa2d1a3ede10b4393d96c39f98051c2c6d44d 100644 (file)
@@ -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);