summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/object-invoke.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp
index f9a8bea9..ed16de99 100644
--- a/test/object-invoke.cpp
+++ b/test/object-invoke.cpp
@@ -123,6 +123,27 @@ protected:
return TestFail;
}
+ /* Test that direct method invocation bypasses threads. */
+ object_.reset();
+ object_.invokeMethod(&InvokedObject::method,
+ ConnectionTypeDirect, 42);
+
+ switch (object_.status()) {
+ case InvokedObject::NoCall:
+ cout << "Method not invoked for custom thread" << endl;
+ return TestFail;
+ case InvokedObject::CallReceived:
+ cout << "Method invoked in incorrect thread for direct call" << endl;
+ return TestFail;
+ default:
+ break;
+ }
+
+ if (object_.value() != 42) {
+ cout << "Method invoked with incorrect value for direct call" << endl;
+ return TestFail;
+ }
+
/*
* Test invoking a method that takes reference arguments. This
* targets compilation, there's no need to check runtime