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

Method fc

test/stream_parser.cpp:636–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634 // Requires `s` is not represented by an integral type.
635 template<class F>
636 void
637 fc(std::string const& s, F const& f)
638 {
639 char* str_end;
640 double const need =
641 std::strtod(s.c_str(), &str_end);
642 // BOOST_TEST(str_end == &s.back() + 1);
643 double const got = f(s);
644 auto same = got == need;
645 auto close = same ?
646 true : within_1ulp(got, need);
647
648 if( !BOOST_TEST(close) )
649 {
650 std::cerr << "Failure on '" << s << "': " << got << " != " << need << "\n";
651 }
652 }
653
654 void
655 fc(std::string const& s)

Callers

nothing calls this directly

Calls 3

c_strMethod · 0.80
fFunction · 0.70
stringClass · 0.50

Tested by

no test coverage detected