mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
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:
parent
a023aed1aa
commit
7141ac74fd
1 changed files with 12 additions and 0 deletions
|
@ -49,6 +49,10 @@ public:
|
||||||
value_ = value;
|
value_ = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void methodWithReference(const int &value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Status status_;
|
Status status_;
|
||||||
int value_;
|
int value_;
|
||||||
|
@ -119,6 +123,14 @@ protected:
|
||||||
return TestFail;
|
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;
|
return TestPass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue