gecko-dev/mozglue/tests/glibc_printf_tests
Mike Hommey 88b97ce29a Bug 1686831 - Use double-conversion for mozilla::PrintfTarget::cvt_f. r=nika
This makes mozilla::PrintfTarget consistent across all locales (not
printing e.g. "," instead of "." for the decimal point in floats in some
locales)

This implementation passes all the glibc tests in stdio-common/tfformat.c
except two tests because of the difference in how values like e.g 0.25 are
rounded. Printf in glibc and on MacOS, as well as Rust std::fmt, round to
nearest, ties to even. Double-conversion, as well as printf on Windows
and conversion functions in ECMAScript round to nearest, ties away from
zero.

The standard for printf says rounding is implementation-defined so
either way is technically correct.

Differential Revision: https://phabricator.services.mozilla.com/D102699
2021-01-29 04:25:54 +00:00
..
COPYING Bug 1686831 - Import glibc printf test cases verbatim. r=mhoye 2021-01-28 09:48:53 +00:00
COPYING.LIB Bug 1686831 - Import glibc printf test cases verbatim. r=mhoye 2021-01-28 09:48:53 +00:00
README.MOZILLA Bug 1686831 - Import glibc printf test cases verbatim. r=mhoye 2021-01-28 09:48:53 +00:00
tfformat.c Bug 1686831 - Use double-conversion for mozilla::PrintfTarget::cvt_f. r=nika 2021-01-29 04:25:54 +00:00
tiformat.c Bug 1686831 - Import glibc printf test cases verbatim. r=mhoye 2021-01-28 09:48:53 +00:00
tllformat.c Bug 1686831 - Import glibc printf test cases verbatim. r=mhoye 2021-01-28 09:48:53 +00:00

README.MOZILLA

The files in this directory were copied from the stdio-common subdirectory
in glibc (https://sourceware.org/git/glibc.git).