bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: %a format in tests-ulc*.c


From: Bruno Haible
Subject: Re: %a format in tests-ulc*.c
Date: Sat, 22 Apr 2017 01:02:44 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; )

Hi Gisle,

> When using MSVC-2015 to build the tests/unistdio/test-ulc-*.c files,
> I get ASSERT() on all the '%a' formats. E.g. in 
> unistdio/test-ulc-vasnprintf1.exe
> and unistdio/test-ulc-printf1.h (line 195):
> 
>      char *result =
>        my_xasprintf ("%a %d", 3.1416015625, 33, 44, 55);
>      ASSERT (result != NULL);
>      ASSERT (strcmp (result, "0x1.922p+1 33") == 0
>              || strcmp (result, "0x3.244p+0 33") == 0
>              || strcmp (result, "0x6.488p-1 33") == 0
>              || strcmp (result, "0xc.91p-2 33") == 0);
> 
> The 'result' I get is '0x1.9220000000000p+1 33'.

Can you provide a patch? To do so, create a testdir

  ./gnulib-tool --create-testdir --dir=../testdir-ulc1 --single-configure \
                 unistdio/ulc-fprintf unistdio/ulc-asprintf 
unistdio/ulc-snprintf \
                 unistdio/ulc-vasnprintf unistdio/ulc-vfprintf

Build it, run "make check", and add '|| strcmp ...' alternatives until the
tests pass.

Can you do this please? I can't, since for me (with MSVC 14 = Visual Studio 2015
on Windows 10), the tests pass.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]