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/Function/prototype/apply | |
parent | 7b01f9799f99851955f23c18c12e6651c1941022 (diff) | |
download | qtdeclarative-testsuites-a01de4a722d088055a7d84d8c691ddd7109edb34.tar.gz |
js-beautify: make all indentation consistent (depth & character) (#1409)
Diffstat (limited to 'test/built-ins/Function/prototype/apply')
37 files changed, 104 insertions, 78 deletions
diff --git a/test/built-ins/Function/prototype/apply/15.3.4.3-1-s.js b/test/built-ins/Function/prototype/apply/15.3.4.3-1-s.js index 7ee954176..daeed835d 100644 --- a/test/built-ins/Function/prototype/apply/15.3.4.3-1-s.js +++ b/test/built-ins/Function/prototype/apply/15.3.4.3-1-s.js @@ -10,8 +10,8 @@ description: > flags: [onlyStrict] ---*/ - function fun() { - return (this instanceof String); - } +function fun() { + return (this instanceof String); +} assert.sameValue(fun.apply("", Array), false, 'fun.apply("", Array)'); diff --git a/test/built-ins/Function/prototype/apply/15.3.4.3-2-s.js b/test/built-ins/Function/prototype/apply/15.3.4.3-2-s.js index a717204bd..0c792e14a 100644 --- a/test/built-ins/Function/prototype/apply/15.3.4.3-2-s.js +++ b/test/built-ins/Function/prototype/apply/15.3.4.3-2-s.js @@ -10,8 +10,8 @@ description: > flags: [onlyStrict] ---*/ - function fun() { - return (this instanceof Number); - } +function fun() { + return (this instanceof Number); +} assert.sameValue(fun.apply(-12, Array), false, 'fun.apply(-12, Array)'); diff --git a/test/built-ins/Function/prototype/apply/15.3.4.3-3-s.js b/test/built-ins/Function/prototype/apply/15.3.4.3-3-s.js index 762c5c593..f62f5d967 100644 --- a/test/built-ins/Function/prototype/apply/15.3.4.3-3-s.js +++ b/test/built-ins/Function/prototype/apply/15.3.4.3-3-s.js @@ -10,8 +10,8 @@ description: > flags: [onlyStrict] ---*/ - function fun() { - return (this instanceof Boolean); - } +function fun() { + return (this instanceof Boolean); +} assert.sameValue(fun.apply(false, Array), false, 'fun.apply(false, Array)'); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js index ce9541aa0..244c35acd 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js @@ -17,7 +17,9 @@ if (!(Function.prototype.apply.hasOwnProperty('length'))) { var obj = Function.prototype.apply.length; -verifyNotWritable(Function.prototype.apply, "length", null, function(){return "shifted";}); +verifyNotWritable(Function.prototype.apply, "length", null, function() { + return "shifted"; +}); //CHECK#2 if (Function.prototype.apply.length !== obj) { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A11.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A11.js index 18da556b6..dcab5610c 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A11.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A11.js @@ -21,7 +21,7 @@ if (Function.prototype.apply.propertyIsEnumerable('length')) { } // CHECK#2 -for (var p in Function.prototype.apply){ - if (p==="length") - $ERROR('#2: the Function.prototype.apply.length property has the attributes DontEnum'); +for (var p in Function.prototype.apply) { + if (p === "length") + $ERROR('#2: the Function.prototype.apply.length property has the attributes DontEnum'); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A12.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A12.js index c84faf776..50ea57ee8 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A12.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A12.js @@ -11,5 +11,5 @@ description: > //CHECK#1 if (Function.prototype.apply.prototype !== undefined) { - $ERROR('#1: Function.prototype.apply has not prototype property'+Function.prototype.apply.prototype); + $ERROR('#1: Function.prototype.apply has not prototype property' + Function.prototype.apply.prototype); } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A16.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A16.js index ce11c7e88..bf25dfed3 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A16.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A16.js @@ -17,7 +17,7 @@ if (typeof re === 'function') { try { Function.prototype.bind.call(re, undefined); $ERROR('#1: If IsCallable(func) is false, ' + - 'then (bind should) throw a TypeError exception'); + 'then (bind should) throw a TypeError exception'); } catch (e) { if (!(e instanceof TypeError)) { $ERROR('#1: TypeError expected. Actual: ' + e); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T1.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T1.js index c8a7711c8..77e0ffe08 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T1.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T1.js @@ -12,11 +12,11 @@ description: > property. Prototype of the object is Function() ---*/ -var proto=Function(); +var proto = Function(); -function FACTORY(){}; +function FACTORY() {}; -FACTORY.prototype=proto; +FACTORY.prototype = proto; var obj = new FACTORY; @@ -31,6 +31,6 @@ try { $ERROR('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T2.js index 8d65c78db..ad2b14770 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A1_T2.js @@ -12,9 +12,9 @@ description: > property. Prototype of the object is Function.prototype ---*/ -function FACTORY(){}; +function FACTORY() {}; -FACTORY.prototype=Function.prototype; +FACTORY.prototype = Function.prototype; var obj = new FACTORY; @@ -29,6 +29,6 @@ try { $ERROR('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); + $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A2_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A2_T2.js index a56a6b4d1..872e46597 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A2_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A2_T2.js @@ -7,7 +7,7 @@ es5id: 15.3.4.3_A2_T2 description: Checking f.apply.length, where f is new Function ---*/ -var f=new Function; +var f = new Function; //CHECK#1 if (typeof f.apply !== "function") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T5.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T5.js index b2667397c..2864ae8e3 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T5.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T5.js @@ -11,7 +11,7 @@ description: > declaration ---*/ -function FACTORY(){ +function FACTORY() { Function("this.feat=\"in da haus\"").apply(); }; diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js index de2baaba0..c4fe40482 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T6.js @@ -12,8 +12,10 @@ description: > flags: [noStrict] ---*/ -function FACTORY(){ - (function(){this.feat="kamon beyba"}).apply(null); +function FACTORY() { + (function() { + this.feat = "kamon beyba" + }).apply(null); }; var obj = new FACTORY; diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T7.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T7.js index 7138f11cd..1065e8d27 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T7.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T7.js @@ -11,7 +11,7 @@ description: > declaration ---*/ -(function FACTORY(){ +(function FACTORY() { Function("this.feat=\"in da haus\"").apply(void 0); })(); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js index bec48bd99..94449eb37 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T8.js @@ -12,8 +12,10 @@ description: > flags: [noStrict] ---*/ -(function FACTORY(){ - (function(){this.feat="kamon beyba"}).apply(undefined); +(function FACTORY() { + (function() { + this.feat = "kamon beyba" + }).apply(undefined); })(); //CHECK#1 diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T9.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T9.js index e7055f830..4fe65248a 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T9.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A3_T9.js @@ -9,7 +9,7 @@ es5id: 15.3.4.3_A3_T9 description: Checking by using eval, argument at apply function is void 0 ---*/ -eval( " Function(\"this.feat=1\").apply(void 0) " ); +eval(" Function(\"this.feat=1\").apply(void 0) "); //CHECK#1 if (this["feat"] !== 1) { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T1.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T1.js index b0a73eab7..937f8cb9f 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T1.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T1.js @@ -9,7 +9,7 @@ es5id: 15.3.4.3_A5_T1 description: thisArg is number ---*/ -var obj=1; +var obj = 1; var retobj = Function("this.touched= true; return this;").apply(obj); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T2.js index 88e6a92cb..79d6cf816 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T2.js @@ -9,7 +9,7 @@ es5id: 15.3.4.3_A5_T2 description: thisArg is boolean true ---*/ -var obj=true; +var obj = true; var retobj = new Function("this.touched= true; return this;").apply(obj); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js index 8ec4feae5..eeb07e45e 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js @@ -10,9 +10,12 @@ description: thisArg is string flags: [noStrict] ---*/ -var obj="soap"; +var obj = "soap"; -var retobj = ( function(){this.touched= true; return this;} ).apply(obj); +var retobj = (function() { + this.touched = true; + return this; +}).apply(obj); //CHECK#1 if (typeof obj.touched !== "undefined") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js index 65230c6eb..527311ae9 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T4.js @@ -10,7 +10,10 @@ description: thisArg is function variable that return this flags: [noStrict] ---*/ -f = function(){this.touched= true; return this;}; +f = function() { + this.touched = true; + return this; +}; retobj = f.apply(obj); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T5.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T5.js index b4947b223..8d88bfdd1 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T5.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T5.js @@ -9,9 +9,11 @@ es5id: 15.3.4.3_A5_T5 description: thisArg is function variable ---*/ -var f = function(){this.touched= true;}; +var f = function() { + this.touched = true; +}; -var obj={}; +var obj = {}; f.apply(obj); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T6.js index 3a852f770..ffabe93c3 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T6.js @@ -9,9 +9,11 @@ es5id: 15.3.4.3_A5_T6 description: thisArg is new String() ---*/ -var obj=new String("soap"); +var obj = new String("soap"); -( function(){this.touched= true;}).apply(obj); +(function() { + this.touched = true; +}).apply(obj); //CHECK#1 if (!(obj.touched)) { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T7.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T7.js index 3aea79d4c..f99dfe61f 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T7.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T7.js @@ -9,7 +9,7 @@ es5id: 15.3.4.3_A5_T7 description: thisArg is new Number() ---*/ -var obj=new Number(1); +var obj = new Number(1); Function("this.touched= true;").apply(obj); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T8.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T8.js index 3e7ff7743..26ce5a6ec 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T8.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T8.js @@ -9,7 +9,7 @@ es5id: 15.3.4.3_A5_T8 description: thisArg is Function() ---*/ -var obj=Function(); +var obj = Function(); new Function("this.touched= true; return this;").apply(obj); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T2.js index ddeca4bbb..a21265dd3 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T2.js @@ -11,10 +11,10 @@ description: argArray is (null,1) //CHECK#1 try { - Function().apply(null,1); + Function().apply(null, 1); $ERROR('#1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown'); + $ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T3.js index 2fa2501c3..313e89d79 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A6_T3.js @@ -9,14 +9,14 @@ es5id: 15.3.4.3_A6_T3 description: argArray is (object,"1,3,4") ---*/ -var obj={}; +var obj = {}; //CHECK#1 try { - Function().apply(obj,"1,3,4"); + Function().apply(obj, "1,3,4"); $ERROR('#1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown'); } catch (e) { if (!(e instanceof TypeError)) { - $ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown'); + $ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown'); } } diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T1.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T1.js index afa24ed01..018dcc7bd 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T1.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T1.js @@ -9,7 +9,7 @@ es5id: 15.3.4.3_A7_T1 description: argArray is (null,[1]) ---*/ -Function("a1,a2,a3","this.shifted=a1;").apply(null,[1]); +Function("a1,a2,a3", "this.shifted=a1;").apply(null, [1]); //CHECK#1 if (this["shifted"] !== 1) { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T10.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T10.js index 8e518ebd6..7a77fd2d1 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T10.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T10.js @@ -11,11 +11,11 @@ description: > without declaration used ---*/ -var obj={}; +var obj = {}; -(function (){ - Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(obj,arguments); -})("",4,2); +(function() { + Function("a1,a2,a3", "this.shifted=a1+a2+a3;").apply(obj, arguments); +})("", 4, 2); //CHECK#1 if (obj["shifted"] !== "42") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T2.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T2.js index fbfadbdb7..f54f65d30 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T2.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T2.js @@ -9,7 +9,7 @@ es5id: 15.3.4.3_A7_T2 description: argArray is (null,[1,2,3]) ---*/ -new Function("a1,a2","a3","this.shifted=a2;").apply(null,[1,2,3]); +new Function("a1,a2", "a3", "this.shifted=a2;").apply(null, [1, 2, 3]); //CHECK#1 if (this["shifted"] !== 2) { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js index 1f27d4ef2..d4ce5fc1d 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T3.js @@ -9,13 +9,17 @@ es5id: 15.3.4.3_A7_T3 description: argArray is (empty object, new Array("nine","inch","nails")) ---*/ -var i=0; +var i = 0; -var p={toString:function(){return "a"+(++i);}}; +var p = { + toString: function() { + return "a" + (++i); + } +}; -var obj={}; +var obj = {}; -Function(p,"a2,a3","this.shifted=a1;").apply(obj, new Array("nine","inch","nails")); +Function(p, "a2,a3", "this.shifted=a1;").apply(obj, new Array("nine", "inch", "nails")); //CHECK#1 if (obj["shifted"] !== "nine") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js index a88cc9e73..9a747b4a1 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T4.js @@ -11,13 +11,19 @@ description: > ("a","b","c")) ---*/ -var i=0; +var i = 0; -var p={toString:function(){return "a"+(++i);}}; +var p = { + toString: function() { + return "a" + (++i); + } +}; -var obj={}; +var obj = {}; -new Function(p,p,p, "this.shifted=a3;").apply( obj,( function(){return arguments;}) ("a","b","c") ); +new Function(p, p, p, "this.shifted=a3;").apply(obj, (function() { + return arguments; +})("a", "b", "c")); //CHECK#1 if (obj["shifted"] !== "c") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js index 26d0b1a28..44ab20da0 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T5.js @@ -9,11 +9,11 @@ es5id: 15.3.4.3_A7_T5 description: argArray is (null, arguments), inside function declaration used ---*/ -function FACTORY(){ - Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(null,arguments); +function FACTORY() { + Function("a1,a2,a3", "this.shifted=a1+a2+a3;").apply(null, arguments); } -var obj=new FACTORY("",1,2); +var obj = new FACTORY("", 1, 2); //CHECK#1 if (this["shifted"] !== "12") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js index 2e2f76d64..23e9ac8ec 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T6.js @@ -9,11 +9,11 @@ es5id: 15.3.4.3_A7_T6 description: argArray is (this, arguments), inside function declaration used ---*/ -function FACTORY(){ - Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(this,arguments); +function FACTORY() { + Function("a1,a2,a3", "this.shifted=a1+a2+a3;").apply(this, arguments); } -var obj=new FACTORY("",4,2); +var obj = new FACTORY("", 4, 2); //CHECK#1 if (obj["shifted"] !== "42") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T7.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T7.js index 0ee4e41ee..59dbd059a 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T7.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T7.js @@ -11,9 +11,9 @@ description: > declaration used ---*/ -(function (){ - Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(null,arguments); -})("",1,2); +(function() { + Function("a1,a2,a3", "this.shifted=a1+a2+a3;").apply(null, arguments); +})("", 1, 2); //CHECK#1 if (this["shifted"] !== "12") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T8.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T8.js index b3cf86486..f0c0215cd 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T8.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T8.js @@ -11,9 +11,9 @@ description: > declaration used ---*/ -(function (){ - Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(this,arguments); -})("",4,2); +(function() { + Function("a1,a2,a3", "this.shifted=a1+a2+a3;").apply(this, arguments); +})("", 4, 2); //CHECK#2 if (this["shifted"] !== "42") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js index 8781ceff1..d478bc629 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T9.js @@ -11,13 +11,13 @@ description: > used ---*/ -function FACTORY(){ +function FACTORY() { var obj = {}; - Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(obj,arguments); + Function("a1,a2,a3", "this.shifted=a1+a2+a3;").apply(obj, arguments); return obj; } -var obj=new FACTORY("",1,2); +var obj = new FACTORY("", 1, 2); //CHECK#1 if (typeof this["shifted"] !== "undefined") { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js index 0279d3e1e..75eeb6534 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js @@ -8,7 +8,7 @@ description: Checking if creating "new (Function("this.p1=1").apply)" fails ---*/ try { - var obj = new (Function("this.p1=1").apply); + var obj = new(Function("this.p1=1").apply); $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } catch (e) { if (!(e instanceof TypeError)) { diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js index ea44af1c2..94169ef9d 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js @@ -11,12 +11,12 @@ description: > //CHECK#1 try { - var obj = new (Function("function f(){this.p1=1;};return f").apply()); + var obj = new(Function("function f(){this.p1=1;};return f").apply()); } catch (e) { $ERROR('#1: Function.prototype.apply can\'t be used as [[Construct]] caller'); } //CHECK#2 -if (obj.p1!== 1) { +if (obj.p1 !== 1) { $ERROR('#2: Function.prototype.apply can\'t be used as [[Construct]] caller'); } |