diff options
Diffstat (limited to 'jstests/core/geo_update1.js')
-rw-r--r-- | jstests/core/geo_update1.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/jstests/core/geo_update1.js b/jstests/core/geo_update1.js index 6352ef0aa19..c3d2623d3de 100644 --- a/jstests/core/geo_update1.js +++ b/jstests/core/geo_update1.js @@ -1,6 +1,6 @@ -t = db.geo_update1 -t.drop() +t = db.geo_update1; +t.drop(); for(var x = 0; x < 10; x++ ) { for(var y = 0; y < 10; y++ ) { @@ -8,29 +8,29 @@ for(var x = 0; x < 10; x++ ) { } } -t.ensureIndex( { loc : "2d" } ) +t.ensureIndex( { loc : "2d" } ); function p(){ print( "--------------" ); for ( var y=0; y<10; y++ ){ - var c = t.find( { y : y } ).sort( { x : 1 } ) + var c = t.find( { y : y } ).sort( { x : 1 } ); var s = ""; while ( c.hasNext() ) s += c.next().z + " "; - print( s ) + print( s ); } print( "--------------" ); } -p() +p(); var res = t.update({ loc: { $within: { $center: [[ 5, 5 ], 2 ]}}}, { $inc: { z: 1 }}, false, true); assert.writeOK( res ); -p() +p(); assert.writeOK(t.update({}, {'$inc' : { 'z' : 1}}, false, true)); -p() +p(); res = t.update({ loc: { $within: { $center: [[ 5, 5 ], 2 ]}}}, { $inc: { z: 1 }}, false, true); assert.writeOK( res ); -p() +p(); |