From 9654d1f64a216214304706802fab19a71eaf5cf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Mon, 29 Apr 2019 20:00:39 +0200 Subject: test: media_device: Create a common MediaDeviceTest base class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before adding more tests which will act on the vimc pipeline break out a common base from media_device_link_test.cpp which already acts on vimc. The new common base class will help reduce code duplication. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- test/media_device/media_device_test.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 test/media_device/media_device_test.h (limited to 'test/media_device/media_device_test.h') diff --git a/test/media_device/media_device_test.h b/test/media_device/media_device_test.h new file mode 100644 index 00000000..cdbd1484 --- /dev/null +++ b/test/media_device/media_device_test.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2019, Google Inc. + * + * media_device_test.h - libcamera media device test base class + */ +#ifndef __LIBCAMERA_MEDIADEVICE_TEST_H__ +#define __LIBCAMERA_MEDIADEVICE_TEST_H__ + +#include + +#include "device_enumerator.h" +#include "media_device.h" + +#include "test.h" + +using namespace libcamera; + +class MediaDeviceTest : public Test +{ +public: + MediaDeviceTest() + : media_(nullptr), enumerator_(nullptr) {} + +protected: + int init(); + + std::shared_ptr media_; + +private: + std::unique_ptr enumerator_; +}; + +#endif /* __LIBCAMERA_MEDIADEVICE_TEST_H__ */ -- cgit v1.2.1