| 15 | #include "gtest-extra.h" |
| 16 | |
| 17 | TEST(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 | |
| 25 | TEST(scan_test, read_int) { |
| 26 | EXPECT_EQ(fmt::scan<int>("42", "{}")->value(), 42); |
nothing calls this directly
no test coverage detected