LIU Hao wrote:
> Besides, unrelated to this change, there are some erroneous assertions:
>
> diff --git a/mingw-w64-crt/testcases/t_wcrtomb.c
> b/mingw-w64-crt/testcases/t_wcrtomb.c
> index f7186c570..713ff1471 100644
> --- a/mingw-w64-crt/testcases/t_wcrtomb.c
> +++ b/mingw-w64-crt/testcases/t_wcrtomb.c
> @@ -112,7 +112,7 @@ int main (void) {
>
> assert (wcrtomb (&c, wc, &state) == (size_t) -1);
> assert (c == EOF);
> - assert (errno = EILSEQ);
> + assert (errno == EILSEQ);
> assert (mbsinit (&state));
>
> // reset errno
> @@ -196,7 +196,7 @@ int main (void) {
> assert (wcrtomb (&c, wc, &state) == (size_t) -1);
> /* This assertion fails with CRT's version */
> assert (c == EOF);
> - assert (errno = EILSEQ);
> + assert (errno == EILSEQ);
> assert (mbsinit (&state));
>
> // reset errno
> @@ -263,7 +263,7 @@ skip_sbcs:
> assert (wcrtomb (&c, wc, &state) == (size_t) -1);
> /* This assertion fails with CRT's version */
> assert (c == EOF);
> - assert (errno = EILSEQ);
> + assert (errno == EILSEQ);
> assert (mbsinit (&state));
>
> // reset errno
Whoa, that's a nice catch! So, we had a few broken assertions for a year, ever
since these tests were added? Would you like me to send a separate patch for it?
- Kirill Makurin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public