From 134904c886195b40e86b6b60af1fa9c1bd77c695 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 26 Apr 2019 17:07:37 -0700 Subject: [PATCH] Re-enabled constexpr tests --- test/format-test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);