Debian Codegraph @

rhino/testsrc/tests/ecma_2/Exceptions/lexical-042.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 gTestfile = 'lexical-042.js';
7
8 /**
9 File Name: lexical-042.js
10 Corresponds To: 7.5-9-n.js
11 ECMA Section: 7.5 Identifiers
12 Description: Identifiers are of unlimited length
13 - can contain letters, a decimal digit, _, or $
14 - the first character cannot be a decimal digit
15 - identifiers are case sensitive
16
17 Author: [email protected]
18 Date: 11 september 1997
19 */
20 var SECTION = "lexical-042";
21 var VERSION = "JS1_4";
22 var TITLE = "Identifiers";
23
24 startTest();
25 writeHeaderToLog( SECTION + " "+ TITLE);
26
27 startTest();
28 writeHeaderToLog( SECTION + " "+ TITLE);
29
30 var result = "Failed";
31 var exception = "No exception thrown";
32 var expect = "Passed";
33
34 try {
35 eval("var 123;");
36 } catch ( e ) {
37 result = expect;
38 exception = e.toString();
39 }
40
41 new TestCase(
42 SECTION,
43 "var 123" +
44 " (threw " + exception +")",
45 expect,
46 result );
47
48 test();
49
50