From: Luca Bruno Date: Sun, 16 Mar 2014 10:35:19 +0000 (+0100) Subject: Add test for bug 726347 X-Git-Tag: 0.24.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e4974557378ba41dc00566149448b3e375b3a44;p=thirdparty%2Fvala.git Add test for bug 726347 --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 77b2fa032..cbfd5809f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -58,6 +58,7 @@ TESTS = \ methods/bug663210.vala \ methods/bug723009.vala \ methods/bug723195.vala \ + methods/bug726347.vala \ methods/generics.vala \ control-flow/break.vala \ control-flow/expressions-conditional.vala \ diff --git a/tests/methods/bug726347.vala b/tests/methods/bug726347.vala new file mode 100644 index 000000000..8a6cfb10c --- /dev/null +++ b/tests/methods/bug726347.vala @@ -0,0 +1,16 @@ +class Foo { + public int count_strings (...) { + var i = 0; + var args = va_list(); + for (string? str = args.arg(); str != null; str = args.arg()) { + i++; + } + return i; + } +} + +void main() { + var foo = new Foo (); + int count = foo.count_strings ("foo", "bar", "baz"); + assert (count == 3); +} \ No newline at end of file