summaryrefslogtreecommitdiff
path: root/dbtests
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2011-06-01 09:35:42 -0400
committerdwight <dwight@10gen.com>2011-06-01 09:35:42 -0400
commit600f2eef36c299b32810ce1a79c8bb4bb120c2ab (patch)
treeb614929b2aaa9af242a4dfee15fe3d0b6fd25c53 /dbtests
parentd61ea38d7dd114f01128d8a50877962bee82f23c (diff)
downloadmongo-600f2eef36c299b32810ce1a79c8bb4bb120c2ab.tar.gz
SERVER-2935 fix woEqual which wasnt equalling ints and doubles
Diffstat (limited to 'dbtests')
-rw-r--r--dbtests/jsobjtests.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/dbtests/jsobjtests.cpp b/dbtests/jsobjtests.cpp
index 5d0f72d682f..f0125b6b921 100644
--- a/dbtests/jsobjtests.cpp
+++ b/dbtests/jsobjtests.cpp
@@ -52,6 +52,12 @@ namespace JsobjTests {
ASSERT( k.woEqual(k) );
ASSERT( !k.isCompactFormat() || k.dataSize() < o.objsize() );
+ {
+ // check BSONObj::equal. this part not a KeyV1 test.
+ int res = o.woCompare(last);
+ ASSERT( (res==0) == o.equal(last) );
+ }
+
if( kLast ) {
int r1 = o.woCompare(last, BSONObj(), false);
int r2 = k.woCompare(*kLast, Ordering::make(BSONObj()));