Skip to content
Browse files

SERVER-1943 test key ordering for empty arrays

  • Loading branch information...
1 parent 7fa4d07 commit 0141015c83c0fc70f5bb40c55ed62e21aab0cfb7 @astaple astaple committed Jul 31, 2011
Showing with 6 additions and 5 deletions.
  1. +6 −5 jstests/sorta.js
View
11 jstests/sorta.js
@@ -5,16 +5,17 @@ t.drop();
// Enable _allow_dot to try and bypass v8 field name checking.
t.insert( {_id:0,a:MinKey}, true );
-t.save( {_id:1,a:null} );
-t.save( {_id:2,a:[]} );
+t.save( {_id:3,a:null} );
+t.save( {_id:1,a:[]} );
t.save( {_id:7,a:[2]} );
-t.save( {_id:3} );
-t.save( {_id:4,a:null} );
-t.save( {_id:5,a:[]} );
+t.save( {_id:4} );
+t.save( {_id:5,a:null} );
+t.save( {_id:2,a:[]} );
t.save( {_id:6,a:1} );
t.insert( {_id:8,a:MaxKey}, true );
function sorted( arr ) {
+ assert.eq( 9, arr.length );
for( i = 1; i < arr.length; ++i ) {
assert.lte( arr[ i-1 ]._id, arr[ i ]._id );
}

0 comments on commit 0141015

Please sign in to comment.
Something went wrong with that request. Please try again.