mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
test: controls: control_info: Test default def() values
Extend the ControlInfo test to verify the behaviour of the default 'def' argument to the ControlInfo constructor. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
f0fef545a7
commit
b5ef421e03
1 changed files with 5 additions and 3 deletions
|
@ -27,19 +27,21 @@ protected:
|
|||
ControlInfo brightness;
|
||||
|
||||
if (brightness.min().type() != ControlType::ControlTypeNone ||
|
||||
brightness.max().type() != ControlType::ControlTypeNone) {
|
||||
brightness.max().type() != ControlType::ControlTypeNone ||
|
||||
brightness.def().type() != ControlType::ControlTypeNone) {
|
||||
cout << "Invalid control range for Brightness" << endl;
|
||||
return TestFail;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test information retrieval from a control with a minimum and
|
||||
* a maximum value.
|
||||
* a maximum value, and an implicit default value.
|
||||
*/
|
||||
ControlInfo contrast(10, 200);
|
||||
|
||||
if (contrast.min().get<int32_t>() != 10 ||
|
||||
contrast.max().get<int32_t>() != 200) {
|
||||
contrast.max().get<int32_t>() != 200 ||
|
||||
!contrast.def().isNone()) {
|
||||
cout << "Invalid control range for Contrast" << endl;
|
||||
return TestFail;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue