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

Function TEST

test/scan-test.cc:17–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include "gtest-extra.h"
16
17TEST(scan_test, read_text) {
18 fmt::string_view s = "foo";
19 auto end = fmt::scan_to(s, "foo");
20 EXPECT_EQ(end, s.end());
21 EXPECT_THROW_MSG(fmt::scan<int>("fob", "foo"), fmt::format_error,
22 "invalid input");
23}
24
25TEST(scan_test, read_int) {
26 EXPECT_EQ(fmt::scan<int>("42", "{}")->value(), 42);

Callers

nothing calls this directly

Calls 15

scan_toFunction · 0.85
to_stringFunction · 0.85
rangeMethod · 0.80
valuesMethod · 0.80
errorMethod · 0.80
formatFunction · 0.70
endMethod · 0.45
valueMethod · 0.45
beginMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected