summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/jstests.cpp
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2015-09-23 11:11:40 -0400
committerJason Carey <jcarey@argv.me>2015-10-06 19:28:19 -0400
commitb7104c6f2f597335c6b9890ff6b80243625a6258 (patch)
tree8107d9b98344574c7bd541619c1fcb5b727b0eb2 /src/mongo/dbtests/jstests.cpp
parente5f65d77a33e5116adb965549deb51ab3ed0a462 (diff)
downloadmongo-b7104c6f2f597335c6b9890ff6b80243625a6258.tar.gz
SERVER-20564 no default getOwned for BSON in JS
Diffstat (limited to 'src/mongo/dbtests/jstests.cpp')
-rw-r--r--src/mongo/dbtests/jstests.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/dbtests/jstests.cpp b/src/mongo/dbtests/jstests.cpp
index 5d21645f3f7..aac958bda4f 100644
--- a/src/mongo/dbtests/jstests.cpp
+++ b/src/mongo/dbtests/jstests.cpp
@@ -118,7 +118,8 @@ public:
s->setNumber("notANumberVal", std::numeric_limits<double>::quiet_NaN());
ASSERT(!s->getBoolean("notANumberVal"));
- s->setElement("nullVal", BSONObjBuilder().appendNull("null").obj().getField("null"));
+ auto obj = BSONObjBuilder().appendNull("null").obj();
+ s->setElement("nullVal", obj.getField("null"), obj);
ASSERT(!s->getBoolean("nullVal"));
s->setNumber("zeroVal", 0);