diff options
author | Benety Goh <benety@mongodb.com> | 2013-11-06 10:57:28 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2013-11-12 09:31:52 -0500 |
commit | b7434b66409c8d4515b94d3d7e647cf68b2c46ec (patch) | |
tree | 20b2b726bd47eeaa4fca29860d50ee4085264588 | |
parent | a1c04c3377a3d9b9a586db49b868bbd57d2c8201 (diff) | |
download | mongo-b7434b66409c8d4515b94d3d7e647cf68b2c46ec.tar.gz |
SERVER-11136 SERVER-11135 support NumberLong() in BSONElement::jsonString() result
-rw-r--r-- | src/mongo/db/jsobj.cpp | 7 | ||||
-rw-r--r-- | src/mongo/dbtests/jsontests.cpp | 4 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/mongo/db/jsobj.cpp b/src/mongo/db/jsobj.cpp index bee99426f9a..3d75d4d47e8 100644 --- a/src/mongo/db/jsobj.cpp +++ b/src/mongo/db/jsobj.cpp @@ -78,13 +78,12 @@ namespace mongo { s << '"' << escape( string(valuestr(), valuestrsize()-1) ) << '"'; break; case NumberLong: -/* TODO: Enable when SERVER-11135 fixed - if(format == JS) { + if (format == JS) { s << "NumberLong(" << _numberLong() << ")"; } - else -*/ + else { s << _numberLong(); + } break; case NumberInt: if(format == JS) { diff --git a/src/mongo/dbtests/jsontests.cpp b/src/mongo/dbtests/jsontests.cpp index 27e21f38cbf..37b8ee46054 100644 --- a/src/mongo/dbtests/jsontests.cpp +++ b/src/mongo/dbtests/jsontests.cpp @@ -2303,13 +2303,9 @@ namespace JsonTests { class NumericLongMin : public Base { virtual BSONObj bson() const { -/* TODO: Enable when SERVER-11135 fixed BSONObjBuilder b; b.appendNumber("a", std::numeric_limits<long long>::min()); return b.obj(); -*/ - return BSON("a" << std::numeric_limits<long long>::min()); - } virtual string json() const { std::stringstream ss; |