[FFmpeg-devel] [PATCH 2/2] Added more tests to libavutil/parseutils.c

Petru Rares Sincraian psincraian at outlook.com
Thu Mar 24 16:25:06 CET 2016


Solved :)

Thanks,
Petru Rares.

________________________________________
From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> on behalf of Michael Niedermayer <michael at niedermayer.cc>
Sent: Thursday, March 24, 2016 4:04 AM
To: FFmpeg development discussions and patches
Subject: Re: [FFmpeg-devel] [PATCH 2/2] Added more tests to     libavutil/parseutils.c

On Wed, Mar 23, 2016 at 03:33:02PM +0000, Petru Rares Sincraian wrote:
>
>     - Added tests for av_find_info_tag().
>     - Added test for av_get_known_color_name()
> ---
>  libavutil/parseutils.c    |  37 ++++++++++++
>  tests/ref/fate/parseutils | 151 ++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 188 insertions(+)
>
> diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
> index 43bd4eb..a782ef6 100644
> --- a/libavutil/parseutils.c
> +++ b/libavutil/parseutils.c
> @@ -922,6 +922,38 @@ static void test_av_parse_time(void)
>      }
>  }
>
> +static void test_av_get_known_color_name(void)
> +{
> +    int i;
> +    const uint8_t *rgba;
> +    const char *color;
> +
> +    for (i = 0; i < FF_ARRAY_ELEMS(color_table); ++i) {
> +        color = av_get_known_color_name(i, &rgba);

> +        if (color) {
> +        printf("%s -> R(%d) G(%d) B(%d) A(%d)\n",
> +                color, rgba[0], rgba[1], rgba[2], rgba[3]);
> +        }
> +        else

that code looks oddly formated


> +            printf("Color ID: %d not found\n", i);
> +    }
> +}
> +
> +static void test_av_find_info_tag(void)
> +{
> +    char args[] = "?tag1=val1&tag2=val2&tag3=val3&tag41=value 41&tag42=random1";
> +    const char *tags[] = {"tag1", "tag2", "tag3", "tag4", "tag41", "41", "random1"};

static const


[...]
--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Added-more-tests-to-libavutil-parseutils.c.patch
Type: text/x-patch
Size: 8093 bytes
Desc: 0002-Added-more-tests-to-libavutil-parseutils.c.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160324/99e75be5/attachment.bin>


More information about the ffmpeg-devel mailing list