[vala/0.48] tests: Add "async constructor argument check" test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] tests: Add "async constructor argument check" test to increase coverage
- Date: Tue, 29 Sep 2020 07:30:07 +0000 (UTC)
commit 680354cfa7416ead9faa6bbac6dbd4d5d867e945
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 9c7a571f6..3e3afc8ad 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -588,6 +588,7 @@ TESTS = \
asynchronous/catch-in-finally.vala \
asynchronous/creation-missing-yield.test \
asynchronous/closures.vala \
+ asynchronous/constructor-argument-check.vala \
asynchronous/finish-name.vala \
asynchronous/generator.vala \
asynchronous/out-parameter-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]