diff options
author | clang-format-7.0.1 <adam.martin@10gen.com> | 2019-07-26 18:20:35 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-07-27 11:02:23 -0400 |
commit | 134a4083953270e8a11430395357fb70a29047ad (patch) | |
tree | dd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /src/mongo/bson/bsonelement_test.cpp | |
parent | 1e46b5049003f427047e723ea5fab15b5a9253ca (diff) | |
download | mongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz |
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'src/mongo/bson/bsonelement_test.cpp')
-rw-r--r-- | src/mongo/bson/bsonelement_test.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/mongo/bson/bsonelement_test.cpp b/src/mongo/bson/bsonelement_test.cpp index 5c036ebeb23..f98ccf93894 100644 --- a/src/mongo/bson/bsonelement_test.cpp +++ b/src/mongo/bson/bsonelement_test.cpp @@ -128,15 +128,13 @@ TEST(BSONElement, ExtractLargeSubObject) { } TEST(BSONElement, SafeNumberLongPositiveBound) { - BSONObj obj = BSON("kLongLongMaxPlusOneAsDouble" - << BSONElement::kLongLongMaxPlusOneAsDouble - << "towardsZero" - << std::nextafter(BSONElement::kLongLongMaxPlusOneAsDouble, 0.0) - << "towardsInfinity" - << std::nextafter(BSONElement::kLongLongMaxPlusOneAsDouble, - std::numeric_limits<double>::max()) - << "positiveInfinity" - << std::numeric_limits<double>::infinity()); + BSONObj obj = + BSON("kLongLongMaxPlusOneAsDouble" + << BSONElement::kLongLongMaxPlusOneAsDouble << "towardsZero" + << std::nextafter(BSONElement::kLongLongMaxPlusOneAsDouble, 0.0) << "towardsInfinity" + << std::nextafter(BSONElement::kLongLongMaxPlusOneAsDouble, + std::numeric_limits<double>::max()) + << "positiveInfinity" << std::numeric_limits<double>::infinity()); // kLongLongMaxPlusOneAsDouble is the least double value that will overflow a 64-bit signed // two's-complement integer. Historically, converting this value with safeNumberLong() would @@ -182,13 +180,10 @@ TEST(BSONElement, SafeNumberLongNegativeBound) { static_cast<double>(std::numeric_limits<long long>::lowest()); BSONObj obj = BSON("lowestLongLongAsDouble" // This comment forces clang-format to break here. - << lowestLongLongAsDouble - << "towardsZero" - << std::nextafter(lowestLongLongAsDouble, 0.0) - << "towardsNegativeInfinity" + << lowestLongLongAsDouble << "towardsZero" + << std::nextafter(lowestLongLongAsDouble, 0.0) << "towardsNegativeInfinity" << std::nextafter(lowestLongLongAsDouble, std::numeric_limits<double>::lowest()) - << "negativeInfinity" - << -std::numeric_limits<double>::infinity()); + << "negativeInfinity" << -std::numeric_limits<double>::infinity()); ASSERT_EQ(obj["lowestLongLongAsDouble"].safeNumberLongForHash(), std::numeric_limits<long long>::lowest()); |