[vala/0.40] tests: Add "async constructor argument check" test to increase coverage



commit ee43ede33031f67264e03e972eb55e5e140107f6
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Sep 27 10:38:41 2020 +0200

    tests: Add "async constructor argument check" test to increase coverage

 tests/Makefile.am                                  |  1 +
 tests/asynchronous/constructor-argument-check.vala | 13 +++++++++++++
 2 files changed, 14 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8313e0a4c..eb4abee40 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
index 000000000..22238108a
--- /dev/null
+++ b/tests/asynchronous/constructor-argument-check.vala
@@ -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 ();
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]