S15.3_A3_T4.js (595B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: | 6 Since when call is used for Function constructor themself new function instance creates 7 and then first argument(thisArg) should be ignored 8 es5id: 15.3_A3_T4 9 description: First argument is this, and this have needed variable 10 ---*/ 11 12 var f = Function.call(this, "return planet;"); 13 14 assert.sameValue(f(), undefined, 'f() returns undefined'); 15 16 var planet = "mars"; 17 18 assert.sameValue(f(), "mars", 'f() must return "mars"'); 19 20 reportCompare(0, 0);