tests: Add various regression "codegen" tests to increase coverage
[vala-gnome.git] / tests / delegates / wrapper.vala
blob01b95188edc3905ee127a670b1458dd329d1553e
1 delegate void FooFunc ([CCode (array_length = false, array_null_terminated = true)] string[] a);
2 delegate void BarFunc (owned FooFunc func);
4 void foo (string[] a) {
5 assert (a.length == 2);
6 assert (a[1] == "bar");
9 void bar (owned FooFunc func) {
10 string[] ia = { "foo", "bar" };
11 func (ia);
14 void main () {
15 FooFunc f = foo;
16 BarFunc b = bar;
17 b ((owned) f);