diff options
author | Aaron <aaron@10gen.com> | 2009-03-27 13:31:13 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-03-27 13:31:13 -0400 |
commit | 8cd20d5ebbf21f9dffe82a803157d9dab84423f4 (patch) | |
tree | 08be73a54e653ba157e0941df142a969e8d7c8c4 /dbtests | |
parent | 790b17c6a637cb660a21e660ad1825ddb6128328 (diff) | |
download | mongo-8cd20d5ebbf21f9dffe82a803157d9dab84423f4.tar.gz |
Add SIZE label
Diffstat (limited to 'dbtests')
-rw-r--r-- | dbtests/jsobjtests.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/dbtests/jsobjtests.cpp b/dbtests/jsobjtests.cpp index 39b5c18eacd..f004ec23f71 100644 --- a/dbtests/jsobjtests.cpp +++ b/dbtests/jsobjtests.cpp @@ -556,6 +556,15 @@ namespace JsobjTests { } }; + class LabelSize : public LabelBase { + BSONObj expected() { + return BSON( "a" << BSON( "$size" << 4 ) ); + } + BSONObj actual() { + return BSON( "a" << SIZE << 4 ); + } + }; + class LabelMulti : public LabelBase { BSONObj expected() { return BSON( "z" << "q" @@ -591,7 +600,6 @@ namespace JsobjTests { b2.done(); b1.append( "f", 10.0 ); BSONObj ret = b1.done(); - out() << "ret: " << ret << endl; ASSERT( ret.valid() ); ASSERT( ret.woCompare( fromjson( "{a:'bcd',foo:{ggg:44},f:10}" ) ) == 0 ); } @@ -651,6 +659,7 @@ namespace JsobjTests { add< ValueStreamTests::LabelShares >(); add< ValueStreamTests::LabelDouble >(); add< ValueStreamTests::LabelDoubleShares >(); + add< ValueStreamTests::LabelSize >(); add< ValueStreamTests::LabelMulti >(); add< ValueStreamTests::Unallowed >(); add< SubObjectBuilder >(); |