Add tests for FMT_ENFORCE_COMPILE_STRING, fix several errors (#2038)

This commit is contained in:
Walter Gray
2020-12-24 06:40:46 -08:00
committed by GitHub
parent aa89e380d9
commit 4fa4c9248f
7 changed files with 145 additions and 60 deletions
+5
View File
@@ -51,6 +51,11 @@ TEST(RangesTest, FormatMap) {
EXPECT_EQ("{(\"one\", 1), (\"two\", 2)}", fmt::format("{}", simap));
}
TEST(RangesTest, FormatArrayOfLiterals) {
const char* aol[] = {"1234", "abcd"};
EXPECT_EQ("{\"1234\", \"abcd\"}", fmt::format("{}", aol));
}
TEST(RangesTest, FormatPair) {
std::pair<int64_t, float> pa1{42, 1.5f};
EXPECT_EQ("(42, 1.5)", fmt::format("{}", pa1));