diff options
Diffstat (limited to 'test/built-ins/Function/prototype/apply')
37 files changed, 78 insertions, 104 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 daeed835d..7ee954176 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 0c792e14a..a717204bd 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 f62f5d967..762c5c593 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 244c35acd..ce9541aa0 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,9 +17,7 @@ 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 dcab5610c..18da556b6 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 50ea57ee8..c84faf776 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 bf25dfed3..ce11c7e88 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 77e0ffe08..c8a7711c8 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 ad2b14770..8d65c78db 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 872e46597..a56a6b4d1 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 2864ae8e3..b2667397c 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 c4fe40482..de2baaba0 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,10 +12,8 @@ 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 1065e8d27..7138f11cd 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 94449eb37..bec48bd99 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,10 +12,8 @@ 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 4fe65248a..e7055f830 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 937f8cb9f..b0a73eab7 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 79d6cf816..88e6a92cb 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 eeb07e45e..8ec4feae5 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,12 +10,9 @@ 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 527311ae9..65230c6eb 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,10 +10,7 @@ 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 8d88bfdd1..b4947b223 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,11 +9,9 @@ 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 ffabe93c3..3a852f770 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,11 +9,9 @@ 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 f99dfe61f..3aea79d4c 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 26ce5a6ec..3e7ff7743 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 a21265dd3..ddeca4bbb 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 313e89d79..2fa2501c3 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 018dcc7bd..afa24ed01 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 7a77fd2d1..8e518ebd6 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 f54f65d30..fbfadbdb7 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 d4ce5fc1d..1f27d4ef2 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,17 +9,13 @@ 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 9a747b4a1..a88cc9e73 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,19 +11,13 @@ 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 44ab20da0..26d0b1a28 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 23e9ac8ec..2e2f76d64 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 59dbd059a..0ee4e41ee 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 f0c0215cd..b3cf86486 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 d478bc629..8781ceff1 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 75eeb6534..0279d3e1e 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 94169ef9d..ea44af1c2 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'); } |