summaryrefslogtreecommitdiff
path: root/jstests/sort5.js
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2014-02-19 12:45:53 -0500
committerMatt Kangas <matt.kangas@mongodb.com>2014-03-03 22:54:10 -0500
commit3660343e0b4627d2fee4afb89b74d32644d16d18 (patch)
treeffa571e0b73ce56d73c2ae23f458f0db772ef782 /jstests/sort5.js
parent9fae141a1f3fe652fa6002e47722c5ceb051cffb (diff)
downloadmongo-3660343e0b4627d2fee4afb89b74d32644d16d18.tar.gz
SERVER-12127 migrate js tests to jscore suite when not related to writes
Migrate js tests starting from j-z. Include SERVER-12920 Update use_power_of_2.js Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Diffstat (limited to 'jstests/sort5.js')
-rw-r--r--jstests/sort5.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/jstests/sort5.js b/jstests/sort5.js
deleted file mode 100644
index b90256ef79d..00000000000
--- a/jstests/sort5.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var t = db.sort5;
-t.drop();
-
-t.save({_id: 5, x: 1, y: {a: 5, b: 4}});
-t.save({_id: 7, x: 2, y: {a: 7, b: 3}});
-t.save({_id: 2, x: 3, y: {a: 2, b: 3}});
-t.save({_id: 9, x: 4, y: {a: 9, b: 3}});
-
-// test compound sorting
-
-assert.eq( [4,2,3,1] , t.find().sort({"y.b": 1 , "y.a" : -1 }).map( function(z){ return z.x; } ) , "A no index" );
-t.ensureIndex({"y.b": 1, "y.a": -1});
-assert.eq( [4,2,3,1] , t.find().sort({"y.b": 1 , "y.a" : -1 }).map( function(z){ return z.x; } ) , "A index" );
-assert(t.validate().valid, "A valid");
-
-// test sorting on compound key involving _id
-
-assert.eq( [4,2,3,1] , t.find().sort({"y.b": 1 , _id : -1 }).map( function(z){ return z.x; } ) , "B no index" );
-t.ensureIndex({"y.b": 1, "_id": -1});
-assert.eq( [4,2,3,1] , t.find().sort({"y.b": 1 , _id : -1 }).map( function(z){ return z.x; } ) , "B index" );
-assert(t.validate().valid, "B valid");