[libcamera-devel] [PATCH v6 2/3] test: Add YamlParser test
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon May 9 19:12:12 CEST 2022
Hi Han-Lin,
Thank you for the patch.
On Wed, Apr 27, 2022 at 10:09:28PM +0800, Han-Lin Chen wrote:
> Add a unit test to exercise the API of the YamlParser class.
>
> Signed-off-by: Han-Lin Chen <hanlinchen at chromium.org>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> test/meson.build | 1 +
> test/yaml-parser.cpp | 494 +++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 495 insertions(+)
> create mode 100644 test/yaml-parser.cpp
>
> diff --git a/test/meson.build b/test/meson.build
> index fd4c5ca0..9c68fae1 100644
> --- a/test/meson.build
> +++ b/test/meson.build
> @@ -54,6 +54,7 @@ internal_tests = [
> ['timer-thread', 'timer-thread.cpp'],
> ['unique-fd', 'unique-fd.cpp'],
> ['utils', 'utils.cpp'],
> + ['yaml-parser', 'yaml-parser.cpp'],
> ]
>
> internal_non_parallel_tests = [
> diff --git a/test/yaml-parser.cpp b/test/yaml-parser.cpp
> new file mode 100644
> index 00000000..e00489db
> --- /dev/null
> +++ b/test/yaml-parser.cpp
> @@ -0,0 +1,494 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * Copyright (C) 2022, Google Inc.
> + *
> + * yaml-parser.cpp - YAML parser operations tests
> + */
> +
> +#include <iostream>
> +#include <string>
> +#include <unistd.h>
> +
> +#include <libcamera/internal/yaml_parser.h>
> +
> +#include "test.h"
> +
> +using namespace std;
> +using namespace libcamera;
I'll sort these alphabetically when applying.
[snip]
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list