diff options
| author | Marvin W <git@larma.de> | 2026-10-04 17:49:16 +0200 |
|---|---|---|
| committer | Marvin W <git@larma.de> | 2026-10-23 17:01:41 +0200 |
| commit | 630b1368331ef0034b343bd2f00b116c8cd90391 (patch) | |
| tree | 30afc5a4471d084d7f074fce24df9a8d945b5084 /xmpp-vala/tests/testcase.vala | |
| parent | ec4ca2a4642552b8424e7703840cd37e371e9e00 (diff) | |
Fix some warnings
Diffstat (limited to 'xmpp-vala/tests/testcase.vala')
| -rw-r--r-- | xmpp-vala/tests/testcase.vala | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xmpp-vala/tests/testcase.vala b/xmpp-vala/tests/testcase.vala index 178b6353..10da78f6 100644 --- a/xmpp-vala/tests/testcase.vala +++ b/xmpp-vala/tests/testcase.vala @@ -62,7 +62,7 @@ public abstract class Gee.TestCase : Object { namespace Gee { public delegate void TestMethod (); - public delegate void TestFinishedCallback (); + public delegate void TestFinishedCallback (GLib.Error? error = null); public delegate void AsyncTestMethod (TestFinishedCallback cb); } @@ -128,8 +128,15 @@ private class Gee.TestAsyncAdaptor : Object, TestAdaptor { main_loop.run (); } - public void finish () { - Idle.add (() => { main_loop.quit (); return false; }); + public void finish (GLib.Error? error = null) { + Idle.add(() => { + main_loop.quit(); + if (error != null) { + Test.fail(); + Test.message("Error: %s", error.message); + } + return false; + }); } public bool finish_timeout () { |
