summaryrefslogtreecommitdiff
path: root/tests/test-035.vala
blob: f5230facbce0c44e8078437ebd0aeae4ad6726d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using GLib;

class SwitchTest : Object {
    static void main () {
        var foo = "Hello World";
        var bar = 0;

        stdout.printf ("before switch: %s\n", foo);

	switch (bar) {
	    case 0:
		stdout.printf ("within switch: %s\n", foo);
		break;
	}

        stdout.printf ("behind switch: %s\n", foo);
    }
}