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>
This commit is contained in:
parent
2c5f0ad23a
commit
c0b437fd6c
5 changed files with 300 additions and 0 deletions
33
test/serialization/serialization_test.h
Normal file
33
test/serialization/serialization_test.h
Normal file
|
@ -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__ */
|
Loading…
Add table
Add a link
Reference in a new issue