summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/jsontests.cpp
diff options
context:
space:
mode:
authorShaun Verch <shaun.verch@10gen.com>2012-11-27 15:48:36 -0800
committerShaun Verch <shaun.verch@10gen.com>2012-12-18 17:00:24 -0500
commit67ec3ed7d7550cf5d39458c5a6026568a802557a (patch)
tree297b063531ba4c9a0ae0357aee1fe45d6bde33dd /src/mongo/dbtests/jsontests.cpp
parent9c1a0b66fd7256d8b99bf0171bdad09fc05f7b40 (diff)
downloadmongo-67ec3ed7d7550cf5d39458c5a6026568a802557a.tar.gz
SERVER-7437 Fixed handling of timestamp object in jsonString
Diffstat (limited to 'src/mongo/dbtests/jsontests.cpp')
-rw-r--r--src/mongo/dbtests/jsontests.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/dbtests/jsontests.cpp b/src/mongo/dbtests/jsontests.cpp
index 82e6963767d..a05c8d1a7df 100644
--- a/src/mongo/dbtests/jsontests.cpp
+++ b/src/mongo/dbtests/jsontests.cpp
@@ -357,7 +357,11 @@ namespace JsonTests {
BSONObjBuilder b;
b.appendTimestamp( "x" , 4000 , 10 );
BSONObj o = b.obj();
- ASSERT_EQUALS( "{ \"x\" : { \"t\" : 4000 , \"i\" : 10 } }" , o.jsonString() );
+ ASSERT_EQUALS( "{ \"x\" : { \"$timestamp\" : { \"t\" : 4, \"i\" : 10 } } }",
+ o.jsonString( Strict ) );
+ ASSERT_EQUALS( "{ \"x\" : { \"$timestamp\" : { \"t\" : 4, \"i\" : 10 } } }",
+ o.jsonString( JS ) );
+ ASSERT_EQUALS( "{ \"x\" : Timestamp( 4, 10 ) }", o.jsonString( TenGen ) );
}
};