]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Exceptions/lexical-029.js
0b38cbeb5e782e678d766ccf2aa4b5686df57539
2 File Name: lexical-029.js
3 Corresponds To: 7.4.2-6.js
7 The following tokens are ECMAScript keywords and may not be used as
8 identifiers in ECMAScript programs.
14 continue function return void
18 This test verifies that the keyword cannot be used as an identifier.
19 Functioinal tests of the keyword may be found in the section corresponding
20 to the function of the keyword.
22 Author: christine@netscape.com
23 Date: 12 november 1997
26 var SECTION
= "lexical-029";
27 var VERSION
= "JS1_4";
28 var TITLE
= "Keywords";
31 writeHeaderToLog( SECTION
+ " "+ TITLE
);
34 var testcases
= new Array();
36 var result
= "Failed";
37 var exception
= "No exception thrown";
38 var expect
= "Passed";
41 eval("var function = true;");
44 exception
= e
.toString();
47 testcases
[tc
++] = new TestCase(
49 "var function = true" +
50 " (threw " + exception
+")",