assert (foo.ref_count == 1);
}
+unowned Array<Value> check_gvalue_garray (Array<Value> vals) {
+ assert (vals.index (0) == "foo");
+ assert (vals.index (1) == 42);
+ assert (vals.index (2) == 3.1415);
+ return vals;
+}
+
+void test_gvalue_garray () {
+ {
+ var foo = new Array<Value> ();
+ foo.append_val ("foo");
+ foo.append_val (42);
+ foo.append_val (3.1415);
+ check_gvalue_garray (foo);
+ }
+ {
+ Array<Value> foo = new Array<Value> ();
+ foo.append_val ("foo");
+ foo.append_val (42);
+ foo.append_val (3.1415);
+ check_gvalue_garray (foo);
+ }
+}
+
void main () {
test_garray ();
test_int_garray ();
test_struct_garray ();
test_object_garray ();
+ test_gvalue_garray ();
}
}
public void check_type (DataType type) {
+ // Allow any type-argument for GLib.Array
+ if (context != null && context.profile == Profile.GOBJECT
+ && type.type_symbol == garray_type.type_symbol) {
+ return;
+ }
+
foreach (var type_arg in type.get_type_arguments ()) {
check_type (type_arg);
check_type_argument (type_arg);