eBay / tsv-utils

eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.
https://ebay.github.io/tsv-utils/
Boost Software License 1.0
1.43k stars 80 forks source link

Try re-enabling the formatNumber rounding tests with 64-bit Windows builds #319

Closed jondegenhardt closed 4 years ago

jondegenhardt commented 4 years ago

On at least some subsets the problems were a result of using 32 bit builds on Windows.

At present it comes down to two test cases that fail on Windows 64-bit builds. It's due to deltas in the underlying call to the std.format.format function between Windows and Unix/MacOs platforms. The calls (format("%.*f", 0, 0.6) and format("%.*f", 0, -0.6) should return "1" and "-1" respectively, but instead return "0" and "-0". The Unix and MacOS platforms return the correct results.

Despite the discrepancy, this is a smaller set than was excluded under 32-bit builds. On 32-bit, it was appearing as if truncation rather than rounding was more widespread.

The formatNumber tests succeed for both DMD and LDC. However, LDC unit test builds are not enabled due to small differences in printed random values in tsv-sample tests.

codecov-commenter commented 4 years ago

Codecov Report

Merging #319 into master will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #319   +/-   ##
=======================================
  Coverage   99.34%   99.34%           
=======================================
  Files          18       18           
  Lines        7068     7070    +2     
=======================================
+ Hits         7022     7024    +2     
  Misses         46       46           
Impacted Files Coverage Δ
common/src/tsv_utils/common/numerics.d 99.21% <100.00%> (+<0.01%) :arrow_up: