initial import
[vuplus_webkit] / Source / JavaScriptCore / tests / mozilla / ecma_2 / Exceptions / lexical-023.js
1 /**
2     File Name:          lexical-023.js
3     Corresponds To:     7.4.3-16-n.js
4     ECMA Section:       7.4.3
5     Description:
6     The following words are used as keywords in proposed extensions and are
7     therefore reserved to allow for the possibility of future adoption of
8     those extensions.
9
10     FutureReservedWord :: one of
11     case    debugger    export      super
12     catch   default     extends     switch
13     class   do          finally     throw
14     const   enum        import      try
15
16     Author:             christine@netscape.com
17     Date:               12 november 1997
18 */
19     var SECTION = "lexical-023.js";
20     var VERSION = "ECMA_1";
21     var TITLE   = "Future Reserved Words";
22
23     startTest();
24     writeHeaderToLog( SECTION + " "+ TITLE);
25
26     var tc = 0;
27     var testcases = new Array();
28
29     var result = "Failed";
30     var exception = "No exception thrown";
31     var expect = "Passed";
32
33     try {
34         eval("try = true;");
35     } catch ( e ) {
36         result = expect;
37         exception = e.toString();
38     }
39
40     testcases[tc++] = new TestCase(
41         SECTION,
42         "try = true" +
43         " (threw " + exception +")",
44         expect,
45         result );
46
47     test();
48
49