]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/FunctionObjects/call-1.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / FunctionObjects / call-1.js
1 /**
2 File Name: call-1.js
3 Section: Function.prototype.call
4 Description:
5
6
7 Author: christine@netscape.com
8 Date: 12 november 1997
9 */
10 var SECTION = "call-1";
11 var VERSION = "ECMA_2";
12 var TITLE = "Function.prototype.call";
13
14 startTest();
15 writeHeaderToLog( SECTION + " "+ TITLE);
16
17 var tc = 0;
18 var testcases = new Array();
19
20
21 testcases[tc++] = new TestCase( SECTION,
22 "ToString.call( this, this )",
23 GLOBAL,
24 ToString.call( this, this ) );
25
26 testcases[tc++] = new TestCase( SECTION,
27 "ToString.call( Boolean, Boolean.prototype )",
28 "false",
29 ToString.call( Boolean, Boolean.prototype ) );
30
31 testcases[tc++] = new TestCase( SECTION,
32 "ToString.call( Boolean, Boolean.prototype.valueOf() )",
33 "false",
34 ToString.call( Boolean, Boolean.prototype.valueOf() ) );
35
36 test();
37
38 function ToString( obj ) {
39 return obj +"";
40 }