blob: 941a657c17f6ded78f775ffd3e1bbbc9164a5330 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S15.3_A3_T2;
* @section: 15.3;
* @assertion: Since when call is used for Function constructor themself new function instance creates
* and then first argument(thisArg) should be ignored;
* @description: First argument is string and null;
*/
this.color="red";
var name="mars";
var f = Function.call("blablastring", "return this.color;");
//CHECK#1
if (f() !== "red") {
$ERROR('#1: ');
}
var g = Function.call(null, "return this.name;");
//CHECK#2
if (g() !== "mars") {
$ERROR('#2: ');
}
|