From 53b9d1275f3e0d25cbf637eee651e94382dd6a01 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Sun, 5 Oct 2008 05:32:28 +0000 Subject: remove unnecessary negative count feature git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@701748 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/couch_tests.js | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'share') diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index cc08e6f8..3abd570e 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -1101,7 +1101,7 @@ var tests = { var queryFun = function(doc) { emit(doc.integer, null) }; var i; - // page through the view ascending and going forward + // page through the view ascending for (i = 0; i < docs.length; i += 10) { var queryResults = db.query(queryFun, null, { startkey: i, @@ -1117,23 +1117,7 @@ var tests = { } } - // page through the view ascending and going backward - for (i = docs.length - 1; i >= 0; i -= 10) { - var queryResults = db.query(queryFun, null, { - startkey: i, - startkey_docid: i, - count:-10 - }); - T(queryResults.rows.length == 10) - T(queryResults.total_rows == docs.length) - T(queryResults.offset == i - 9) - var j; - for (j = 0; j < 10;j++) { - T(queryResults.rows[j].key == i - 9 + j); - } - } - - // page through the view descending and going forward + // page through the view descending for (i = docs.length - 1; i >= 0; i -= 10) { var queryResults = db.query(queryFun, null, { startkey: i, @@ -1150,23 +1134,6 @@ var tests = { } } - // page through the view descending and going backward - for (i = 0; i < docs.length; i += 10) { - var queryResults = db.query(queryFun, null, { - startkey: i, - startkey_docid: i, - descending: true, - count:-10 - }); - T(queryResults.rows.length == 10) - T(queryResults.total_rows == docs.length) - T(queryResults.offset == docs.length - i - 10) - var j; - for (j = 0; j < 10; j++) { - T(queryResults.rows[j].key == i + 9 - j); - } - } - // ignore decending=false. CouchDB should just ignore that. for (i = 0; i < docs.length; i += 10) { var queryResults = db.query(queryFun, null, { -- cgit v1.2.3