[geary/wip/integration-tests: 1/3] Add TestCase.async_complete_full method to avoid requiring a lambda
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/integration-tests: 1/3] Add TestCase.async_complete_full method to avoid requiring a lambda
- Date: Sat, 30 Mar 2019 14:43:08 +0000 (UTC)
commit 60a3f9346db71687d7a42a9cd0b1627e040f6cf3
Author: Michael Gratton <mike vee net>
Date: Sun Mar 31 01:29:52 2019 +1100
Add TestCase.async_complete_full method to avoid requiring a lambda
test/test-case.vala | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/test/test-case.vala b/test/test-case.vala
index 5e1095c8..7e65603d 100644
--- a/test/test-case.vala
+++ b/test/test-case.vala
@@ -256,6 +256,14 @@ public abstract class TestCase : Object {
this.main_loop.wakeup();
}
+ protected void async_complete_full(GLib.Object? object,
+ AsyncResult result) {
+ this.async_results.push(result);
+ // notify the loop so that if async_result() has already been
+ // called, that method won't block
+ this.main_loop.wakeup();
+ }
+
protected AsyncResult async_result() {
AsyncResult? result = null;
while (result == null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]