[libcamera-devel,v2,2/2] test: represent uninitialised values via ControlTypeNone
diff mbox series

Message ID 20220830202124.457253-2-Rauch.Christian@gmx.de
State Superseded
Headers show
Series
  • [libcamera-devel,v2,1/2] libcamera: control: initialise control info to ControlTypeNone by default
Related show

Commit Message

Christian Rauch Aug. 30, 2022, 8:21 p.m. UTC
Previously, not explicitly initialised values were represented by 0. This
was replaced by ControlTypeNone for better semantics.

Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de>
---
 test/controls/control_info.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
2.34.1

Patch
diff mbox series

diff --git a/test/controls/control_info.cpp b/test/controls/control_info.cpp
index 2827473b..56b4101f 100644
--- a/test/controls/control_info.cpp
+++ b/test/controls/control_info.cpp
@@ -26,8 +26,8 @@  protected:
 		 */
 		ControlInfo brightness;

-		if (brightness.min().get<int32_t>() != 0 ||
-		    brightness.max().get<int32_t>() != 0) {
+		if (brightness.min().type() != ControlType::ControlTypeNone ||
+		    brightness.max().type() != ControlType::ControlTypeNone) {
 			cout << "Invalid control range for Brightness" << endl;
 			return TestFail;
 		}