summaryrefslogtreecommitdiff
path: root/test/serialization
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-27 21:04:06 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-27 23:38:34 +0300
commit256d0a4098aa4c4e9f87db46cecbd66f693dd9bf (patch)
treea038f307faa03919a842aa746e130287135f42d4 /test/serialization
parent96980e35ae64df51fa6830622e776506e9a4cf42 (diff)
test: Use float values for brightness, contrast and saturation
Two tests use the brightness, contrast and saturation controls with integer failures. They were not updated by commit eff4b1aa01c1 which turned those controls into floats. This doesn't cause test failures as the control API converts the value types. For correctness, update the tests to use float values. Fixes: eff4b1aa01c1 ("libcamera: controls: Reorder and update description of existing controls") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'test/serialization')
-rw-r--r--test/serialization/control_serialization.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/serialization/control_serialization.cpp b/test/serialization/control_serialization.cpp
index 2989b527..11136524 100644
--- a/test/serialization/control_serialization.cpp
+++ b/test/serialization/control_serialization.cpp
@@ -42,9 +42,9 @@ protected:
const ControlInfoMap &infoMap = camera_->controls();
ControlList list(infoMap);
- list.set(controls::Brightness, 255);
- list.set(controls::Contrast, 128);
- list.set(controls::Saturation, 50);
+ list.set(controls::Brightness, 0.5f);
+ list.set(controls::Contrast, 1.2f);
+ list.set(controls::Saturation, 0.2f);
/*
* Serialize the control list, this should fail as the control