]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/mozilla/ecma_2/Exceptions/lexical-007.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / lexical-007.js
CommitLineData
b37bf2e1
A
1/**
2 File Name: lexical-005.js
3 Corresponds To: 7.4.1-3-n.js
4 ECMA Section: 7.4.1
5
6 Description:
7
8 Reserved words cannot be used as identifiers.
9
10 ReservedWord ::
11 Keyword
12 FutureReservedWord
13 NullLiteral
14 BooleanLiteral
15
16 Author: christine@netscape.com
17 Date: 12 november 1997
18*/
19 var SECTION = "lexical-005";
20 var VERSION = "JS1_4";
21 var TITLE = "Keywords";
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("false = true;");
35 } catch ( e ) {
36 result = expect;
37 exception = e.toString();
38 }
39
40 testcases[tc++] = new TestCase(
41 SECTION,
42 "false = true" +
43 " (threw " + exception +")",
44 expect,
45 result );
46
47 test();
48