This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] Add tests for strfrom functions
On Tue, 23 Aug 2016, Gabriel F. T. Gomes wrote:
> +++ b/localedata/tests-mbwc/dat_wcsfrom.c
> @@ -0,0 +1,82 @@
> +/*
> + * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
> + *
> + * FILE: dat_wcsfrom.c
> + *
> + * int wcsfromf (wchar_t *__restrict dest, size_t size,
> + * const char * format, float f)
> + * int wcsfromd (wchar_t *__restrict dest, size_t size,
> + * const char * format, double f)
> + * int wcsfroml (wchar_t *__restrict dest, size_t size,
> + * const char * format, long double f)
> + */
This formatting is particularly strange. Please ensure all new files /
blocks of new code are properly formatted following GNU standards, which
includes having a descriptive comment on the first line followed by a
copyright notice, and no '*' at the start of individual lines of comments
(and not having anything from this comment at all apart from the
description, properly in mixed case, on the first line).
> + /*01*/
> + /*I*/
> + {0.0},
Bad formatting for comments, missing spaces after '{' and before '}'.
> + STRFROM(FTOSTR) (fstr, sizeof (fstr), "%g", f); \
> + STRFROM(FTOSTR) (fcntstr, sizeof (fstr), "%g", (FTYPE) cnt); \
Missing spaces before '(', as in many places in this patch, and I'm
doubtful that refactoring existing tests belongs in this patch; it would
better be separated.
> diff --git a/stdlib/tst-strfrom.c b/stdlib/tst-strfrom.c
> +#include <locale/localeinfo.h>
Why is this internal header used in a test?
--
Joseph S. Myers
joseph@codesourcery.com