summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2022-01-05 08:25:19 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2022-01-08 12:46:25 +0100
commit0393b1f04a8749e0d71a133af484f0480c63efe9 (patch)
treeedc2d670028701d8e098f55731426571457fb539
parentf676564ffb89d4a95538969a6cd5a2d7d59a6cf5 (diff)
downloadvala-0393b1f04a8749e0d71a133af484f0480c63efe9.tar.gz
tests: Add "async signal handler" test to increase coverage
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/asynchronous/bug602594.vala18
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9c5796cce..4b9aaa2a4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -653,6 +653,7 @@ TESTS = \
asynchronous/bug599568.vala \
asynchronous/bug600827.vala \
asynchronous/bug601558.vala \
+ asynchronous/bug602594.vala \
asynchronous/bug612641.vala \
asynchronous/bug613484.vala \
asynchronous/bug614294.vala \
diff --git a/tests/asynchronous/bug602594.vala b/tests/asynchronous/bug602594.vala
new file mode 100644
index 000000000..5c8129312
--- /dev/null
+++ b/tests/asynchronous/bug602594.vala
@@ -0,0 +1,18 @@
+class Foo {
+ public signal void bar (string s, bool b);
+}
+
+async void callback (string s, bool b) {
+ assert (s == "foo");
+ assert (b);
+ success = true;
+}
+
+bool success = false;
+
+void main() {
+ var foo = new Foo ();
+ foo.bar.connect (callback);
+ foo.bar ("foo", true);
+ assert (success);
+}