diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2018-02-09 11:35:37 -0500 |
---|---|---|
committer | Leo Balter <leonardo.balter@gmail.com> | 2018-02-09 11:35:37 -0500 |
commit | a01de4a722d088055a7d84d8c691ddd7109edb34 (patch) | |
tree | f583c8efd40a3b699261f1166da75a9861d83e7b /test/built-ins/Array/prototype/indexOf | |
parent | 7b01f9799f99851955f23c18c12e6651c1941022 (diff) | |
download | qtdeclarative-testsuites-a01de4a722d088055a7d84d8c691ddd7109edb34.tar.gz |
js-beautify: make all indentation consistent (depth & character) (#1409)
Diffstat (limited to 'test/built-ins/Array/prototype/indexOf')
159 files changed, 1283 insertions, 1039 deletions
diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-1.js index 1eb9ef72e..ea9ca6068 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-1.js @@ -9,5 +9,5 @@ description: Array.prototype.indexOf applied to undefined throws a TypeError assert.throws(TypeError, function() { - Array.prototype.indexOf.call(undefined); + Array.prototype.indexOf.call(undefined); }); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-10.js index 1a5520218..4622e10a0 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-10.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-1-10 description: Array.prototype.indexOf applied to the Math object ---*/ - Math[1] = true; - Math.length = 2; +Math[1] = true; +Math.length = 2; assert.sameValue(Array.prototype.indexOf.call(Math, true), 1, 'Array.prototype.indexOf.call(Math, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js index bcb3b21ea..51d4a331e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-11 description: Array.prototype.indexOf applied to Date object ---*/ - var obj = new Date(); - obj.length = 2; - obj[1] = true; +var obj = new Date(); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js index c416b6e1b..4c23949e9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-12 description: Array.prototype.indexOf applied to RegExp object ---*/ - var obj = new RegExp(); - obj.length = 2; - obj[1] = true; +var obj = new RegExp(); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-13.js index c1ca78731..b339869a0 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-13.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-13 description: Array.prototype.indexOf applied to the JSON object ---*/ - var targetObj = {}; +var targetObj = {}; - JSON[3] = targetObj; - JSON.length = 5; +JSON[3] = targetObj; +JSON.length = 5; assert.sameValue(Array.prototype.indexOf.call(JSON, targetObj), 3, 'Array.prototype.indexOf.call(JSON, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js index 6f116d5ce..06c02d8f1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-14 description: Array.prototype.indexOf applied to Error object ---*/ - var obj = new SyntaxError(); - obj[1] = true; - obj.length = 2; +var obj = new SyntaxError(); +obj[1] = true; +obj.length = 2; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js index 7a6c9b7ca..598ba594e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-15 description: Array.prototype.indexOf applied to Arguments object ---*/ - function fun() { - return arguments; - } - var obj = fun(1, true, 3); +function fun() { + return arguments; +} +var obj = fun(1, true, 3); assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-2.js index 5584d5f68..5e348a54e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-2.js @@ -9,5 +9,5 @@ description: Array.prototype.indexOf applied to null throws a TypeError assert.throws(TypeError, function() { - Array.prototype.indexOf.call(null); + Array.prototype.indexOf.call(null); }); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-3.js index 510a693ed..3bfe5e7a6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-3.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-3 description: Array.prototype.indexOf applied to boolean primitive ---*/ - var targetObj = {}; +var targetObj = {}; - Boolean.prototype[1] = targetObj; - Boolean.prototype.length = 2; +Boolean.prototype[1] = targetObj; +Boolean.prototype.length = 2; assert.sameValue(Array.prototype.indexOf.call(true, targetObj), 1, 'Array.prototype.indexOf.call(true, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js index 844e34af4..5f0dd9ed5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-4 description: Array.prototype.indexOf applied to Boolean Object ---*/ - var obj = new Boolean(false); - obj.length = 2; - obj[1] = true; +var obj = new Boolean(false); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-5.js index ccca65776..4fa661c8b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-5.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-5 description: Array.prototype.indexOf applied to number primitive ---*/ - var targetObj = {}; +var targetObj = {}; - Number.prototype[1] = targetObj; - Number.prototype.length = 2; +Number.prototype[1] = targetObj; +Number.prototype.length = 2; assert.sameValue(Array.prototype.indexOf.call(5, targetObj), 1, 'Array.prototype.indexOf.call(5, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js index c6416ebe4..928377959 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-1-6 description: Array.prototype.indexOf applied to Number object ---*/ - var obj = new Number(-3); - obj.length = 2; - obj[1] = true; +var obj = new Number(-3); +obj.length = 2; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js index 46575fb68..eaa29361e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js @@ -7,6 +7,6 @@ es5id: 15.4.4.14-1-8 description: Array.prototype.indexOf applied to String object ---*/ - var obj = new String("null"); +var obj = new String("null"); assert.sameValue(Array.prototype.indexOf.call(obj, 'l'), 2, 'Array.prototype.indexOf.call(obj, "l")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js index 76d8e87c0..065d31bc7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-1-9 description: Array.prototype.indexOf applied to Function object ---*/ - var obj = function (a, b) { - return a + b; - }; - obj[1] = true; +var obj = function(a, b) { + return a + b; +}; +obj[1] = true; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-1.js index c0d6c537a..8a77b86f5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-1.js @@ -9,13 +9,13 @@ description: > array ---*/ - var a = new Array(); - a[100] = 1; - a[99999] = ""; - a[10] = new Object(); - a[5555] = 5.5; - a[123456] = "str"; - a[5] = 1E+309; +var a = new Array(); +a[100] = 1; +a[99999] = ""; +a[10] = new Object(); +a[5555] = 5.5; +a[123456] = "str"; +a[5] = 1E+309; assert.sameValue(a.indexOf(1), 100, 'a.indexOf(1)'); assert.sameValue(a.indexOf(""), 99999, 'a.indexOf("")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js index 124043c97..fbb926888 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js @@ -9,12 +9,19 @@ description: > access any other properties ---*/ - var accessed = false; - var f = {length: 0}; - Object.defineProperty(f,"0",{get: function () {accessed = true; return 1;}}); +var accessed = false; +var f = { + length: 0 +}; +Object.defineProperty(f, "0", { + get: function() { + accessed = true; + return 1; + } +}); - var i = Array.prototype.indexOf.call(f,1); +var i = Array.prototype.indexOf.call(f, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js index 61dd7f294..e14c28ba3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js @@ -9,8 +9,14 @@ description: > Array-like object ---*/ - var objOne = { 1: true, length: 2 }; - var objTwo = { 2: true, length: 2 }; +var objOne = { + 1: true, + length: 2 +}; +var objTwo = { + 2: true, + length: 2 +}; assert.sameValue(Array.prototype.indexOf.call(objOne, true), 1, 'Array.prototype.indexOf.call(objOne, true)'); assert.sameValue(Array.prototype.indexOf.call(objTwo, true), -1, 'Array.prototype.indexOf.call(objTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js index f4c6f0b83..bde4a7b79 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js @@ -7,21 +7,21 @@ es5id: 15.4.4.14-2-10 description: Array.prototype.indexOf - 'length' is inherited accessor property ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 2; + }, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var childOne = new Con(); - childOne[1] = true; - var childTwo = new Con(); - childTwo[2] = true; +var childOne = new Con(); +childOne[1] = true; +var childTwo = new Con(); +childTwo[2] = true; assert.sameValue(Array.prototype.indexOf.call(childOne, true), 1, 'Array.prototype.indexOf.call(childOne, true)'); assert.sameValue(Array.prototype.indexOf.call(childTwo, true), -1, 'Array.prototype.indexOf.call(childTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js index bb89914e0..d5d473e99 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js @@ -9,10 +9,12 @@ description: > without a get function ---*/ - var obj = { 1: true }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 1: true +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-12.js index ff9ac06df..205d52fbe 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-12.js @@ -10,17 +10,19 @@ description: > property ---*/ - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 20; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "length", { + get: function() { + return 20; + }, + configurable: true +}); - var obj = { 1: 1 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); +var obj = { + 1: 1 +}; +Object.defineProperty(obj, "length", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, 1), -1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js index 6aa17ff1e..833c45d70 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js @@ -9,16 +9,16 @@ description: > without a get function ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + set: function() {}, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = true; +var child = new Con(); +child[1] = true; assert.sameValue(Array.prototype.indexOf.call(child, true), -1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js index 6ffd345db..8807657e8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js @@ -7,6 +7,9 @@ es5id: 15.4.4.14-2-14 description: Array.prototype.indexOf - 'length' is undefined property ---*/ - var obj = { 0: true, 1: true }; +var obj = { + 0: true, + 1: true +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js index 2df759495..cce214933 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js @@ -9,10 +9,10 @@ description: > implements its own property get method ---*/ - var func = function (a, b) { - arguments[2] = false; - return Array.prototype.indexOf.call(arguments, true) === 1 && - Array.prototype.indexOf.call(arguments, false) === -1; - }; +var func = function(a, b) { + arguments[2] = false; + return Array.prototype.indexOf.call(arguments, true) === 1 && + Array.prototype.indexOf.call(arguments, false) === -1; +}; assert(func(0, true), 'func(0, true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js index e48cb33de..e739dd81a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-18.js @@ -9,9 +9,9 @@ description: > its own property get method ---*/ - var str = new String("012"); +var str = new String("012"); - String.prototype[3] = "3"; +String.prototype[3] = "3"; assert.sameValue(Array.prototype.indexOf.call(str, "2"), 2, 'Array.prototype.indexOf.call(str, "2")'); assert.sameValue(Array.prototype.indexOf.call(str, "3"), -1, 'Array.prototype.indexOf.call(str, "3")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js index 09bb09dd3..b5735739f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js @@ -9,11 +9,11 @@ description: > implements its own property get method ---*/ - var obj = function (a, b) { - return a + b; - }; - obj[1] = "b"; - obj[2] = "c"; +var obj = function(a, b) { + return a + b; +}; +obj[1] = "b"; +obj[2] = "c"; assert.sameValue(Array.prototype.indexOf.call(obj, obj[1]), 1, 'Array.prototype.indexOf.call(obj, obj[1])'); assert.sameValue(Array.prototype.indexOf.call(obj, obj[2]), -1, 'Array.prototype.indexOf.call(obj, obj[2])'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-2.js index d1fb4b7bb..9fba71821 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-2.js @@ -7,9 +7,9 @@ es5id: 15.4.4.14-2-2 description: Array.prototype.indexOf - 'length' is own data property on an Array ---*/ - var targetObj = {}; +var targetObj = {}; - Array.prototype[2] = targetObj; +Array.prototype[2] = targetObj; assert.sameValue([0, targetObj].indexOf(targetObj), 1, '[0, targetObj].indexOf(targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js index c0c72be3b..db7ecfe83 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js @@ -9,13 +9,15 @@ description: > overrides an inherited data property on an Array-like object ---*/ - var proto = { length: 0 }; +var proto = { + length: 0 +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - child[1] = true; +var child = new Con(); +child.length = 2; +child[1] = true; assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-4.js index 5a4f6f238..dfc01cd8d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-4.js @@ -9,10 +9,10 @@ description: > overrides an inherited data property on an Array ---*/ - var targetObj = {}; - var arrProtoLen; +var targetObj = {}; +var arrProtoLen; - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; +arrProtoLen = Array.prototype.length; +Array.prototype.length = 0; assert.sameValue([0, targetObj].indexOf(targetObj), 1, '[0, targetObj].indexOf(targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js index 8c5523964..0f3909236 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js @@ -9,23 +9,23 @@ description: > overrides an inherited accessor property on an Array-like object ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 0; + }, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); +var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[1] = true; +Object.defineProperty(child, "length", { + value: 2, + configurable: true +}); +child[1] = true; assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js index 39788558a..79269969a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js @@ -7,15 +7,17 @@ es5id: 15.4.4.14-2-6 description: Array.prototype.indexOf - 'length' is an inherited data property ---*/ - var proto = { length: 2 }; +var proto = { + length: 2 +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var childOne = new Con(); - childOne[1] = true; - var childTwo = new Con(); - childTwo[2] = true; +var childOne = new Con(); +childOne[1] = true; +var childTwo = new Con(); +childTwo[2] = true; assert.sameValue(Array.prototype.indexOf.call(childOne, true), 1, 'Array.prototype.indexOf.call(childOne, true)'); assert.sameValue(Array.prototype.indexOf.call(childTwo, true), -1, 'Array.prototype.indexOf.call(childTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js index 975a8673a..6a0ec2587 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js @@ -7,20 +7,24 @@ es5id: 15.4.4.14-2-7 description: Array.prototype.indexOf - 'length' is own accessor property ---*/ - var objOne = { 1: true }; - var objTwo = { 2: true }; - Object.defineProperty(objOne, "length", { - get: function () { - return 2; - }, - configurable: true - }); - Object.defineProperty(objTwo, "length", { - get: function () { - return 2; - }, - configurable: true - }); +var objOne = { + 1: true +}; +var objTwo = { + 2: true +}; +Object.defineProperty(objOne, "length", { + get: function() { + return 2; + }, + configurable: true +}); +Object.defineProperty(objTwo, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(objOne, true), 1, 'Array.prototype.indexOf.call(objOne, true)'); assert.sameValue(Array.prototype.indexOf.call(objTwo, true), -1, 'Array.prototype.indexOf.call(objTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js index 92bf58f7a..8ad55630e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js @@ -9,19 +9,21 @@ description: > overrides an inherited data property ---*/ - var proto = { length: 0 }; +var proto = { + length: 0 +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = true; +var child = new Con(); +child[1] = true; - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js index 5ec60e058..2bf8c82ef 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js @@ -9,25 +9,25 @@ description: > overrides an inherited accessor property ---*/ - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "length", { + get: function() { + return 0; + }, + configurable: true +}); - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[1] = true; +var child = new Con(); +child[1] = true; - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(child, "length", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js index 528bb1f48..0787c3a9c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js @@ -7,6 +7,10 @@ es5id: 15.4.4.14-3-1 description: Array.prototype.indexOf - value of 'length' is undefined ---*/ - var obj = { 0: 1, 1: 1, length: undefined }; +var obj = { + 0: 1, + 1: 1, + length: undefined +}; assert.sameValue(Array.prototype.indexOf.call(obj, 1), -1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js index 2d422228c..503c2206d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js @@ -9,6 +9,9 @@ description: > (value is NaN) ---*/ - var obj = { 0: 0, length: NaN }; +var obj = { + 0: 0, + length: NaN +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), -1, 'Array.prototype.indexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js index dbccc238b..9914d8d78 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js @@ -9,7 +9,11 @@ description: > positive number ---*/ - var obj = { 1: 1, 2: 2, length: "2" }; +var obj = { + 1: 1, + 2: 2, + length: "2" +}; assert.sameValue(Array.prototype.indexOf.call(obj, 1), 1, 'Array.prototype.indexOf.call(obj, 1)'); assert.sameValue(Array.prototype.indexOf.call(obj, 2), -1, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js index c147d9355..edc04e60c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js @@ -9,7 +9,11 @@ description: > negative number ---*/ - var obj = { 1: "true", 2: "2", length: "-4294967294" }; +var obj = { + 1: "true", + 2: "2", + length: "-4294967294" +}; assert.sameValue(Array.prototype.indexOf.call(obj, "true"), -1, 'Array.prototype.indexOf.call(obj, "true")'); assert.sameValue(Array.prototype.indexOf.call(obj, "2"), -1, 'Array.prototype.indexOf.call(obj, "2")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js index d2ff4af50..0b2ea6bb6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js @@ -9,7 +9,11 @@ description: > decimal number ---*/ - var obj = { 199: true, 200: "200.59", length: "200.59" }; +var obj = { + 199: true, + 200: "200.59", + length: "200.59" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 199, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, "200.59"), -1, 'Array.prototype.indexOf.call(obj, "200.59")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js index f37712cf3..ec4c578d2 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js @@ -9,9 +9,21 @@ description: > +/-Infinity ---*/ - var objOne = { 0: true, 1: true, length: "Infinity" }; - var objTwo = { 0: true, 1: true, length: "+Infinity" }; - var objThree = { 0: true, 1: true, length: "-Infinity" }; +var objOne = { + 0: true, + 1: true, + length: "Infinity" +}; +var objTwo = { + 0: true, + 1: true, + length: "+Infinity" +}; +var objThree = { + 0: true, + 1: true, + length: "-Infinity" +}; assert.sameValue(Array.prototype.indexOf.call(objOne, true), 0, 'Array.prototype.indexOf.call(objOne, true)'); assert.sameValue(Array.prototype.indexOf.call(objTwo, true), 0, 'Array.prototype.indexOf.call(objTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js index e35a97c2c..2bf0dd8b2 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js @@ -9,7 +9,11 @@ description: > exponential number ---*/ - var obj = { 1: true, 2: "2E0", length: "2E0" }; +var obj = { + 1: true, + 2: "2E0", + length: "2E0" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, "2E0"), -1, 'Array.prototype.indexOf.call(obj, "2E0")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js index adc6ff83a..c3cd2c458 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js @@ -9,7 +9,11 @@ description: > number ---*/ - var obj = { 10: true, 11: "0x00B", length: "0x00B" }; +var obj = { + 10: true, + 11: "0x00B", + length: "0x00B" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 10, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, "0x00B"), -1, 'Array.prototype.indexOf.call(obj, "0x00B")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js index 3f5d9a173..66bb812c3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js @@ -9,7 +9,11 @@ description: > with leading zeros ---*/ - var obj = { 1: true, 2: "0002.0", length: "0002.0" }; +var obj = { + 1: true, + 2: "0002.0", + length: "0002.0" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, "0002.0"), -1, 'Array.prototype.indexOf.call(obj, "0002.0")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js index 71c052c5b..382df40af 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js @@ -9,6 +9,10 @@ description: > convert to a number ---*/ - var obj = { 0: true, 100: true, length: "one" }; +var obj = { + 0: true, + 100: true, + length: "one" +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js index 17a3c545a..b770f0577 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js @@ -9,22 +9,22 @@ description: > an own toString method. ---*/ - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. +// objects inherit the default valueOf() method from Object +// that simply returns itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. - var obj = { - 1: true, - 2: 2, +var obj = { + 1: true, + 2: 2, - length: { - toString: function () { - return '2'; - } - } - }; + length: { + toString: function() { + return '2'; + } + } +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, 2), -1, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js index 8cfa825b8..a645ce3b0 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js @@ -9,7 +9,11 @@ description: > (value is true) ---*/ - var obj = { 0: 0, 1: 1, length: true }; +var obj = { + 0: 0, + 1: 1, + length: true +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); assert.sameValue(Array.prototype.indexOf.call(obj, 1), -1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js index 3479154f0..6c9c56ff2 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js @@ -9,16 +9,16 @@ description: > an own valueOf method. ---*/ - //valueOf method will be invoked first, since hint is Number - var obj = { - 1: true, - 2: 2, - length: { - valueOf: function () { - return 2; - } - } - }; +//valueOf method will be invoked first, since hint is Number +var obj = { + 1: true, + 2: 2, + length: { + valueOf: function() { + return 2; + } + } +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, 2), -1, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js index a9ad676ad..f1de649c8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js @@ -10,23 +10,23 @@ description: > returns a string ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var obj = { - 1: true, - length: { - toString: function () { - toStringAccessed = true; - return '2'; - }, +var obj = { + 1: true, + length: { + toString: function() { + toStringAccessed = true; + return '2'; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } + } +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-22.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-22.js index 5cb92837c..ad4324128 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-22.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-22.js @@ -10,25 +10,25 @@ description: > primitive values ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var obj = { - length: { - toString: function () { - toStringAccessed = true; - return {}; - }, +var obj = { + length: { + toString: function() { + toStringAccessed = true; + return {}; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.indexOf.call(obj); + Array.prototype.indexOf.call(obj); }); assert(toStringAccessed, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js index 5b30d00cf..a87a044d5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js @@ -10,29 +10,29 @@ description: > methods ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 2; - }; +var child = new Con(); +child.toString = function() { + toStringAccessed = true; + return 2; +}; - var obj = { - 1: true, - length: child - }; +var obj = { + 1: true, + length: child +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js index 539f8d669..109eca9ec 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js @@ -9,7 +9,11 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - var obj = { 122: true, 123: false, length: 123.321 }; //length will be 123 finally +var obj = { + 122: true, + 123: false, + length: 123.321 +}; //length will be 123 finally assert.sameValue(Array.prototype.indexOf.call(obj, true), 122, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js index 4e275b17f..d1c35a485 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js @@ -9,7 +9,11 @@ description: > non-integer ---*/ - var obj = { 1: true, 2: false, length: -4294967294.5 }; //length will be 0 finally +var obj = { + 1: true, + 2: false, + length: -4294967294.5 +}; //length will be 0 finally assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js index 62702eed7..b6f651f69 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js @@ -9,12 +9,12 @@ description: > (2^32) ---*/ - var targetObj = {}; - var obj = { - 0: targetObj, - 4294967294: targetObj, - 4294967295: targetObj, - length: 4294967296 - }; +var targetObj = {}; +var obj = { + 0: targetObj, + 4294967294: targetObj, + 4294967295: targetObj, + length: 4294967296 +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), 0, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js index 23bb38ae7..41298b8a3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js @@ -9,12 +9,12 @@ description: > (2^32 + 1) ---*/ - var targetObj = {}; - var obj = { - 0: targetObj, - 1: 4294967297, - length: 4294967297 - }; +var targetObj = {}; +var obj = { + 0: targetObj, + 1: 4294967297, + length: 4294967297 +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), 0, 'Array.prototype.indexOf.call(obj, targetObj)'); assert.sameValue(Array.prototype.indexOf.call(obj, 4294967297), 1, 'Array.prototype.indexOf.call(obj, 4294967297)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js index 83c239e17..2db8c77fc 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js @@ -9,6 +9,9 @@ description: > 0) ---*/ - var obj = { 0: true, length: 0 }; +var obj = { + 0: true, + length: 0 +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js index e2dc4190f..c2f4f22c8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js @@ -9,6 +9,9 @@ description: > +0) ---*/ - var obj = { 0: true, length: +0 }; +var obj = { + 0: true, + length: +0 +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js index 6fccac875..4ca356c5f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js @@ -9,6 +9,9 @@ description: > -0) ---*/ - var obj = { 0: true, length: -0 }; +var obj = { + 0: true, + length: -0 +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js index 50cc7c262..841c6b02e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js @@ -9,7 +9,11 @@ description: > positive) ---*/ - var obj = { 3: true, 4: false, length: 4 }; +var obj = { + 3: true, + 4: false, + length: 4 +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), 3, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js index 1ff3602c0..bbc47c981 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js @@ -9,7 +9,11 @@ description: > negative) ---*/ - var obj = { 4: true, 5: false, length: 5 - Math.pow(2, 32) }; +var obj = { + 4: true, + 5: false, + length: 5 - Math.pow(2, 32) +}; assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js index c7873e9ee..b7ffedc0c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js @@ -9,6 +9,9 @@ description: > Infinity) ---*/ - var obj = { 0: 0, length: Infinity }; +var obj = { + 0: 0, + length: Infinity +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js index faf4a227c..00fafbc74 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js @@ -9,6 +9,9 @@ description: > -Infinity) ---*/ - var obj = { 0: 0, length: -Infinity }; +var obj = { + 0: 0, + length: -Infinity +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), -1, 'Array.prototype.indexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js index 5b6a62eb9..7f753d785 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js @@ -7,6 +7,6 @@ es5id: 15.4.4.14-4-1 description: Array.prototype.indexOf returns -1 if 'length' is 0 (empty array) ---*/ - var i = [].indexOf(42); +var i = [].indexOf(42); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js index 6af3e10a8..47a90a228 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js @@ -7,7 +7,11 @@ es5id: 15.4.4.14-4-10 description: Array.prototype.indexOf - 'length' is a number of value -6e-1 ---*/ - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: -6e-1 }; +var targetObj = []; +var obj = { + 0: targetObj, + 100: targetObj, + length: -6e-1 +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), -1, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js index 3410cb85c..94da77848 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js @@ -7,7 +7,11 @@ es5id: 15.4.4.14-4-11 description: Array.prototype.indexOf - 'length' is an empty string ---*/ - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: "" }; +var targetObj = []; +var obj = { + 0: targetObj, + 100: targetObj, + length: "" +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), -1, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js index 485bcf04e..e39faf7b1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js @@ -9,7 +9,9 @@ description: > overridden to null (type conversion)) ---*/ - var i = Array.prototype.indexOf.call({length: null}, 1); +var i = Array.prototype.indexOf.call({ + length: null +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js index 535a46c8e..ccca42340 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js @@ -9,7 +9,9 @@ description: > overridden to false (type conversion)) ---*/ - var i = Array.prototype.indexOf.call({length: false}, 1); +var i = Array.prototype.indexOf.call({ + length: false +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js index c614ca938..d665e97c1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js @@ -9,7 +9,9 @@ description: > 'array' with length 0 ) ---*/ - var i = Array.prototype.lastIndexOf.call({length: 0}, 1); +var i = Array.prototype.lastIndexOf.call({ + length: 0 +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js index 595122579..7cd825ba8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js @@ -9,7 +9,9 @@ description: > overridden to '0' (type conversion)) ---*/ - var i = Array.prototype.indexOf.call({length: '0'}, 1); +var i = Array.prototype.indexOf.call({ + length: '0' +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js index 365da0c37..bdb5f01fa 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js @@ -9,7 +9,13 @@ description: > Array, length overridden with obj with valueOf) ---*/ - var i = Array.prototype.indexOf.call({length: { valueOf: function () { return 0;}}}, 1); +var i = Array.prototype.indexOf.call({ + length: { + valueOf: function() { + return 0; + } + } +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js index ed4cf9894..c6c14d773 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js @@ -9,12 +9,18 @@ description: > object overridden with obj w/o valueOf (toString)) ---*/ - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var i = Array.prototype.indexOf.call({length: { toString: function () { return '0';}}}, 1); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +var i = Array.prototype.indexOf.call({ + length: { + toString: function() { + return '0'; + } + } +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js index 04ad4c7fb..2c863ea49 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js @@ -9,20 +9,22 @@ description: > empty array) ---*/ - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - var i = Array.prototype.indexOf.call({length: [ ]}, 1); +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. +var i = Array.prototype.indexOf.call({ + length: [] +}, 1); assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js index e90ce2e4c..b64c1213a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js @@ -7,7 +7,11 @@ es5id: 15.4.4.14-4-9 description: Array.prototype.indexOf - 'length' is a number of value 0.1 ---*/ - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: 0.1 }; +var targetObj = []; +var obj = { + 0: targetObj, + 100: targetObj, + length: 0.1 +}; assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), -1, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-1.js index 146456dba..bfb7c07cd 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-5-1 description: Array.prototype.indexOf when fromIndex is string ---*/ - var a = [1,2,1,2,1,2]; +var a = [1, 2, 1, 2, 1, 2]; -assert.sameValue(a.indexOf(2,"2"), 3, '"2" resolves to 2'); -assert.sameValue(a.indexOf(2,"one"), 1, '"one" resolves to 0'); +assert.sameValue(a.indexOf(2, "2"), 3, '"2" resolves to 2'); +assert.sameValue(a.indexOf(2, "one"), 1, '"one" resolves to 0'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js index 7c006a5d0..4ec2ce2a0 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js @@ -9,7 +9,7 @@ description: > is positive number) ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, 2].indexOf(targetObj, 2), -1, '[0, targetObj, 2].indexOf(targetObj, 2)'); assert.sameValue([0, 1, targetObj].indexOf(targetObj, 2), 2, '[0, 1, targetObj].indexOf(targetObj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js index e8dccbd1d..873dcea19 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js @@ -9,7 +9,7 @@ description: > is negative number) ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, 2].indexOf(targetObj, -1), -1, '[0, targetObj, 2].indexOf(targetObj, -1)'); assert.sameValue([0, 1, targetObj].indexOf(targetObj, -1), 2, '[0, 1, targetObj].indexOf(targetObj, -1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js index dbdc234eb..ef4baf22e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js @@ -9,7 +9,7 @@ description: > is Infinity) ---*/ - var arr = []; - arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type +var arr = []; +arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type assert.sameValue(arr.indexOf(true, Infinity), -1, 'arr.indexOf(true, Infinity)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js index 68e8cbe5f..6f9afde36 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js @@ -9,7 +9,7 @@ description: > containing Infinity ---*/ - var arr = []; - arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type +var arr = []; +arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type assert.sameValue(arr.indexOf(true, "Infinity"), -1, 'arr.indexOf(true, "Infinity")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js index 7729f74b5..66bfabd2f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js @@ -9,7 +9,7 @@ description: > containing an exponential number ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0"), -1, '[0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0")'); assert.sameValue([0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0"), 3, '[0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js index ef2936fb7..123b1304f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js @@ -9,7 +9,7 @@ description: > containing a hex number ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003"), -1, '[0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003")'); assert.sameValue([0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003"), 3, '[0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-2.js index 6fbcc5ced..092e4127f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-2.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-5-2 description: Array.prototype.indexOf when fromIndex is floating point number ---*/ - var a = new Array(1,2,3); +var a = new Array(1, 2, 3); -assert.sameValue(a.indexOf(3,0.49), 2, '0.49 resolves to 0'); -assert.sameValue(a.indexOf(1,0.51), 0, '0.51 resolves to 0'); -assert.sameValue(a.indexOf(1,1.51), -1, '1.51 resolves to 1'); +assert.sameValue(a.indexOf(3, 0.49), 2, '0.49 resolves to 0'); +assert.sameValue(a.indexOf(1, 0.51), 0, '0.51 resolves to 0'); +assert.sameValue(a.indexOf(1, 1.51), -1, '1.51 resolves to 1'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js index 0471343e2..106b630ba 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js @@ -9,7 +9,7 @@ description: > containing a number with leading zeros ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10"), -1, '[0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10")'); assert.sameValue([0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10"), 3, '[0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js index 05fbacd4d..887de235a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js @@ -9,15 +9,15 @@ description: > has an own toString method ---*/ - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var fromIndex = { - toString: function () { - return '1'; - } - }; +// objects inherit the default valueOf() method from Object +// that simply returns itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +var fromIndex = { + toString: function() { + return '1'; + } +}; assert.sameValue([0, true].indexOf(true, fromIndex), 1, '[0, true].indexOf(true, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js index 21bb6b03a..e1ed13197 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js @@ -9,11 +9,11 @@ description: > has an own valueOf method ---*/ - var fromIndex = { - valueOf: function () { - return 1; - } - }; +var fromIndex = { + valueOf: function() { + return 1; + } +}; assert.sameValue([0, true].indexOf(true, fromIndex), 1, '[0, true].indexOf(true, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js index 64f186fc8..8bfad2363 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js @@ -10,20 +10,20 @@ description: > method that returns a string ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var fromIndex = { - toString: function () { - toStringAccessed = true; - return '1'; - }, +var fromIndex = { + toString: function() { + toStringAccessed = true; + return '1'; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } +}; assert.sameValue([0, true].indexOf(true, fromIndex), 1, '[0, true].indexOf(true, fromIndex)'); assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-24.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-24.js index 3f83428a2..881197259 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-24.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-24.js @@ -10,22 +10,22 @@ description: > don�t return primitive values ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; - var fromIndex = { - toString: function () { - toStringAccessed = true; - return {}; - }, +var toStringAccessed = false; +var valueOfAccessed = false; +var fromIndex = { + toString: function() { + toStringAccessed = true; + return {}; + }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; + valueOf: function() { + valueOfAccessed = true; + return {}; + } +}; assert.throws(TypeError, function() { - [0, true].indexOf(true, fromIndex); + [0, true].indexOf(true, fromIndex); }); assert(toStringAccessed, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js index a8139b751..f3943fc49 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js @@ -10,24 +10,24 @@ description: > valueOf methods ---*/ - var toStringAccessed = false; - var valueOfAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 1; - } - }; +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 1; + } +}; - var Con = function () {}; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 2; - }; +var child = new Con(); +child.toString = function() { + toStringAccessed = true; + return 2; +}; assert.sameValue([0, true].indexOf(true, child), 1, '[0, true].indexOf(true, child)'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-26.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-26.js index 6c66928ce..43307ad73 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-26.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-26.js @@ -9,30 +9,30 @@ description: > visible when an exception occurs ---*/ - var stepTwoOccurs = false; - var stepFiveOccurs = false; +var stepTwoOccurs = false; +var stepFiveOccurs = false; - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - stepTwoOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + stepTwoOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; - Array.prototype.indexOf.call(obj, undefined, fromIndex); +Array.prototype.indexOf.call(obj, undefined, fromIndex); assert(stepTwoOccurs, 'stepTwoOccurs !== true'); assert(stepFiveOccurs, 'stepFiveOccurs !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-27.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-27.js index 0207afac1..ec03ca839 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-27.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-27.js @@ -9,34 +9,34 @@ description: > visible when an exception occurs ---*/ - var stepThreeOccurs = false; - var stepFiveOccurs = false; +var stepThreeOccurs = false; +var stepFiveOccurs = false; - var obj = {}; +var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - stepThreeOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + valueOf: function() { + stepThreeOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + } + }; + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; - Array.prototype.indexOf.call(obj, undefined, fromIndex); +Array.prototype.indexOf.call(obj, undefined, fromIndex); assert(stepThreeOccurs, 'stepThreeOccurs !== true'); assert(stepFiveOccurs, 'stepFiveOccurs !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-28.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-28.js index 9e8383545..71adbb347 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-28.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-28.js @@ -9,14 +9,14 @@ description: > visible when an exception occurs ---*/ - var stepFiveOccurs = false; - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var stepFiveOccurs = false; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; assert.throws(TypeError, function() { - Array.prototype.indexOf.call(undefined, undefined, fromIndex); + Array.prototype.indexOf.call(undefined, undefined, fromIndex); }); assert.sameValue(stepFiveOccurs, false, 'stepFiveOccurs'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-29.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-29.js index 30381433b..373bbc7e5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-29.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-29.js @@ -9,23 +9,23 @@ description: > visible when an exception occurs ---*/ - var stepFiveOccurs = false; +var stepFiveOccurs = false; - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - throw new RangeError(); - }, - configurable: true - }); +var obj = {}; +Object.defineProperty(obj, "length", { + get: function() { + throw new RangeError(); + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; assert.throws(RangeError, function() { - Array.prototype.indexOf.call(obj, undefined, fromIndex); + Array.prototype.indexOf.call(obj, undefined, fromIndex); }); assert.sameValue(stepFiveOccurs, false, 'stepFiveOccurs'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-3.js index 9030d5314..f9ec42cc8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-5-3 description: Array.prototype.indexOf when fromIndex is boolean ---*/ - var a = [1,2,3]; +var a = [1, 2, 3]; -assert.sameValue(a.indexOf(1,true), -1, 'true resolves to 1'); -assert.sameValue(a.indexOf(1,false), 0, 'false resolves to 0'); +assert.sameValue(a.indexOf(1, true), -1, 'true resolves to 1'); +assert.sameValue(a.indexOf(1, false), 0, 'false resolves to 0'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-30.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-30.js index 9a229e976..d3eac966c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-30.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-30.js @@ -9,27 +9,27 @@ description: > visible when an exception occurs ---*/ - var stepFiveOccurs = false; +var stepFiveOccurs = false; - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - throw new TypeError(); - } - }; - }, - configurable: true - }); +var obj = {}; +Object.defineProperty(obj, "length", { + get: function() { + return { + valueOf: function() { + throw new TypeError(); + } + }; + }, + configurable: true +}); - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; +var fromIndex = { + valueOf: function() { + stepFiveOccurs = true; + return 0; + } +}; assert.throws(TypeError, function() { - Array.prototype.indexOf.call(obj, undefined, fromIndex); + Array.prototype.indexOf.call(obj, undefined, fromIndex); }); assert.sameValue(stepFiveOccurs, false, 'stepFiveOccurs'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js index 9a7f1d3ff..64442d0db 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js @@ -9,7 +9,7 @@ description: > verify truncation occurs in the proper direction ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, 2].indexOf(targetObj, 2.5), -1, '[0, targetObj, 2].indexOf(targetObj, 2.5)'); assert.sameValue([0, 1, targetObj].indexOf(targetObj, 2.5), 2, '[0, 1, targetObj].indexOf(targetObj, 2.5)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js index df4812b78..a11186d51 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js @@ -9,7 +9,7 @@ description: > verify truncation occurs in the proper direction ---*/ - var targetObj = {}; +var targetObj = {}; assert.sameValue([0, targetObj, 2].indexOf(targetObj, -1.5), -1, '[0, targetObj, 2].indexOf(targetObj, -1.5)'); assert.sameValue([0, 1, targetObj].indexOf(targetObj, -1.5), 2, '[0, 1, targetObj].indexOf(targetObj, -1.5)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-4.js index 3611b1799..4230ef2bc 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-4.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-5-4 description: Array.prototype.indexOf returns 0 if fromIndex is 'undefined' ---*/ - var a = [1,2,3]; +var a = [1, 2, 3]; // undefined resolves to 0 -assert.sameValue(a.indexOf(1,undefined), 0, 'a.indexOf(1,undefined)'); +assert.sameValue(a.indexOf(1, undefined), 0, 'a.indexOf(1,undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-5.js index 9056a5fe9..4cd4418d5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.14-5-5 description: Array.prototype.indexOf returns 0 if fromIndex is null ---*/ - var a = [1,2,3]; +var a = [1, 2, 3]; // null resolves to 0 -assert.sameValue(a.indexOf(1,null), 0, 'a.indexOf(1,null)'); +assert.sameValue(a.indexOf(1, null), 0, 'a.indexOf(1,null)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js index 69610b347..2ea05b825 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-5-6 description: Array.prototype.indexOf - 'fromIndex' isn't passed ---*/ - var arr = [0, 1, 2, 3, 4]; - //'fromIndex' will be set as 0 if not passed by default +var arr = [0, 1, 2, 3, 4]; +//'fromIndex' will be set as 0 if not passed by default assert.sameValue(arr.indexOf(0), arr.indexOf(0, 0), 'arr.indexOf(0)'); assert.sameValue(arr.indexOf(2), arr.indexOf(2, 0), 'arr.indexOf(2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js index f2da76943..1309ad967 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js @@ -9,8 +9,8 @@ description: > Array length ---*/ - var a = [1,2,3]; +var a = [1, 2, 3]; -assert.sameValue(a.indexOf(1,5), -1, 'a.indexOf(1,5)'); -assert.sameValue(a.indexOf(1,3), -1, 'a.indexOf(1,3)'); -assert.sameValue([ ].indexOf(1,0), -1, '[ ].indexOf(1,0)'); +assert.sameValue(a.indexOf(1, 5), -1, 'a.indexOf(1,5)'); +assert.sameValue(a.indexOf(1, 3), -1, 'a.indexOf(1,3)'); +assert.sameValue([].indexOf(1, 0), -1, '[ ].indexOf(1,0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js index 57d4f191d..4531f8051 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js @@ -7,10 +7,10 @@ es5id: 15.4.4.14-8-1 description: Array.prototype.indexOf with negative fromIndex ---*/ - var a = new Array(1,2,3); +var a = new Array(1, 2, 3); -assert.sameValue(a.indexOf(2,-1), -1, 'a.indexOf(2,-1)'); -assert.sameValue(a.indexOf(2,-2), 1, 'a.indexOf(2,-2)'); -assert.sameValue(a.indexOf(1,-3), 0, 'a.indexOf(1,-3)'); -assert.sameValue(a.indexOf(1,-5.3), 0, 'a.indexOf(1,-5.3)'); +assert.sameValue(a.indexOf(2, -1), -1, 'a.indexOf(2,-1)'); +assert.sameValue(a.indexOf(2, -2), 1, 'a.indexOf(2,-2)'); +assert.sameValue(a.indexOf(1, -3), 0, 'a.indexOf(1,-3)'); +assert.sameValue(a.indexOf(1, -5.3), 0, 'a.indexOf(1,-5.3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-1.js index 94125fa81..91a596078 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-1.js @@ -7,9 +7,13 @@ es5id: 15.4.4.14-9-1 description: Array.prototype.indexOf must return correct index (boolean) ---*/ - var obj = {toString:function (){return true}}; - var _false = false; - var a = [obj,"true", undefined,0,_false,null,1,"str",0,1,true,false,true,false]; +var obj = { + toString: function() { + return true + } +}; +var _false = false; +var a = [obj, "true", undefined, 0, _false, null, 1, "str", 0, 1, true, false, true, false]; - assert.sameValue(a.indexOf(true), 10, 'a[10]=true'); - assert.sameValue(a.indexOf(false), 4, 'a[4] =_false'); +assert.sameValue(a.indexOf(true), 10, 'a[10]=true'); +assert.sameValue(a.indexOf(false), 4, 'a[4] =_false'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-10.js index 4b3ec82c6..92ebaa80a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-10.js @@ -10,7 +10,11 @@ es5id: 15.4.4.14-9-10 description: Array.prototype.indexOf must return correct index (NaN) ---*/ - var _NaN = NaN; - var a = new Array("NaN",undefined,0,false,null,{toString:function (){return NaN}},"false",_NaN,NaN); +var _NaN = NaN; +var a = new Array("NaN", undefined, 0, false, null, { + toString: function() { + return NaN + } +}, "false", _NaN, NaN); assert.sameValue(a.indexOf(NaN), -1, 'NaN is equal to nothing, including itself.'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js index cf1aac541..77108424d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js @@ -9,14 +9,14 @@ description: > adding elements to the array during iteration ---*/ - var arr = [20]; +var arr = [20]; - Object.defineProperty(arr, "0", { - get: function () { - arr[1] = 1; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr[1] = 1; + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf(1), -1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-2.js index fcce013d2..410a7c0ef 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-2.js @@ -7,12 +7,16 @@ es5id: 15.4.4.14-9-2 description: Array.prototype.indexOf must return correct index (Number) ---*/ - var obj = {toString:function (){return 0}}; - var one = 1; - var _float = -(4/3); - var a = new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3)); +var obj = { + toString: function() { + return 0 + } +}; +var one = 1; +var _float = -(4 / 3); +var a = new Array(false, undefined, null, "0", obj, -1.3333333333333, "str", -0, true, +0, one, 1, 0, false, _float, -(4 / 3)); -assert.sameValue(a.indexOf(-(4/3)), 14, 'a[14]=_float===-(4/3)'); +assert.sameValue(a.indexOf(-(4 / 3)), 14, 'a[14]=_float===-(4/3)'); assert.sameValue(a.indexOf(0), 7, 'a[7] = +0, 0===+0'); assert.sameValue(a.indexOf(-0), 7, 'a[7] = +0, -0===+0'); assert.sameValue(a.indexOf(1), 10, 'a[10] =one=== 1'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-3.js index 3c83a98d9..8b4ff007c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-3.js @@ -7,8 +7,12 @@ es5id: 15.4.4.14-9-3 description: Array.prototype.indexOf must return correct index(string) ---*/ - var obj = {toString:function (){return "false"}}; - var szFalse = "false"; - var a = new Array("false1",undefined,0,false,null,1,obj,0,szFalse, "false"); +var obj = { + toString: function() { + return "false" + } +}; +var szFalse = "false"; +var a = new Array("false1", undefined, 0, false, null, 1, obj, 0, szFalse, "false"); assert.sameValue(a.indexOf("false"), 8, 'a[8]=szFalse'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-4.js index d0b3a3a3e..697f91967 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-4.js @@ -7,9 +7,13 @@ es5id: 15.4.4.14-9-4 description: Array.prototype.indexOf must return correct index(undefined) ---*/ - var obj = {toString:function (){return undefined;}}; - var _undefined1 = undefined; - var _undefined2; - var a = new Array(true,0,false,null,1,"undefined",obj,1,_undefined2,_undefined1,undefined); +var obj = { + toString: function() { + return undefined; + } +}; +var _undefined1 = undefined; +var _undefined2; +var a = new Array(true, 0, false, null, 1, "undefined", obj, 1, _undefined2, _undefined1, undefined); assert.sameValue(a.indexOf(undefined), 8, 'a[8]=_undefined2'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-5.js index 3a31b1477..8537c3ac3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-5.js @@ -7,9 +7,21 @@ es5id: 15.4.4.14-9-5 description: Array.prototype.indexOf must return correct index (Object) ---*/ - var obj1 = {toString:function (){return "false"}}; - var obj2 = {toString:function (){return "false"}}; - var obj3 = obj1; - var a = new Array(false,undefined,0,false,null,{toString:function (){return "false"}},"false",obj2,obj1,obj3); +var obj1 = { + toString: function() { + return "false" + } +}; +var obj2 = { + toString: function() { + return "false" + } +}; +var obj3 = obj1; +var a = new Array(false, undefined, 0, false, null, { + toString: function() { + return "false" + } +}, "false", obj2, obj1, obj3); assert.sameValue(a.indexOf(obj3), 8, 'a[8] = obj1'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-6.js index adb3280e8..cb657505b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-6.js @@ -7,8 +7,12 @@ es5id: 15.4.4.14-9-6 description: Array.prototype.indexOf must return correct index(null) ---*/ - var obj = {toString:function (){return null}}; - var _null = null; - var a = new Array(true,undefined,0,false,_null,1,"str",0,1,obj,true,false,null); +var obj = { + toString: function() { + return null + } +}; +var _null = null; +var a = new Array(true, undefined, 0, false, _null, 1, "str", 0, 1, obj, true, false, null); assert.sameValue(a.indexOf(null), 4, 'a[4]=_null'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js index 33bf64933..0a8028b4e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-9-7 description: Array.prototype.indexOf must return correct index (self reference) ---*/ - var a = new Array(0,1,2,3); - a[2] = a; +var a = new Array(0, 1, 2, 3); +a[2] = a; assert.sameValue(a.indexOf(a), 2, 'a.indexOf(a)'); assert.sameValue(a.indexOf(3), 3, 'a.indexOf(3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js index 86889e437..7e07ce058 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js @@ -7,8 +7,8 @@ es5id: 15.4.4.14-9-8 description: Array.prototype.indexOf must return correct index (Array) ---*/ - var b = new Array("0,1"); - var a = new Array(0,b,"0,1",3); +var b = new Array("0,1"); +var a = new Array(0, b, "0,1", 3); assert.sameValue(a.indexOf(b.toString()), 2, 'a.indexOf(b.toString())'); assert.sameValue(a.indexOf("0,1"), 2, 'a.indexOf("0,1")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js index 82fc8113c..800f568bf 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js @@ -7,15 +7,15 @@ es5id: 15.4.4.14-9-9 description: Array.prototype.indexOf must return correct index (Sparse Array) ---*/ - var a = new Array(0,1); - a[4294967294] = 2; // 2^32-2 - is max array element - a[4294967295] = 3; // 2^32-1 added as non-array element property - a[4294967296] = 4; // 2^32 added as non-array element property - a[4294967297] = 5; // 2^32+1 added as non-array element property +var a = new Array(0, 1); +a[4294967294] = 2; // 2^32-2 - is max array element +a[4294967295] = 3; // 2^32-1 added as non-array element property +a[4294967296] = 4; // 2^32 added as non-array element property +a[4294967297] = 5; // 2^32+1 added as non-array element property - // start searching near the end so in case implementation actually tries to test all missing elements!! +// start searching near the end so in case implementation actually tries to test all missing elements!! -assert.sameValue(a.indexOf(2,4294967290 ), 4294967294, 'a.indexOf(2,4294967290 )'); -assert.sameValue(a.indexOf(3,4294967290), -1, 'a.indexOf(3,4294967290)'); -assert.sameValue(a.indexOf(4,4294967290), -1, 'a.indexOf(4,4294967290)'); -assert.sameValue(a.indexOf(5,4294967290), -1, 'a.indexOf(5,4294967290)'); +assert.sameValue(a.indexOf(2, 4294967290), 4294967294, 'a.indexOf(2,4294967290 )'); +assert.sameValue(a.indexOf(3, 4294967290), -1, 'a.indexOf(3,4294967290)'); +assert.sameValue(a.indexOf(4, 4294967290), -1, 'a.indexOf(4,4294967290)'); +assert.sameValue(a.indexOf(5, 4294967290), -1, 'a.indexOf(5,4294967290)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js index 0d17a2be4..043314c60 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js @@ -9,14 +9,14 @@ description: > here ---*/ - var arr = { }; +var arr = {}; - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); +Object.defineProperty(arr, "length", { + get: function() { + arr[2] = "length"; + return 3; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, "length"), 2, 'Array.prototype.indexOf.call(arr, "length")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-10.js index ff6b0a9c8..4a2797e62 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-10.js @@ -9,19 +9,19 @@ description: > after current position are visited on an Array ---*/ - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf(6.99), 1, 'arr.indexOf(6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js index 6e9587d5a..65e504325 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js @@ -9,21 +9,23 @@ description: > property not to be visited on an Array-like object ---*/ - var arr = { length: 2 }; +var arr = { + length: 2 +}; - Object.defineProperty(arr, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, 6.99), -1, 'Array.prototype.indexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js index 172dd1133..d07f4a710 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js @@ -9,21 +9,21 @@ description: > property not to be visited on an Array ---*/ - var arr = [1, 2]; +var arr = [1, 2]; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf("6.99"), -1, 'arr.indexOf("6.99")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-13.js index 2390e6e7f..f45f555cf 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-13.js @@ -9,16 +9,19 @@ description: > prototype index property not to be visited on an Array-like Object ---*/ - var arr = { 2: 2, length: 20 }; +var arr = { + 2: 2, + length: 20 +}; - Object.defineProperty(arr, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete Object.prototype[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; +Object.prototype[1] = 1; assert.sameValue(Array.prototype.indexOf.call(arr, 1), -1, 'Array.prototype.indexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-14.js index 81cbe7b98..216e4da0b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-14.js @@ -9,16 +9,16 @@ description: > prototype index property not to be visited on an Array ---*/ - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; +Array.prototype[1] = 1; assert.sameValue(arr.indexOf(1), -1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-15.js index c7c60d7c4..5c5be6dc9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-15.js @@ -10,16 +10,21 @@ description: > Array-like object ---*/ - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; +var arr = { + 0: 0, + 1: 111, + 2: 2, + length: 10 +}; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; +Object.prototype[1] = 1; assert.sameValue(Array.prototype.indexOf.call(arr, 1), 1, 'Array.prototype.indexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-16.js index 707207440..ed4072719 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-16.js @@ -9,16 +9,16 @@ description: > property causes prototype index property to be visited on an Array ---*/ - var arr = [0, 111, 2]; +var arr = [0, 111, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; +Array.prototype[1] = 1; assert.sameValue(arr.indexOf(1), 1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js index 74a6eddb4..8309a3b86 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js @@ -9,14 +9,14 @@ description: > property not to be visited ---*/ - var arr = [0, 1, 2, "last"]; +var arr = [0, 1, 2, "last"]; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 3; + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf("last"), -1, 'arr.indexOf("last")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-18.js index f1e2fa4f4..1d728bce1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-18.js @@ -9,21 +9,21 @@ description: > prototype property causes prototype index property to be visited ---*/ - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.indexOf("prototype"), 2, 'arr.indexOf("prototype")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js index b30be5fda..0fab8d12b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js @@ -10,22 +10,22 @@ description: > flags: [noStrict] ---*/ - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.indexOf("unconfigurable"), 2, 'arr.indexOf("unconfigurable")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js index a0e8b8295..fac0434b9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js @@ -9,15 +9,17 @@ description: > here on an Array-like object ---*/ - var arr = { length: 30 }; - var targetObj = function () { }; +var arr = { + length: 30 +}; +var targetObj = function() {}; - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 3; - } - }; +var fromIndex = { + valueOf: function() { + arr[4] = targetObj; + return 3; + } +}; assert.sameValue(Array.prototype.indexOf.call(arr, targetObj, fromIndex), 4, 'Array.prototype.indexOf.call(arr, targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js index 5ac6827ee..d7954ea90 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js @@ -9,15 +9,15 @@ description: > here on an Array ---*/ - var arr = []; - arr.length = 30; - var targetObj = function () { }; +var arr = []; +arr.length = 30; +var targetObj = function() {}; - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 3; - } - }; +var fromIndex = { + valueOf: function() { + arr[4] = targetObj; + return 3; + } +}; assert.sameValue(arr.indexOf(targetObj, fromIndex), 4, 'arr.indexOf(targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js index 8a5e756c5..1340a1d67 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js @@ -9,14 +9,16 @@ description: > here ---*/ - var arr = { 2: 6.99 }; +var arr = { + 2: 6.99 +}; - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 3; - }, - configurable: true - }); +Object.defineProperty(arr, "length", { + get: function() { + delete arr[2]; + return 3; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, 6.99), -1, 'Array.prototype.indexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js index 255c327a3..926a37aeb 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js @@ -9,13 +9,16 @@ description: > here on an Array-like object ---*/ - var arr = { 10: false, length: 30 }; +var arr = { + 10: false, + length: 30 +}; - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 3; - } - }; +var fromIndex = { + valueOf: function() { + delete arr[10]; + return 3; + } +}; assert.sameValue(Array.prototype.indexOf.call(arr, false, fromIndex), -1, 'Array.prototype.indexOf.call(arr, false, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js index e78f717c3..41e275c6c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js @@ -9,15 +9,15 @@ description: > here on an Array ---*/ - var arr = []; - arr[10] = "10"; - arr.length = 20; +var arr = []; +arr[10] = "10"; +arr.length = 20; - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 3; - } - }; +var fromIndex = { + valueOf: function() { + delete arr[10]; + return 3; + } +}; assert.sameValue(arr.indexOf("10", fromIndex), -1, 'arr.indexOf("10", fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js index 58e38614c..317816ab6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js @@ -9,19 +9,21 @@ description: > current position are visited on an Array-like object ---*/ - var arr = { length: 2 }; +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, 1), 1, 'Array.prototype.indexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js index aa43ed573..af3577d7d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js @@ -9,19 +9,19 @@ description: > current position are visited on an Array ---*/ - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.indexOf(1), 1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-9.js index e36af343d..22ea6154a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-9.js @@ -9,19 +9,21 @@ description: > after current position are visited on an Array-like object ---*/ - var arr = { length: 2 }; +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(arr, 6.99), 1, 'Array.prototype.indexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js index dc8bba867..211c212cc 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js @@ -9,7 +9,12 @@ description: > property on an Array-like object ---*/ - var obj = { 0: 0, 1: 1, 2: 2, length: 3 }; +var obj = { + 0: 0, + 1: 1, + 2: 2, + length: 3 +}; assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); assert.sameValue(Array.prototype.indexOf.call(obj, 1), 1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js index 8cf69e48d..af735dd41 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js @@ -9,27 +9,29 @@ description: > property on an Array-like object ---*/ - var obj = { length: 3 }; - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); +var obj = { + length: 3 +}; +Object.defineProperty(obj, "0", { + get: function() { + return 0; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 1; + }, + configurable: true +}); - Object.defineProperty(obj, "2", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); assert.sameValue(Array.prototype.indexOf.call(obj, 1), 1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-11.js index 0d1ca8e70..d744fec56 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-11.js @@ -9,14 +9,14 @@ description: > property that overrides an inherited data property on an Array ---*/ - var arr = []; +var arr = []; - Array.prototype[0] = false; - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); +Array.prototype[0] = false; +Object.defineProperty(arr, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(arr.indexOf(true), 0, 'arr.indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-12.js index de13d9f38..77f337f6b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-12.js @@ -10,14 +10,16 @@ description: > Array-like object ---*/ - var obj = { length: 1 }; +var obj = { + length: 1 +}; - Object.prototype[0] = false; - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); +Object.prototype[0] = false; +Object.defineProperty(obj, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, true), 0, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-13.js index 27be95dc6..f260b91bf 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-13.js @@ -9,20 +9,20 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var arr = []; +var arr = []; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(arr.indexOf(true), 0, 'arr.indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-14.js index 265667e71..b3133a5bc 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-14.js @@ -10,20 +10,22 @@ description: > Array-like object ---*/ - var obj = { length: 1 }; +var obj = { + length: 1 +}; - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return true; + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, true), 0, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-15.js index 44b2da7af..e9f5b47b7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-15.js @@ -9,26 +9,26 @@ description: > accessor property on an Array ---*/ - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 10; + }, + configurable: true +}); - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "1", { + get: function() { + return 20; + }, + configurable: true +}); - Object.defineProperty(Array.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return 30; + }, + configurable: true +}); assert.sameValue([, , , ].indexOf(10), 0, '[, , , ].indexOf(10)'); assert.sameValue([, , , ].indexOf(20), 1, '[, , , ].indexOf(20)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-16.js index 754db8aad..8a8057ee9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-16.js @@ -9,27 +9,33 @@ description: > accessor property on an Array-like object ---*/ - Object.defineProperty(Object.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return 10; + }, + configurable: true +}); - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "1", { + get: function() { + return 20; + }, + configurable: true +}); - Object.defineProperty(Object.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "2", { + get: function() { + return 30; + }, + configurable: true +}); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, 10), 0, 'Array.prototype.indexOf.call({ length: 3 }, 10)'); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, 20), 1, 'Array.prototype.indexOf.call({ length: 3 }, 20)'); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, 30), 2, 'Array.prototype.indexOf.call({ length: 3 }, 30)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, 10), 0, 'Array.prototype.indexOf.call({ length: 3 }, 10)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, 20), 1, 'Array.prototype.indexOf.call({ length: 3 }, 20)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, 30), 2, 'Array.prototype.indexOf.call({ length: 3 }, 30)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js index 551e2a30e..9ffbbe16c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js @@ -9,10 +9,10 @@ description: > property without a get function on an Array ---*/ - var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +var arr = []; +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); assert.sameValue(arr.indexOf(undefined), 0, 'arr.indexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js index 4701e3fd8..e79db90e3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js @@ -9,10 +9,12 @@ description: > property without a get function on an Array-like object ---*/ - var obj = { length: 1 }; - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); +var obj = { + length: 1 +}; +Object.defineProperty(obj, "0", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, undefined), 0, 'Array.prototype.indexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-19.js index b640d8965..2ded8363e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-19.js @@ -10,18 +10,18 @@ description: > accessor property on an Array ---*/ - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(arr.indexOf(undefined), 0, 'arr.indexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js index 56508fe50..793084e9e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js @@ -10,23 +10,23 @@ description: > accessor property on an Array-like object ---*/ - var proto = {}; - Object.defineProperty(proto, "0", { - get: function () { - return 2; - }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "0", { + get: function() { + return 2; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 1; +var child = new Con(); +child.length = 1; - Object.defineProperty(child, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(child, "0", { + set: function() {}, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(child, undefined), 0, 'Array.prototype.indexOf.call(child, undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-21.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-21.js index 24144df08..ffc933148 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-21.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-21.js @@ -9,9 +9,9 @@ description: > accessor property without a get function on an Array ---*/ - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); assert.sameValue([, ].indexOf(undefined), 0, '[, ].indexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-22.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-22.js index 922d2e7ce..f9fa4d41a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-22.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-22.js @@ -9,9 +9,11 @@ description: > accessor property without a get function on an Array-like object ---*/ - Object.defineProperty(Object.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + set: function() {}, + configurable: true +}); -assert.sameValue(Array.prototype.indexOf.call({ length: 1 }, undefined), 0, 'Array.prototype.indexOf.call({ length: 1 }, undefined)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 1 +}, undefined), 0, 'Array.prototype.indexOf.call({ length: 1 }, undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js index b2f3bc442..4e5bb8b13 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js @@ -10,9 +10,9 @@ description: > less than number of parameters) ---*/ - var func = function (a, b) { - return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && - -1 === Array.prototype.indexOf.call(arguments, arguments[1]); - }; +var func = function(a, b) { + return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && + -1 === Array.prototype.indexOf.call(arguments, arguments[1]); +}; assert(func(true), 'func(true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js index 330ea1966..caa167d9d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js @@ -10,10 +10,10 @@ description: > to number of parameters) ---*/ - var func = function (a, b) { - return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && - 1 === Array.prototype.indexOf.call(arguments, arguments[1]) && - -1 === Array.prototype.indexOf.call(arguments, arguments[2]); - }; +var func = function(a, b) { + return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && + 1 === Array.prototype.indexOf.call(arguments, arguments[1]) && + -1 === Array.prototype.indexOf.call(arguments, arguments[2]); +}; assert(func(0, true), 'func(0, true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js index 5935f22ba..02017a929 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js @@ -10,10 +10,10 @@ description: > greater than number of parameters) ---*/ - var func = function (a, b) { - return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && - 3 === Array.prototype.indexOf.call(arguments, arguments[3]) && - -1 === Array.prototype.indexOf.call(arguments, arguments[4]); - }; +var func = function(a, b) { + return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && + 3 === Array.prototype.indexOf.call(arguments, arguments[3]) && + -1 === Array.prototype.indexOf.call(arguments, arguments[4]); +}; assert(func(0, false, 0, true), 'func(0, false, 0, true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js index dc9119d68..2a13283be 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js @@ -9,26 +9,26 @@ description: > iterations on an Array ---*/ - var preIterVisible = false; - var arr = []; +var preIterVisible = false; +var arr = []; - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + preIterVisible = true; + return false; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true +}); assert.sameValue(arr.indexOf(true), 1, 'arr.indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js index 1c941586e..475817a8e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js @@ -9,26 +9,28 @@ description: > iterations on an Array-like object ---*/ - var preIterVisible = false; - var obj = { length: 2 }; +var preIterVisible = false; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + preIterVisible = true; + return false; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true +}); assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-3.js index 1df5d9eb9..84006e81e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-3.js @@ -9,6 +9,6 @@ description: > property that overrides an inherited data property on an Array ---*/ - Array.prototype[0] = false; +Array.prototype[0] = false; assert.sameValue([true].indexOf(true), 0, '[true].indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-30.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-30.js index 440a31448..c2c8d1350 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-30.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-30.js @@ -9,24 +9,24 @@ description: > exception on an Array ---*/ - var accessed = false; - var arr = []; +var accessed = false; +var arr = []; - Object.defineProperty(arr, "0", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + throw new TypeError(); + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + accessed = true; + return true; + }, + configurable: true +}); assert.throws(TypeError, function() { - arr.indexOf(true); + arr.indexOf(true); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-31.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-31.js index 9cae879bc..8977a9893 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-31.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-31.js @@ -9,24 +9,26 @@ description: > exception on an Array-like object ---*/ - var accessed = false; - var obj = { length: 2 }; +var accessed = false; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + throw new TypeError(); + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + accessed = true; + return true; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.indexOf.call(obj, true); + Array.prototype.indexOf.call(obj, true); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-4.js index 171ced904..892068426 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-4.js @@ -10,6 +10,10 @@ description: > Array-like object ---*/ - Object.prototype[0] = false; +Object.prototype[0] = false; -assert.sameValue(Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true), 0, 'Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true)'); +assert.sameValue(Array.prototype.indexOf.call({ + 0: true, + 1: 1, + length: 2 +}, true), 0, 'Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-5.js index 24a407691..1d4332e74 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-5.js @@ -9,11 +9,11 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); assert.sameValue([true].indexOf(true), 0, '[true].indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-6.js index 22e410e7d..4661515c4 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-6.js @@ -10,11 +10,15 @@ description: > Array-like object ---*/ - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); +Object.defineProperty(Object.prototype, "0", { + get: function() { + return false; + }, + configurable: true +}); -assert.sameValue(Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true), 0, 'Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true)'); +assert.sameValue(Array.prototype.indexOf.call({ + 0: true, + 1: 1, + length: 2 +}, true), 0, 'Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-7.js index 9382abf00..6344f1784 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-7.js @@ -9,9 +9,9 @@ description: > data property on an Array ---*/ - Array.prototype[0] = true; - Array.prototype[1] = false; - Array.prototype[2] = "true"; +Array.prototype[0] = true; +Array.prototype[1] = false; +Array.prototype[2] = "true"; assert.sameValue([, , , ].indexOf(true), 0, '[, , , ].indexOf(true)'); assert.sameValue([, , , ].indexOf(false), 1, '[, , , ].indexOf(false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-8.js index 52e280f1c..7ac1d9810 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-8.js @@ -9,10 +9,16 @@ description: > data property on an Array-like object ---*/ - Object.prototype[0] = true; - Object.prototype[1] = false; - Object.prototype[2] = "true"; +Object.prototype[0] = true; +Object.prototype[1] = false; +Object.prototype[2] = "true"; -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, true), 0, 'Array.prototype.indexOf.call({ length: 3 }, true)'); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, false), 1, 'Array.prototype.indexOf.call({ length: 3 }, false)'); -assert.sameValue(Array.prototype.indexOf.call({ length: 3 }, "true"), 2, 'Array.prototype.indexOf.call({ length: 3 }, "true")'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, true), 0, 'Array.prototype.indexOf.call({ length: 3 }, true)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, false), 1, 'Array.prototype.indexOf.call({ length: 3 }, false)'); +assert.sameValue(Array.prototype.indexOf.call({ + length: 3 +}, "true"), 2, 'Array.prototype.indexOf.call({ length: 3 }, "true")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js index ed295d201..007bbcc02 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js @@ -9,27 +9,27 @@ description: > property on an Array ---*/ - var arr = [, , , ]; - Object.defineProperty(arr, "0", { - get: function () { - return 0; - }, - configurable: true - }); +var arr = [, , , ]; +Object.defineProperty(arr, "0", { + get: function() { + return 0; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true +}); - Object.defineProperty(arr, "2", { - get: function () { - return 2; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + return 2; + }, + configurable: true +}); assert.sameValue(arr.indexOf(0), 0, 'arr.indexOf(0)'); assert.sameValue(arr.indexOf(1), 1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js index 8c2c6d709..9402b5c03 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js @@ -14,4 +14,6 @@ assert.sameValue(["0"].indexOf(0), -1, '["0"].indexOf(0)'); assert.sameValue([false].indexOf(0), -1, '[false].indexOf(0)'); assert.sameValue([undefined].indexOf(0), -1, '[undefined].indexOf(0)'); assert.sameValue([null].indexOf(0), -1, '[null].indexOf(0)'); -assert.sameValue([[]].indexOf(0), -1, '[[]].indexOf(0)'); +assert.sameValue([ + [] +].indexOf(0), -1, '[[]].indexOf(0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js index 8aad97866..dcce4f017 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js @@ -9,8 +9,8 @@ description: > are Object type, and they refer to the same object ---*/ - var obj1 = {}; - var obj2 = {}; - var obj3 = obj2; +var obj1 = {}; +var obj2 = {}; +var obj3 = obj2; assert.sameValue([{}, obj1, obj2].indexOf(obj3), 2, '[{}, obj1, obj2].indexOf(obj3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js index a593c8ce4..94a30fd4a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js @@ -9,26 +9,26 @@ description: > element once search value is found ---*/ - var arr = [1, 2, , 1, 2]; - var elementThirdAccessed = false; - var elementFifthAccessed = false; +var arr = [1, 2, , 1, 2]; +var elementThirdAccessed = false; +var elementFifthAccessed = false; - Object.defineProperty(arr, "2", { - get: function () { - elementThirdAccessed = true; - return 2; - }, - configurable: true - }); - Object.defineProperty(arr, "4", { - get: function () { - elementFifthAccessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + elementThirdAccessed = true; + return 2; + }, + configurable: true +}); +Object.defineProperty(arr, "4", { + get: function() { + elementFifthAccessed = true; + return 2; + }, + configurable: true +}); - arr.indexOf(2); +arr.indexOf(2); assert.sameValue(elementThirdAccessed, false, 'elementThirdAccessed'); assert.sameValue(elementFifthAccessed, false, 'elementFifthAccessed'); |