mirror of
https://github.com/fmtlib/fmt.git
synced 2026-08-03 20:14:20 +02:00
Implement hex specifier
This commit is contained in:
@@ -59,6 +59,12 @@ TEST(scan_test, read_ulonglong) {
|
||||
"invalid input");
|
||||
}
|
||||
|
||||
TEST(scan_test, read_hex) {
|
||||
unsigned n = 0;
|
||||
fmt::scan("2a", "{:x}", n);
|
||||
EXPECT_EQ(n, 42);
|
||||
}
|
||||
|
||||
TEST(scan_test, read_string) {
|
||||
std::string s;
|
||||
fmt::scan("foo", "{}", s);
|
||||
|
||||
Reference in New Issue
Block a user