File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ BOOST_AUTO_TEST_CASE(simple_buffer_float)
190190 BOOST_CHECK (fabs (val2 - val1) <= kEPS );
191191
192192 // check for compact storing of float
193- if (val1 == val1 && val1 == float (int64_t (val1)))
193+ if (val1 == val1 && val1 >= float (std::numeric_limits< int64_t >:: min ()) && val1 <= float (std::numeric_limits< int64_t >:: max ()) && val1 == float (int64_t (val1)))
194194 BOOST_REQUIRE_EQUAL (sbuf.size (),1 );
195195 else
196196 BOOST_REQUIRE_EQUAL (sbuf.data ()[0 ],char (0xca ));
@@ -284,7 +284,7 @@ BOOST_AUTO_TEST_CASE(simple_buffer_double)
284284 BOOST_CHECK (fabs (val2 - val1) <= kEPS );
285285
286286 // check for compact storing of double
287- if (val1 == val1 && val1 == double (int64_t (val1)))
287+ if (val1 == val1 && val1 >= double (std::numeric_limits< int64_t >:: min ()) && val1 <= double (std::numeric_limits< int64_t >:: max ()) && val1 == double (int64_t (val1)))
288288 BOOST_REQUIRE_EQUAL (sbuf.size (),1 );
289289 else
290290 BOOST_REQUIRE_EQUAL (uint8_t (sbuf.data ()[0 ]),uint8_t (0xcb ));
You can’t perform that action at this time.
0 commit comments