diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2018-11-15 15:01:22 -0500 |
---|---|---|
committer | Henrik Edin <henrik.edin@mongodb.com> | 2018-11-27 11:58:44 -0500 |
commit | e03ee5c6df7939134345ace00fcc3087335f62d8 (patch) | |
tree | c6f3203bd5d3fe8c3df2024d66fda8bbe9274725 /src/mongo/bson | |
parent | a83ee33c56dcfc8cdcfa0dd0c458f6fef89a3113 (diff) | |
download | mongo-e03ee5c6df7939134345ace00fcc3087335f62d8.tar.gz |
SERVER-38160 Allow compilation with Visual Studio 2017.
Take SCons MSCommon from SCons 3.0.1
Fix missing <intrin.h> includes
Suppress constant arithmetic warnings in unit tests
Diffstat (limited to 'src/mongo/bson')
-rw-r--r-- | src/mongo/bson/bson_obj_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/bson/bson_obj_test.cpp b/src/mongo/bson/bson_obj_test.cpp index 7d0ccbbbf18..1a1781e0b03 100644 --- a/src/mongo/bson/bson_obj_test.cpp +++ b/src/mongo/bson/bson_obj_test.cpp @@ -189,8 +189,16 @@ TEST(BSONObjCompare, NumberLong_Double) { const double equal = -9223372036854775808.0; // 2**63 const double closestAbove = -9223372036854774784.0; // -2**63 + epsilon +// VS2017 Doesn't like the tests below, even though we're using static_cast +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4056) // warning C4056: overflow in floating-point constant arithmetic +#endif invariant(static_cast<double>(minLL) == equal); invariant(static_cast<long long>(equal) == minLL); +#if defined(_MSC_VER) +#pragma warning(pop) +#endif ASSERT_BSONOBJ_LT(BSON("" << minLL), BSON("" << (minLL + 1))); |