]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/mozilla/ecma_2/Exceptions/lexical-017.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / lexical-017.js
CommitLineData
b37bf2e1
A
1/**
2 File Name: lexical-017.js
3 Corresponds To: 7.4.3-10-n.js
4 ECMA Section: 7.4.3
5
6 Description:
7 The following words are used as keywords in proposed extensions and are
8 therefore reserved to allow for the possibility of future adoption of
9 those extensions.
10
11 FutureReservedWord :: one of
12 case debugger export super
13 catch default extends switch
14 class do finally throw
15 const enum import try
16
17 Author: christine@netscape.com
18 Date: 12 november 1997
19*/
20 var SECTION = "lexical-017";
21 var VERSION = "JS1_4";
22 var TITLE = "Future Reserved Words";
23
24 startTest();
25 writeHeaderToLog( SECTION + " "+ TITLE);
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("do = true;");
35 } catch ( e ) {
36 result = expect;
37 exception = e.toString();
38 }
39
40 testcases[tc++] = new TestCase(
41 SECTION,
42 "do = true" +
43 " (threw " + exception +")",
44 expect,
45 result );
46
47 test();
48
49
50