From dc104cbaaa5e1ed921e4d3256661982de81f4207 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 18 Nov 2017 08:38:58 -0800 Subject: [PATCH] Workaround internal compiler errors in MSVC --- test/format-test.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/format-test.cc b/test/format-test.cc index 13c39692..f10cd472 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1877,18 +1877,6 @@ TEST(FormatTest, FormatStringErrors) { EXPECT_ERROR("{:x}", "argument index out of range"); EXPECT_ERROR("{:=}", "format specifier requires numeric argument", const char *); -#endif - EXPECT_ERROR("{foo", "missing '}' in format string", int); - EXPECT_ERROR("{10000000000}", "number is too big"); - EXPECT_ERROR("{0x}", "invalid format string"); - EXPECT_ERROR("{-}", "invalid format string"); - EXPECT_ERROR("{:{0x}}", "invalid format string", int); - EXPECT_ERROR("{:{-}}", "invalid format string", int); - EXPECT_ERROR("{:.{0x}}", "invalid format string", int); - EXPECT_ERROR("{:.{-}}", "invalid format string", int); - EXPECT_ERROR("{:.x}", "missing precision specifier", int); - EXPECT_ERROR("{}", "argument index out of range"); - EXPECT_ERROR("{1}", "argument index out of range", int); EXPECT_ERROR("{:+}", "format specifier requires numeric argument", const char *); EXPECT_ERROR("{:-}", "format specifier requires numeric argument", @@ -1903,4 +1891,16 @@ TEST(FormatTest, FormatStringErrors) { EXPECT_ERROR("{:-}", "format specifier requires signed argument", unsigned); EXPECT_ERROR("{: }", "format specifier requires signed argument", unsigned); EXPECT_ERROR("{:.2}", "precision not allowed for this argument type", int); +#endif + EXPECT_ERROR("{foo", "missing '}' in format string", int); + EXPECT_ERROR("{10000000000}", "number is too big"); + EXPECT_ERROR("{0x}", "invalid format string"); + EXPECT_ERROR("{-}", "invalid format string"); + EXPECT_ERROR("{:{0x}}", "invalid format string", int); + EXPECT_ERROR("{:{-}}", "invalid format string", int); + EXPECT_ERROR("{:.{0x}}", "invalid format string", int); + EXPECT_ERROR("{:.{-}}", "invalid format string", int); + EXPECT_ERROR("{:.x}", "missing precision specifier", int); + EXPECT_ERROR("{}", "argument index out of range"); + EXPECT_ERROR("{1}", "argument index out of range", int); }