]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/js1_2/Array/tostring_2.js
1 /* The contents of this file are subject to the Netscape Public
2 * License Version 1.1 (the "License"); you may not use this file
3 * except in compliance with the License. You may obtain a copy of
4 * the License at http://www.mozilla.org/NPL/
6 * Software distributed under the License is distributed on an "AS
7 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
8 * implied. See the License for the specific language governing
9 * rights and limitations under the License.
11 * The Original Code is Mozilla Communicator client code, released March
14 * The Initial Developer of the Original Code is Netscape Communications
15 * Corporation. Portions created by Netscape are
16 * Copyright (C) 1998 Netscape Communications Corporation. All
23 File Name: tostring_2.js
24 Reference: http://scopus.mcom.com/bugsplat/show_bug.cgi?id=114564
25 Description: toString in version 120
28 Author: christine@netscape.com
32 var SECTION
= "Array/tostring_2.js";
33 var VERSION
= "JS_12";
35 var TITLE
= "Array.toString";
37 writeHeaderToLog( SECTION
+ " "+ TITLE
);
39 var testcases
= new Array();
45 /* This test assumes that if version() exists, it can set the JavaScript
46 * interpreter to an arbitrary version. To prevent unhandled exceptions in
47 * other tests, jsc implements version() as a stub function, but
48 * JavaScriptCore doesn't support setting the JavaScript engine's version.
50 * Commenting out the following lines forces the test to expect JavaScript
53 * If JavaScriptCore changes to support versioning, this test should split
54 * into a 1.2 test in js1_2/ and a 1.5 test in js1_5/.
58 if ( typeof version == "function" ) {
59 writeLineToLog("version 120");
63 function version() { return 0; };
67 testcases
[tc
++] = new TestCase ( SECTION
,
69 ( VERSION
== "120" ? "[]" : "" ),
72 testcases
[tc
++] = new TestCase ( SECTION
,
74 ( VERSION
== "120" ? "[]" : "" ),
77 testcases
[tc
++] = new TestCase ( SECTION
,
79 ( VERSION
== "120" ? "[]" : "" ),
85 for ( tc
=0; tc
< testcases
.length
; tc
++ ) {
86 testcases
[tc
].passed
= writeTestCaseResult(
89 testcases
[tc
].description
+" = "+
90 testcases
[tc
].actual
);
92 testcases
[tc
].reason
+= ( testcases
[tc
].passed
) ? "" : "wrong value ";