~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-051.js

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
    File Name:          lexical-051.js
 
3
    Corresponds to:     7.8.2-3-n.js
 
4
    ECMA Section:       7.8.2 Examples of Automatic Semicolon Insertion
 
5
    Description:        compare some specific examples of the automatic
 
6
                        insertion rules in the EMCA specification.
 
7
    Author:             christine@netscape.com
 
8
    Date:               15 september 1997
 
9
*/
 
10
 
 
11
    var SECTION = "lexical-051";
 
12
    var VERSION = "JS1_4";
 
13
    var TITLE   = "Examples of Automatic Semicolon Insertion";
 
14
 
 
15
    startTest();
 
16
    writeHeaderToLog( SECTION + " "+ TITLE);
 
17
 
 
18
    var tc = 0;
 
19
    var testcases = new Array();
 
20
 
 
21
    var result = "Failed";
 
22
    var exception = "No exception thrown";
 
23
    var expect = "Passed";
 
24
 
 
25
    try {
 
26
        eval("for (a; b\n) result += \": got to inner loop\";")
 
27
    } catch ( e ) {
 
28
        result = expect;
 
29
        exception = e.toString();
 
30
    }
 
31
 
 
32
    testcases[tc++] = new TestCase(
 
33
        SECTION,
 
34
        "for (a; b\n)" +
 
35
        " (threw " + exception +")",
 
36
        expect,
 
37
        result );
 
38
 
 
39
    test();
 
40
 
 
41
 
 
42