]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Add test for bug 726347
authorLuca Bruno <lucabru@src.gnome.org>
Sun, 16 Mar 2014 10:35:19 +0000 (11:35 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Sun, 16 Mar 2014 10:35:19 +0000 (11:35 +0100)
tests/Makefile.am
tests/methods/bug726347.vala [new file with mode: 0644]

index 77b2fa032243d4ef2ff218f8446b18e96fff2ec5..cbfd5809f417350725f4b6ce46f2130f274ddf6c 100644 (file)
@@ -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 (file)
index 0000000..8a6cfb1
--- /dev/null
@@ -0,0 +1,16 @@
+class Foo {
+       public int count_strings (...) {
+               var i = 0;
+               var args = va_list();
+               for (string? str = args.arg<string?>(); str != null; str = args.arg<string?>()) {
+                       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