gecko0307 / dlib

Allocators, I/O streams, math, geometry, image and audio processing for D
https://gecko0307.github.io/dlib
Boost Software License 1.0
217 stars 34 forks source link

Fix modification time test when higher precision is used on linux #137

Closed FreeSlave closed 6 years ago

FreeSlave commented 6 years ago

Tests failed on my machine because phobos used higher precision for modification time. Note that this may fail on other platform too. To be sure we need to copy and use the whole function https://github.com/dlang/phobos/blob/0a434259c07bfb8c49e1694e54c7762f61f69918/std/file.d#L936 but I'm not really comfortable with such copy-pasting. What do you think?

Other possible solution is to remove fractional seconds before comparison in unittest.

codecov-io commented 6 years ago

Codecov Report

Merging #137 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
+ Coverage   30.43%   30.45%   +0.01%     
==========================================
  Files         106      106              
  Lines        7652     7654       +2     
==========================================
+ Hits         2329     2331       +2     
  Misses       5323     5323
Impacted Files Coverage Δ
dlib/filesystem/local.d 80.17% <100%> (+0.34%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 124f3fb...b28da30. Read the comment docs.

gecko0307 commented 6 years ago

Could you point out which tests fail, and under what system? Travis doesn't show anything.

FreeSlave commented 6 years ago

I meant this one https://github.com/FreeSlave/dlib/blob/b28da30751f126f8ee07d2bec436a0881d5b0f7d/dlib/filesystem/local.d#L437 My system is Debian 9 Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux.