From f7c6b1228bb0073ebdcab04599e96de0ace31064 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 13 Jul 2020 01:53:24 +0300 Subject: test: Add tests for the Flags class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add tests that exercise the whole API of the Flags class. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- test/flags.cpp | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ test/meson.build | 1 + 2 files changed, 194 insertions(+) create mode 100644 test/flags.cpp diff --git a/test/flags.cpp b/test/flags.cpp new file mode 100644 index 00000000..2177e247 --- /dev/null +++ b/test/flags.cpp @@ -0,0 +1,193 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2020, Google Inc. + * + * flags.cpp - Flags tests + */ + +#include + +#include + +#include "test.h" + +using namespace libcamera; +using namespace std; + +class FlagsTest : public Test +{ +protected: + enum class Option { + First = (1 << 0), + Second = (1 << 1), + Third = (1 << 2), + }; + + using Options = Flags