MCPcopy Create free account
hub / github.com/boostorg/json / grind_double

Method grind_double

test/double.cpp:200–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198 }
199
200 static
201 void
202 grind_double(string_view s, double v, parse_options const& po = {})
203 {
204 grind(s,
205 [v](value const& jv, const parse_options&)
206 {
207 if(! BOOST_TEST(jv.is_double()))
208 return;
209 if( std::isnan(v) )
210 BOOST_TEST( std::isnan( jv.get_double() ) );
211 else
212 BOOST_TEST( jv.get_double() == v );
213 },
214 po);
215 }
216
217 // Verify that f converts to the
218 // same double produced by `strtod`.

Callers

nothing calls this directly

Calls 2

is_doubleMethod · 0.80
get_doubleMethod · 0.80

Tested by

no test coverage detected