diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-09-16 17:47:29 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-09-16 17:47:29 +0000 |
commit | 307029fd0dc4886092f9196c275a71c3d8a32220 (patch) | |
tree | f6d13682fbc2375b712470b7914fa088d8518ab6 /share/www/script/test/reduce.js | |
parent | 6cc96f2ac7b2dfa04b57d5523cfe6c8b0b6c083b (diff) |
JavaScript test files: adding missing semi-colons (Chrome is sensitive about them, but they're not mandatory according to ECMAScript spec) and removing extra commas.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@997862 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/reduce.js')
-rw-r--r-- | share/www/script/test/reduce.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/share/www/script/test/reduce.js b/share/www/script/test/reduce.js index 9c80fa7f..979a0292 100644 --- a/share/www/script/test/reduce.js +++ b/share/www/script/test/reduce.js @@ -15,14 +15,15 @@ couchTests.reduce = function(debug) { db.deleteDb(); db.createDb(); if (debug) debugger; - var numDocs = 500 + var numDocs = 500; var docs = makeDocs(1,numDocs + 1); db.bulkSave(docs); var summate = function(N) {return (N+1)*N/2;}; var map = function (doc) { emit(doc.integer, doc.integer); - emit(doc.integer, doc.integer)}; + emit(doc.integer, doc.integer); + }; var reduce = function (keys, values) { return sum(values); }; var result = db.query(map, reduce); T(result.rows[0].value == 2*summate(numDocs)); @@ -69,7 +70,7 @@ couchTests.reduce = function(debug) { T(db.info().doc_count == ((i - 1) * 10 * 11) + ((j + 1) * 11)); } - map = function (doc) {emit(doc.keys, 1)}; + map = function (doc) { emit(doc.keys, 1); }; reduce = function (keys, values) { return sum(values); }; var results = db.query(map, reduce, {group:true}); @@ -107,7 +108,7 @@ couchTests.reduce = function(debug) { db.createDb(); - var map = function (doc) {emit(doc.val, doc.val)}; + var map = function (doc) { emit(doc.val, doc.val); }; var reduceCombine = function (keys, values, rereduce) { // This computes the standard deviation of the mapped results var stdDeviation=0.0; |