Debian Codegraph @

rhino/testsrc/tests/ecma/String/15.5.4.2.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 gTestfile = '15.5.4.2.js';
7
8 /**
9 File Name: 15.5.4.2.js
10 ECMA Section: 15.5.4.2 String.prototype.toString
11
12 Description:
13 Author: [email protected]
14 Date: 28 october 1997
15
16 */
17 var SECTION = "15.5.4.2";
18 var VERSION = "ECMA_1";
19 startTest();
20 var TITLE = "String.prototype.tostring";
21
22 writeHeaderToLog( SECTION + " "+ TITLE);
23
24 new TestCase( SECTION,
25 "String.prototype.toString() == String.prototype.valueOf()",
26 true,
27 String.prototype.toString() == String.prototype.valueOf() );
28
29 new TestCase( SECTION, "String.prototype.toString()", "", String.prototype.toString() );
30 new TestCase( SECTION, "String.prototype.toString.length", 0, String.prototype.toString.length );
31
32
33 new TestCase( SECTION,
34 "TESTSTRING = new String();TESTSTRING.valueOf() == TESTSTRING.toString()",
35 true,
36 eval("TESTSTRING = new String();TESTSTRING.valueOf() == TESTSTRING.toString()") );
37 new TestCase( SECTION,
38 "TESTSTRING = new String(true);TESTSTRING.valueOf() == TESTSTRING.toString()",
39 true,
40 eval("TESTSTRING = new String(true);TESTSTRING.valueOf() == TESTSTRING.toString()") );
41 new TestCase( SECTION,
42 "TESTSTRING = new String(false);TESTSTRING.valueOf() == TESTSTRING.toString()",
43 true,
44 eval("TESTSTRING = new String(false);TESTSTRING.valueOf() == TESTSTRING.toString()") );
45 new TestCase( SECTION,
46 "TESTSTRING = new String(Math.PI);TESTSTRING.valueOf() == TESTSTRING.toString()",
47 true,
48 eval("TESTSTRING = new String(Math.PI);TESTSTRING.valueOf() == TESTSTRING.toString()") );
49 new TestCase( SECTION,
50 "TESTSTRING = new String();TESTSTRING.valueOf() == TESTSTRING.toString()",
51 true,
52 eval("TESTSTRING = new String();TESTSTRING.valueOf() == TESTSTRING.toString()") );
53
54 test();