fix double comparison in histogram test
authorAdam Simpkins <simpkins@fb.com>
Wed, 5 Jul 2017 19:56:00 +0000 (12:56 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 5 Jul 2017 20:05:59 +0000 (13:05 -0700)
commit737be952bfa29e479fb0a48aa48dbab00c4fc9c5
tree7d6b5f428c95ed143d15c6159d23e5b7c10c8f9a
parent7b116ffe3b116ffc3c2089ca0b864ca7ebb1d28c
fix double comparison in histogram test

Summary:
The TestDoubleWidthTooBig test was performing an exact equality check on
two double values. This equality check fails when run on 32-bit
platforms.

Replace the EXPECT_EQ() check with EXPECT_NEAR(), and simply check that
the two values do not differ by more than 1e-14.

Reviewed By: Orvid

Differential Revision: D652767

fbshipit-source-id: 7bf7ed560a4180a2e2d07a6050d1df18e18d1eea
folly/stats/test/HistogramTest.cpp