MCPcopy Create free account
hub / github.com/fmtlib/fmt / LLVMFuzzerTestOneInput

Function LLVMFuzzerTestOneInput

test/fuzzing/float.cc:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
32 if (size <= sizeof(double) || !std::numeric_limits<double>::is_iec559)
33 return 0;
34 check_round_trip("{}", assign_from_buf<double>(data));
35 // A larger than necessary precision is used to trigger the fallback
36 // formatter.
37 check_round_trip("{:.50g}", assign_from_buf<double>(data));
38 return 0;
39}

Callers 1

mainFunction · 0.70

Calls 1

check_round_tripFunction · 0.85

Tested by

no test coverage detected