From b94b6d886d796a24f4af4d0fffa711116c23b655 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Mon, 26 Feb 2007 22:27:22 +0000 Subject: [PATCH] test enums update MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2007-02-26 Jürg Billeter * tests/test-028.vala, tests/test-028.out: test enums * tests/Makefile.am: update svn path=/trunk/; revision=200 --- vala/ChangeLog | 5 +++++ vala/tests/Makefile.am | 2 ++ vala/tests/test-028.out | 1 + vala/tests/test-028.vala | 30 ++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 vala/tests/test-028.out create mode 100644 vala/tests/test-028.vala diff --git a/vala/ChangeLog b/vala/ChangeLog index 87d6634..c3aa507 100644 --- a/vala/ChangeLog +++ b/vala/ChangeLog @@ -1,5 +1,10 @@ 2007-02-26 Jürg Billeter + * tests/test-028.vala, tests/test-028.out: test enums + * tests/Makefile.am: update + +2007-02-26 Jürg Billeter + * tests/test-027.vala, tests/test-027.out: test postfix and prefix expressions * tests/Makefile.am: update diff --git a/vala/tests/Makefile.am b/vala/tests/Makefile.am index ca342fd..d8d4924 100644 --- a/vala/tests/Makefile.am +++ b/vala/tests/Makefile.am @@ -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) diff --git a/vala/tests/test-028.out b/vala/tests/test-028.out new file mode 100644 index 0000000..d39e190 --- /dev/null +++ b/vala/tests/test-028.out @@ -0,0 +1 @@ +Enum Test: 1 2 3 4 5 6 diff --git a/vala/tests/test-028.vala b/vala/tests/test-028.vala new file mode 100644 index 0000000..1047e46 --- /dev/null +++ b/vala/tests/test-028.vala @@ -0,0 +1,30 @@ +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; + } +} -- 2.7.4