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>
This commit is contained in:
Laurent Pinchart 2020-01-03 01:41:41 +02:00
parent a023aed1aa
commit 7141ac74fd

View file

@ -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;
}