Pass absolute paths to corpus.
The corpus needs to be single files with one sample each.
Add a Python script that converts files with multiple samples into
single files.
Instead of filling a temporary buffer we can decompose a number like
"x.yyyEz" to "(x * 10^3 + yyy) * 10^(z - 3)"
I.e. we subtract from the exponent what is required as an exponent to
make the fractional into an integer significant.
For the simple case of "xEz" we just do "x * 10^z".
This requires additional range checks before multiplying but avoids
extra memory accesses.
`boost::charconv::detail::parser` is not made for parsing (large)
integers in exponential notation.
It is mainly tested for parsing floating point numbers in hexadecimal format.
Given we know ICU will output either an integer string or a number in
"E notation" (1.2E2) we can convert that rather easily to a "regular"
integer string by "moving" the dot to the right according to the
exponent. The trailing gap is filled with zeros before passing it to
`from_chars` which is now able to handle the range checks for us.
This avoids overflows that can happen when multiplying the
significant by the exponent which, due to integer arithmetic, would be
cumbersome to guard against.
Any situation that could yield a fractional or a too large value can be caught early.
ICU doesn't support uint64_t directly but provides access to formatting
and parsing of decimal number strings.
Use Boost.Charconv to interface with that.
Fixes#235
As reported in #235 formatting the first number which doesn't fit into
int64_t anymore fails to add the thousands separators.
I.e.:
`9223372036854775807` -> `9,223,372,036,854,775,807`
`9223372036854775808` -> `9223372036854775808`
Add a test reproducing that that for all backends.
The shorter paths make the sources easier to navigate.
Basically revert of #99 / f44b3bb771f01fb94614260d57e1d09cdfe1cdff
after the underlying issue is resolved.
Recompiling with different options/defines might remove covered lines
that no longer exist.
This is e.g. the case for the IConv code paths when compiling with ICU
and without IConv in the last test run before collecting the coverage
data.
To avoid this collect coverage data after each test run into separate
files and upload all of them.
A lot of checks and a major workaround are for ICU 4.8 or earlier which
can be removed.
An annoying bug (Parsing of timezones like "GMT" in "full" format followed by unrelated text)
fixed in 4.8.1 is worth avoiding by requiring this version over 4.8.0.
StringPiece is only available in 4.2+ and is required for proper parsing
and formatting.
As this version is now "old enough", just assume 4.2+ removing many
conditionals.
Speed up the configuration step:
- defaulted moves implies defaulted functions and rvalues
-> Clang 3.0, MSVC 19.0/2015
-> decltype, noexcept, auto & variadic templates also available in all compilers that support those
- override requires GCC 4.7+
- hdr type_traits implies hdr functional for all known stdlibs