mreister / libfixmath

Automatically exported from code.google.com/p/libfixmath
0 stars 0 forks source link

fix16_str_unittests fails (MSYS/windows) #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cd unittests
2. make
3. fix16_str_unittests

What is the expected output? What do you see instead?
Expected no issues. Instead there's a bunch of "Value (fix16_t)X gave Y, should 
be 0.00000", where all lines say "should be 0.00000".

What version of the product are you using? On what operating system?
Using MSYS under win7x64
$ gcc --version
gcc.exe (GCC) 4.7.2
$ uname -a
MINGW32_NT-6.1 user 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys

Please provide any additional information below.

Replacing "%0.5lf" with "%0.5f" in the following line in fix16_str_unittests.x 
seems to fix the issue (line 91 currently):
    snprintf(goodbuf, 13, "%0.5lf", fvalue);

According to 
http://stackoverflow.com/questions/4264127/correct-format-specifier-for-double-i
n-printf specifying "l" in printf has no effect, so it should be safe to remove 
it.

Original issue reported on code.google.com by mariano....@gmail.com on 19 Apr 2013 at 3:16

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r89.

Original comment by Petteri.Aimonen on 19 Apr 2013 at 7:36