| 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`. |
nothing calls this directly
no test coverage detected