summaryrefslogtreecommitdiff
path: root/tests/test-023.test
blob: b4f073dc165b19dafbe1eeb418a53d6b82089616 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

Program: test

using GLib;

class Maman.Foo : Object {
	public void run () {
		foreach (string s in create_list ()) {
			stdout.printf (" %s", s);
		}
	}

	public List<string> create_list () {
		var s = new List<string>();

		s.append ("2");
		s.append ("3");

		return s;
	}
	
	static int main (string[] args) {
		stdout.printf ("List construction: 1");

		var foo = new Foo ();
		foo.run ();
		
		stdout.printf (" 4\n");

		return 0;
	}
}