zephyr/tests/lib
Nicolas Pitre 90ec5360be prf.c: fix wrong results with %g conversion
The precision parameter to the %g conversion indicates the maximum
number of significant digits and not the number of digits to appear
after the radix character. Here's a few examples this patch fixes:

                                expected        before
----------------------------------------------------------
printf("%.3g", 150.12)          150             150.12
printf("%.2g", 150.1)           1.5e+02         150.1
printf("%#.3g", 150.)           150.            150.000
printf("%#.2g", 15e-5)          0.00015         0.00
printf("%#.4g", 1505e-7)        0.0001505       0.0002
printf("%#.4g", 1505e-8)        1.505e-05       1.5050e-05

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-14 23:07:44 -04:00
..
base64 cleanup: include/: move base64.h to sys/base64.h 2019-06-27 22:55:49 -04:00
c_lib tests: clib: Make sure ssize_t type is signed 2019-07-09 21:55:05 +03:00
crc tests: crc: convert to regular test case 2019-07-06 00:31:04 +02:00
json tests: json: improve code coverage 2019-07-02 22:56:53 -04:00
mem_alloc tests: mem_alloc: don't set main thread size 2019-07-01 14:30:48 -07:00
rbtree cleanup: include/: move misc/rb.h to sys/rb.h 2019-06-27 22:55:49 -04:00
ringbuffer cleanup: include/: move ring_buffer.h to sys/ring_buffer.h 2019-06-27 22:55:49 -04:00
sprintf prf.c: fix wrong results with %g conversion 2019-07-14 23:07:44 -04:00