summaryrefslogtreecommitdiff
path: root/test/controls
diff options
context:
space:
mode:
Diffstat (limited to 'test/controls')
-rw-r--r--test/controls/control_list.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp
index 8469ecf0..1bcfecc4 100644
--- a/test/controls/control_list.cpp
+++ b/test/controls/control_list.cpp
@@ -12,6 +12,7 @@
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
+#include "camera_controls.h"
#include "test.h"
using namespace std;
@@ -40,7 +41,8 @@ protected:
int run()
{
- ControlList list(camera_.get());
+ CameraControlValidator validator(camera_.get());
+ ControlList list(&validator);
/* Test that the list is initially empty. */
if (!list.empty()) {
@@ -141,6 +143,17 @@ protected:
return TestFail;
}
+ /*
+ * Attempt to set an invalid control and verify that the
+ * operation failed.
+ */
+ list.set(controls::AwbEnable, true);
+
+ if (list.contains(controls::AwbEnable)) {
+ cout << "List shouldn't contain AwbEnable control" << endl;
+ return TestFail;
+ }
+
return TestPass;
}