In .:
[mono.git] / mcs / class / Microsoft.JScript / Test / Mozilla / ecma_2 / Exceptions / lexical-050.js
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /**
3    File Name:          lexical-050.js
4    Corresponds to:     7.8.2-1-n.js
5    ECMA Section:       7.8.2 Examples of Automatic Semicolon Insertion
6    Description:        compare some specific examples of the automatic
7    insertion rules in the EMCA specification.
8    Author:             christine@netscape.com
9    Date:               15 september 1997
10 */
11
12 var SECTION = "lexical-050";
13 var VERSION = "JS1_4";
14 var TITLE   = "Examples of Automatic Semicolon Insertion";
15
16 startTest();
17 writeHeaderToLog( SECTION + " "+ TITLE);
18
19 var result = "Failed";
20 var exception = "No exception thrown";
21 var expect = "Passed";
22
23 try {
24   eval("{ 1 2 } 3");
25 } catch ( e ) {
26   result = expect;
27   exception = e.toString();
28 }
29
30 new TestCase(
31   SECTION,
32   "{ 1 2 } 3" +
33   " (threw " + exception +")",
34   expect,
35   result );
36
37 test();
38
39
40