]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/mozilla/ecma_2/Exceptions/lexical-047.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / lexical-047.js
CommitLineData
b37bf2e1
A
1/**
2 File Name: lexical-047.js
3 Corresponds To: 7.8.1-7-n.js
4 ECMA Section: 7.8.1
5 Description:
6 Author: christine@netscape.com
7 Date: 15 september 1997
8*/
9
10 var SECTION = "lexical-047";
11 var VERSION = "JS1_4";
12 var TITLE = "for loops";
13
14 startTest();
15 writeHeaderToLog( SECTION + " "+ TITLE);
16
17 var tc = 0;
18 var testcases = new Array();
19
20 var result = "Failed";
21 var exception = "No exception thrown";
22 var expect = "Passed";
23
24 try {
25 var counter = 0;
26 eval("for ( counter = 0\n"
27 + "counter <= 1\n"
28 + "counter++ )\n"
29 + "{\n"
30 + "result += \": got to inner loop\";\n"
31 + "}\n");
32
33 } catch ( e ) {
34 result = expect;
35 exception = e.toString();
36 }
37
38 testcases[tc++] = new TestCase(
39 SECTION,
40 "line breaks within a for expression" +
41 " (threw " + exception +")",
42 expect,
43 result );
44
45 test();
46
47