diff options
Diffstat (limited to 'src/mongo/db/ops/modifier_push_test.cpp')
-rw-r--r-- | src/mongo/db/ops/modifier_push_test.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mongo/db/ops/modifier_push_test.cpp b/src/mongo/db/ops/modifier_push_test.cpp index e148ce5f6ef..6e37fc24d74 100644 --- a/src/mongo/db/ops/modifier_push_test.cpp +++ b/src/mongo/db/ops/modifier_push_test.cpp @@ -35,10 +35,10 @@ #include "mongo/base/status.h" #include "mongo/base/string_data.h" -#include "mongo/bson/ordering.h" #include "mongo/bson/mutable/algorithm.h" #include "mongo/bson/mutable/document.h" #include "mongo/bson/mutable/mutable_bson_test_utils.h" +#include "mongo/bson/ordering.h" #include "mongo/db/jsobj.h" #include "mongo/db/json.h" #include "mongo/db/ops/log_builder.h" @@ -659,13 +659,13 @@ TEST(SimpleObjMod, PrepareApplyNormal) { } TEST(SimpleObjMod, PrepareApplyDotted) { - Document doc(fromjson( - "{ _id : 1 , " - " question : 'a', " - " choices : { " - " first : { choice : 'b' }, " - " second : { choice : 'c' } }" - "}")); + Document doc( + fromjson("{ _id : 1 , " + " question : 'a', " + " choices : { " + " first : { choice : 'b' }, " + " second : { choice : 'c' } }" + "}")); Mod pushMod(fromjson("{$push: {'choices.first.votes': 1}}")); ModifierInterface::ExecInfo execInfo; @@ -676,13 +676,12 @@ TEST(SimpleObjMod, PrepareApplyDotted) { ASSERT_OK(pushMod.apply()); ASSERT_FALSE(doc.isInPlaceModeEnabled()); - ASSERT_EQUALS(fromjson( - "{ _id : 1 , " - " question : 'a', " - " choices : { " - " first : { choice : 'b', votes: [1]}, " - " second : { choice : 'c' } }" - "}"), + ASSERT_EQUALS(fromjson("{ _id : 1 , " + " question : 'a', " + " choices : { " + " first : { choice : 'b', votes: [1]}, " + " second : { choice : 'c' } }" + "}"), doc); Document logDoc; @@ -1059,8 +1058,9 @@ public: arrBuilder.append(*it); } - _modObj = BSON("$push" << BSON("a" << BSON("$each" << arrBuilder.arr() << "$slice" << slice - << "$sort" << sort))); + _modObj = BSON( + "$push" << BSON( + "a" << BSON("$each" << arrBuilder.arr() << "$slice" << slice << "$sort" << sort))); ASSERT_OK(_mod.init(_modObj["$push"].embeddedObject().firstElement(), ModifierInterface::Options::normal())); |