[vala/0.36] tests: Avoid use of g_ptr_array_find() which requires glib >= 2.54



commit 2a4af3618a744f820cd18601814edc7a35caef17
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Nov 12 10:27:45 2018 +0100

    tests: Avoid use of g_ptr_array_find() which requires glib >= 2.54

 tests/basic-types/gptrarray.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]