summaryrefslogtreecommitdiff
path: root/test/object-invoke.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-03 01:41:41 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-03 13:59:05 +0200
commit7141ac74fd282cfe62de1a61a1f0edaee3c14d8e (patch)
treefd45c478bbe4dcc3db0a2a77ee0f519004a5a0fe /test/object-invoke.cpp
parenta023aed1aa5ae3554d193ebd0a2102ec676ddd14 (diff)
test: object-invoke: Test invocation of method taking a reference argument
Object::invokeMethod() fails with a compilation error when the invoked method takes a reference argument. Add a test case for this issue. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'test/object-invoke.cpp')
-rw-r--r--test/object-invoke.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp
index 560adee1..f9a8bea9 100644
--- a/test/object-invoke.cpp
+++ b/test/object-invoke.cpp
@@ -49,6 +49,10 @@ public:
value_ = value;
}
+ void methodWithReference(const int &value)
+ {
+ }
+
private:
Status status_;
int value_;
@@ -119,6 +123,14 @@ protected:
return TestFail;
}
+ /*
+ * Test invoking a method that takes reference arguments. This
+ * targets compilation, there's no need to check runtime
+ * results.
+ */
+ object_.invokeMethod(&InvokedObject::methodWithReference,
+ ConnectionTypeBlocking, 42);
+
return TestPass;
}