summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-02-01 22:30:36 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-02-01 22:30:36 +0000
commit49c9d17d8e407f54226b4fc4d55c0049ed58d628 (patch)
tree109e750e540eb526ba0934c26b248d6c4c3f5527 /share
parentcdfe55c54de515581121f6923e8301e8cbea5bcc (diff)
Add strict semicolons to the test suite for Webkit. thanks davisp. closes COUCH-232
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@739872 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r--share/www/script/couch_tests.js82
1 files changed, 41 insertions, 41 deletions
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js
index 8bdebec1..e7f8abdb 100644
--- a/share/www/script/couch_tests.js
+++ b/share/www/script/couch_tests.js
@@ -1491,71 +1491,71 @@ var tests = {
// NOTE, the values are already in their correct sort order. Consider this
// a specification of collation of json types.
- var values = []
+ var values = [];
// special values sort before all other types
- values.push(null)
- values.push(false)
- values.push(true)
+ values.push(null);
+ values.push(false);
+ values.push(true);
// then numbers
- values.push(1)
- values.push(2)
- values.push(3.0)
- values.push(4)
+ values.push(1);
+ values.push(2);
+ values.push(3.0);
+ values.push(4);
// then text, case sensitive
- values.push("a")
- values.push("A")
- values.push("aa")
- values.push("b")
- values.push("B")
- values.push("ba")
- values.push("bb")
+ values.push("a");
+ values.push("A");
+ values.push("aa");
+ values.push("b");
+ values.push("B");
+ values.push("ba");
+ values.push("bb");
// then arrays. compared element by element until different.
// Longer arrays sort after their prefixes
- values.push(["a"])
- values.push(["b"])
- values.push(["b","c"])
- values.push(["b","c", "a"])
- values.push(["b","d"])
- values.push(["b","d", "e"])
+ values.push(["a"]);
+ values.push(["b"]);
+ values.push(["b","c"]);
+ values.push(["b","c", "a"]);
+ values.push(["b","d"]);
+ values.push(["b","d", "e"]);
// then object, compares each key value in the list until different.
// larger objects sort after their subset objects.
- values.push({a:1})
- values.push({a:2})
- values.push({b:1})
- values.push({b:2})
- values.push({b:2, a:1}) // Member order does matter for collation.
- // CouchDB preserves member order
- // but doesn't require that clients will.
- // (this test might fail if used with a js engine
- // that doesn't preserve order)
- values.push({b:2, c:2})
+ values.push({a:1});
+ values.push({a:2});
+ values.push({b:1});
+ values.push({b:2});
+ values.push({b:2, a:1}); // Member order does matter for collation.
+ // CouchDB preserves member order
+ // but doesn't require that clients will.
+ // (this test might fail if used with a js engine
+ // that doesn't preserve order)
+ values.push({b:2, c:2});
for (var i=0; i<values.length; i++) {
db.save({_id:(i).toString(), foo:values[i]});
}
- var queryFun = function(doc) { emit(doc.foo, null); }
+ var queryFun = function(doc) { emit(doc.foo, null); };
var rows = db.query(queryFun).rows;
for (i=0; i<values.length; i++) {
- T(equals(rows[i].key, values[i]))
+ T(equals(rows[i].key, values[i]));
}
// everything has collated correctly. Now to check the descending output
- rows = db.query(queryFun, null, {descending: true}).rows
+ rows = db.query(queryFun, null, {descending: true}).rows;
for (i=0; i<values.length; i++) {
- T(equals(rows[i].key, values[values.length - 1 -i]))
+ T(equals(rows[i].key, values[values.length - 1 -i]));
}
// now check the key query args
for (i=1; i<values.length; i++) {
- var queryOptions = {key:values[i]}
+ var queryOptions = {key:values[i]};
rows = db.query(queryFun, null, queryOptions).rows;
- T(rows.length == 1 && equals(rows[0].key, values[i]))
+ T(rows.length == 1 && equals(rows[0].key, values[i]));
}
},
@@ -2316,7 +2316,7 @@ var tests = {
T(xhr.status == 201);
// extract the ETag header values
- var etag = xhr.getResponseHeader("etag")
+ var etag = xhr.getResponseHeader("etag");
// get the doc and verify the headers match
xhr = CouchDB.request("GET", "/test_suite_db/1");
@@ -2337,13 +2337,13 @@ var tests = {
// extract the new ETag value
var etagOld= etag;
- etag = xhr.getResponseHeader("etag")
+ etag = xhr.getResponseHeader("etag");
// fail to replace a doc
xhr = CouchDB.request("PUT", "/test_suite_db/1", {
body: "{}"
});
- T(xhr.status == 409)
+ T(xhr.status == 409);
// verify get w/Etag
xhr = CouchDB.request("GET", "/test_suite_db/1", {
@@ -2365,7 +2365,7 @@ var tests = {
xhr = CouchDB.request("DELETE", "/test_suite_db/1", {
headers: {"if-match": etag}
});
- T(xhr.status == 200)
+ T(xhr.status == 200);
},
show_documents: function(debug) {