----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39056/#review101691 -----------------------------------------------------------
src/common/resources.cpp (line 876) <https://reviews.apache.org/r/39056/#comment159146> Can you introduce a `CHECK_DOUBLE_EQ` in `stout/check.hpp`, similar to https://code.google.com/p/googletest/wiki/AdvancedGuide#Floating-Point_Macros To choose a default epsilon, you probably want to check the above link. Gtest uses "Units in the Last Place (ULPs)" as the default. src/v1/resources.cpp (lines 876 - 882) <https://reviews.apache.org/r/39056/#comment159148> Not yours, but too bad we need to duplicate the logic here. I am now sure what will be the long term plan here. If we have 10 versions, do we need to copy the code 10 times... That's not good :( - Jie Yu On Oct. 6, 2015, 9:33 p.m., Mandeep Chadha wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39056/ > ----------------------------------------------------------- > > (Updated Oct. 6, 2015, 9:33 p.m.) > > > Review request for mesos and Neil Conway. > > > Bugs: MESOS-3552 > https://issues.apache.org/jira/browse/MESOS-3552 > > > Repository: mesos > > > Description > ------- > > Check failed due to double comparison : MESOS-3552. > > > Diffs > ----- > > src/common/resources.cpp 601388c35a1bff37c58e753d1870d53b8d0af2d1 > src/tests/reservation_tests.cpp 6b7c43c8b5c64618249dbee926383242320c111e > src/v1/resources.cpp dc868903472f8f3a1ddc56092e3f8f81d953ce39 > > Diff: https://reviews.apache.org/r/39056/diff/ > > > Testing > ------- > > Added unit test. > make check successful. > > > Thanks, > > Mandeep Chadha > >