]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add "async constructor argument check" test to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 27 Sep 2020 08:38:41 +0000 (10:38 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 29 Sep 2020 10:26:52 +0000 (12:26 +0200)
tests/Makefile.am
tests/asynchronous/constructor-argument-check.vala [new file with mode: 0644]

index 8313e0a4c7a6efbc080b9b1c8e1baa91945ce561..eb4abee40dec63695aa0ad35c7d9b5837ce1adde 100644 (file)
@@ -511,6 +511,7 @@ TESTS = \
        asynchronous/catch-in-finally.vala \
        asynchronous/creation-missing-yield.test \
        asynchronous/closures.vala \
+       asynchronous/constructor-argument-check.vala \
        asynchronous/generator.vala \
        asynchronous/result-pos.vala \
        asynchronous/variadic-invalid.test \
diff --git a/tests/asynchronous/constructor-argument-check.vala b/tests/asynchronous/constructor-argument-check.vala
new file mode 100644 (file)
index 0000000..2223810
--- /dev/null
@@ -0,0 +1,13 @@
+class Foo {
+       public async Foo (string bar) {
+               assert (bar == "foo");
+       }
+}
+
+async void run () {
+       yield new Foo ("foo");
+}
+
+void main () {
+       run.begin ();
+}