summaryrefslogtreecommitdiff
path: root/test/serialization/serialization_test.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-10-22 01:58:15 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-11-20 21:47:54 +0200
commitc0b437fd6cf7ca2e91eb749a25539f217722c66e (patch)
treeb1172fd8b79b329a0df2882053a2fa9ef39fbbba /test/serialization/serialization_test.h
parent2c5f0ad23aa40d7410b28e01405c730e75c6cf83 (diff)
test: Add control serialization test
Add a test that exercises the ControlSerializer to serialize and deserialize ControlInfoMap and ControlList. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'test/serialization/serialization_test.h')
-rw-r--r--test/serialization/serialization_test.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/serialization/serialization_test.h b/test/serialization/serialization_test.h
new file mode 100644
index 00000000..fe77221e
--- /dev/null
+++ b/test/serialization/serialization_test.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2019, Google Inc.
+ *
+ * serialization_test.h - Base class for serialization tests
+ */
+#ifndef __LIBCAMERA_SERIALIZATION_TEST_H__
+#define __LIBCAMERA_SERIALIZATION_TEST_H__
+
+#include <libcamera/camera.h>
+#include <libcamera/camera_manager.h>
+#include <libcamera/controls.h>
+
+#include "camera_test.h"
+#include "test.h"
+
+using namespace libcamera;
+
+class SerializationTest : public CameraTest, public Test
+{
+public:
+ SerializationTest()
+ : CameraTest("VIMC Sensor B")
+ {
+ }
+
+ static bool equals(const ControlInfoMap &lhs,
+ const ControlInfoMap &rhs);
+ static bool equals(const ControlList &lhs,
+ const ControlList &rhs);
+};
+
+#endif /* __LIBCAMERA_SERIALIZATION_TEST_H__ */