Commit b94b6d88 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

test enums update

2007-02-26  Jürg Billeter  <j@bitron.ch>

	* tests/test-028.vala, tests/test-028.out: test enums
	* tests/Makefile.am: update

svn path=/trunk/; revision=200
parent f50532e7
2007-02-26 Jürg Billeter <j@bitron.ch>
* tests/test-028.vala, tests/test-028.out: test enums
* tests/Makefile.am: update
2007-02-26 Jürg Billeter <j@bitron.ch>
* tests/test-027.vala, tests/test-027.out: test postfix and prefix
......
......@@ -30,6 +30,7 @@ TESTS = \
test-025.vala \
test-026.vala \
test-027.vala \
test-028.vala \
$(NULL)
EXTRA_DIST = \
......@@ -62,4 +63,5 @@ EXTRA_DIST = \
test-025.out \
test-026.out \
test-027.out \
test-028.out \
$(NULL)
Enum Test: 1 2 3 4 5 6
using GLib;
enum Maman.Foo {
VAL2 = 2,
VAL3,
VAL5 = 5
}
class Maman.Bar {
public void run () {
stdout.printf (" %d", Foo.VAL2);
stdout.printf (" %d", Foo.VAL3);
stdout.printf (" 4");
stdout.printf (" %d", Foo.VAL5);
}
static int main (string[] args) {
stdout.printf ("Enum Test: 1");
var bar = new Bar ();
bar.run ();
stdout.printf (" 6\n");
return 0;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment