summaryrefslogtreecommitdiff
path: root/test/controls/control_info.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/controls/control_info.cpp')
-rw-r--r--test/controls/control_info.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/controls/control_info.cpp b/test/controls/control_info.cpp
index 1e05e131..2827473b 100644
--- a/test/controls/control_info.cpp
+++ b/test/controls/control_info.cpp
@@ -44,6 +44,39 @@ protected:
return TestFail;
}
+ /*
+ * Test information retrieval from a control with boolean
+ * values.
+ */
+ ControlInfo aeEnable({ false, true }, false);
+
+ if (aeEnable.min().get<bool>() != false ||
+ aeEnable.def().get<bool>() != false ||
+ aeEnable.max().get<bool>() != true) {
+ cout << "Invalid control range for AeEnable" << endl;
+ return TestFail;
+ }
+
+ if (aeEnable.values()[0].get<bool>() != false ||
+ aeEnable.values()[1].get<bool>() != true) {
+ cout << "Invalid control values for AeEnable" << endl;
+ return TestFail;
+ }
+
+ ControlInfo awbEnable(true);
+
+ if (awbEnable.min().get<bool>() != true ||
+ awbEnable.def().get<bool>() != true ||
+ awbEnable.max().get<bool>() != true) {
+ cout << "Invalid control range for AwbEnable" << endl;
+ return TestFail;
+ }
+
+ if (awbEnable.values()[0].get<bool>() != true) {
+ cout << "Invalid control values for AwbEnable" << endl;
+ return TestFail;
+ }
+
return TestPass;
}
};