Fix BackwardTest failure which was just compiler-drive differences in floating point precision.

BOOST_CHECK_CLOSE's tolerance is proportional to the value on the left, so 0.0 has zero tolerance.  Changed to an explicit range.
This commit is contained in:
Kenneth Heafield 2014-04-09 10:01:19 -07:00
parent ba52fa163b
commit c61231fad9

View File

@ -159,7 +159,9 @@ public:
BOOST_CHECK( oovCount == 0 );
SLOPPY_CHECK_CLOSE( TransformLMScore(p_licenses + p_the_licenses), fullScore, 0.01);
SLOPPY_CHECK_CLOSE( TransformLMScore( 0.0 ), ngramScore, 0.01);
// Check ngramScore is 0.0
BOOST_CHECK_GT(0.0001, ngramScore);
BOOST_CHECK_LT(-0.0001, ngramScore);
}
// the licenses for