From cc4a9951ebd60e6e652814bdee1b87bc9539562f Mon Sep 17 00:00:00 2001 From: Alexey Ochapov Date: Tue, 22 Dec 2020 23:46:23 +0300 Subject: [PATCH] add test for byte formatting with `FMT_COMPILE` --- test/compile-test.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/compile-test.cc b/test/compile-test.cc index 4038ac58..bd790236 100644 --- a/test/compile-test.cc +++ b/test/compile-test.cc @@ -133,6 +133,9 @@ TEST(CompileTest, FormatDefault) { EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), "foo")); EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), std::string("foo"))); EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), test_formattable())); +# ifdef __cpp_lib_byte + EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), std::byte{42})); +# endif } TEST(CompileTest, FormatWideString) {