From a07b51f7df9c2b9b504267db1dec4d41b2156f7b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 17 Apr 2014 19:18:11 -0700 Subject: [PATCH] Conditionally compile part of a test that uses C++11. --- format-test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/format-test.cc b/format-test.cc index 80d3b121..fd33d673 100644 --- a/format-test.cc +++ b/format-test.cc @@ -1433,10 +1433,12 @@ TEST(FormatterTest, Examples) { std::string path = "somefile"; ReportError("File not found: {0}") << path; - + +#ifdef FMT_USE_INITIALIZER_LIST EXPECT_THROW_MSG( Format("The answer is {:d}", "forty-two"), FormatError, "unknown format code 'd' for string"); +#endif } TEST(FormatIntTest, Data) {