[PATCH v2 10/17] stdio-common: Add tests for formatted fscanf input specifiers

Andreas Schwab schwab@suse.de
Thu Apr 3 13:09:07 GMT 2025


On Mär 01 2025, Maciej W. Rozycki wrote:

> Index: glibc/stdio-common/tst-scanf-format-f-double.c
> ===================================================================
> --- /dev/null
> +++ glibc/stdio-common/tst-scanf-format-f-double.c
> @@ -0,0 +1,22 @@
> +/* Test for formatted 'fscanf' input for double conversions.
> +   Copyright (C) 2025 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#include "tst-scanf-format-skeleton.h"
> +#include "tst-scanf-format-f.h"
> +#include "tst-scanf-format-real.h"
> +#include "tst-scanf-format-skeleton-double.c"

If tst-scanf-format-real.h would be included in
tst-scanf-format-skeleton-double.c then verify_input and read_real could
be functions istead of macros.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


More information about the Libc-alpha mailing list