initial import
[vuplus_webkit] / Source / JavaScriptCore / tests / mozilla / ecma_2 / Exceptions / lexical-041.js
1 /**
2     File Name:          lexical-041.js
3     Corresponds To:     7.5-8-n.js
4     ECMA Section:       7.5 Identifiers
5     Description:        Identifiers are of unlimited length
6                         - can contain letters, a decimal digit, _, or $
7                         - the first character cannot be a decimal digit
8                         - identifiers are case sensitive
9
10     Author:             christine@netscape.com
11     Date:               11 september 1997
12 */
13     var SECTION = "lexical-041";
14     var VERSION = "ECMA_1";
15     var TITLE   = "Identifiers";
16
17     startTest();
18     writeHeaderToLog( SECTION + " "+ TITLE);
19     startTest();
20     writeHeaderToLog( SECTION + " "+ TITLE);
21
22     var tc = 0;
23     var testcases = new Array();
24
25     var result = "Failed";
26     var exception = "No exception thrown";
27     var expect = "Passed";
28
29     try {
30         eval("var @abc;");
31     } catch ( e ) {
32         result = expect;
33         exception = e.toString();
34     }
35
36     testcases[tc++] = new TestCase(
37         SECTION,
38         "var @abc" +
39         " (threw " + exception +")",
40         expect,
41         result );
42
43     test();
44
45