Debian Codegraph @

rhino/testsrc/tests/ecma_2/Exceptions/statement-001.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 = 'statement-001.js';
7
8 /**
9 File Name: statement-001.js
10 Corresponds To: 12.6.2-9-n.js
11 ECMA Section: 12.6.2 The for Statement
12
13 1. first expression is not present.
14 2. second expression is not present
15 3. third expression is not present
16
17
18 Author: [email protected]
19 Date: 15 september 1997
20 */
21
22 var SECTION = "statement-001.js";
23 // var SECTION = "12.6.2-9-n";
24 var VERSION = "ECMA_1";
25 var TITLE = "The for statement";
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("for (i) {\n}");
36 } catch ( e ) {
37 result = expect;
38 exception = e.toString();
39 }
40
41 new TestCase(
42 SECTION,
43 "for(i) {}" +
44 " (threw " + exception +")",
45 expect,
46 result );
47
48 test();