summaryrefslogtreecommitdiff
path: root/jstests/or3.js
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2011-09-14 17:08:06 +0200
committerAntonin Kral <a.kral@bobek.cz>2011-09-14 17:08:06 +0200
commit5d342a758c6095b4d30aba0750b54f13b8916f51 (patch)
tree762e9aa84781f5e3b96db2c02d356c29cf0217c0 /jstests/or3.js
parentcbe2d992e9cd1ea66af9fa91df006106775d3073 (diff)
downloadmongodb-5d342a758c6095b4d30aba0750b54f13b8916f51.tar.gz
Imported Upstream version 2.0.0
Diffstat (limited to 'jstests/or3.js')
-rw-r--r--jstests/or3.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/jstests/or3.js b/jstests/or3.js
index be85a8f..97028be 100644
--- a/jstests/or3.js
+++ b/jstests/or3.js
@@ -7,7 +7,7 @@ checkArrs = function( a, b, m ) {
bStr = [];
a.forEach( function( x ) { aStr.push( tojson( x ) ); } );
b.forEach( function( x ) { bStr.push( tojson( x ) ); } );
- for ( i in aStr ) {
+ for ( i = 0; i < aStr.length; ++i ) {
assert( -1 != bStr.indexOf( aStr[ i ] ), m );
}
}
@@ -29,8 +29,6 @@ doTest = function( index ) {
assert.throws( function() { t.find( { x:0,$nor:"a" } ).toArray(); } );
assert.throws( function() { t.find( { x:0,$nor:[] } ).toArray(); } );
assert.throws( function() { t.find( { x:0,$nor:[ "a" ] } ).toArray(); } );
- assert.throws( function() { t.find( { x:0,$nor:[ {x:0,$or:[{x:0}]} ] } ).toArray(); } );
- assert.throws( function() { t.find( { x:0,$nor:[ {x:0,$nor:[{x:0}]} ] } ).toArray(); } );
an1 = t.find( { $nor: [ { a : 1 } ] } ).toArray();
checkArrs( t.find( {a:{$ne:1}} ).toArray(), an1 );