* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / Microsoft.JScript / Test / Mozilla / ecma_2 / Exceptions / lexical-049.js
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /**
3    File Name:          lexical-049
4    Corresponds To:     7.8.1-1.js
5    ECMA Section:       7.8.1 Rules of Automatic Semicolon Insertioin
6    Description:
7    Author:             christine@netscape.com
8    Date:               15 september 1997
9 */
10 var SECTION = "lexical-049";
11 var VERSION = "JS1_4";
12 var TITLE   = "The Rules of Automatic Semicolon Insertion";
13
14 startTest();
15 writeHeaderToLog( SECTION + " "+ TITLE);
16
17 var result = "Failed";
18 var exception = "No exception thrown";
19 var expect = "Passed";
20
21 try {
22   var counter = 0;
23   eval("for ( counter = 0\n"
24        + "counter <= 1;\n"
25        + "counter++ )\n"
26        + "{\n"
27        + "result += \": got inside for loop\";\n"
28        + "}\n");
29
30 } catch ( e ) {
31   result = expect;
32   exception = e.toString();
33 }
34
35 new TestCase(
36   SECTION,
37   "line breaks within a for expression" +
38   " (threw " + exception +")",
39   expect,
40   result );
41
42 test();
43
44