From 57b00d3b388cfb050b8efff4ead0f7a796c36df2 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 5 Oct 2015 20:22:36 -0700 Subject: [PATCH] Fix StorageTest unit test on MSVC 2015. Per https://msdn.microsoft.com/en-us/library/bb531344.aspx, "Exponent formatting", MSVC 2015 fixed the %g format to match the C standard's requirement of printing a 2-digit exponent if only 2 digits are required. --- test/unit/StorageTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/StorageTest.cpp b/test/unit/StorageTest.cpp index 6ec672365b..f7c4e7aa16 100644 --- a/test/unit/StorageTest.cpp +++ b/test/unit/StorageTest.cpp @@ -457,7 +457,7 @@ TEST_P(StorageTestPersistent, SavePersistent) { std::tie(line, rem) = rem.split('\n'); ASSERT_EQ("array boolean \"booleanarr/two\"=true,false", line); std::tie(line, rem) = rem.split('\n'); -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER < 1900 ASSERT_EQ("double \"double/big\"=1.3e+008", line); #else ASSERT_EQ("double \"double/big\"=1.3e+08", line);