diff --git a/test/format-test.cc b/test/format-test.cc index 866f2ae6..e1547cb1 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -2419,7 +2419,7 @@ TEST(FormatTest, FormatStringErrors) { EXPECT_ERROR_NOARGS("foo", FMT_NULL); EXPECT_ERROR_NOARGS("}", "unmatched '}' in format string"); EXPECT_ERROR("{0:s", "unknown format specifier", Date); -# ifndef _MSC_VER +# if FMT_MSC_VER >= 1916 // This causes an internal compiler error in MSVC2017. EXPECT_ERROR("{0:=5", "unknown format specifier", int); EXPECT_ERROR("{:{<}", "invalid fill character '{'", int); @@ -2450,6 +2450,8 @@ TEST(FormatTest, FormatStringErrors) { EXPECT_ERROR("{:d}", "invalid type specifier", const char*); EXPECT_ERROR("{:d}", "invalid type specifier", std::string); EXPECT_ERROR("{:s}", "invalid type specifier", void*); +# else + fmt::print("warning: constexpr is broken in this versio of MSVC\n"); # endif EXPECT_ERROR("{foo", "compile-time checks don't support named arguments", int);