]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Exceptions/statement-008.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / statement-008.js
1 /**
2 File Name: statement-008.js
3 Corresponds To: 12.8-1-n.js
4 ECMA Section: 12.8 The break statement
5 Description:
6
7 Author: christine@netscape.com
8 Date: 12 november 1997
9 */
10 var SECTION = "statement-008";
11 var VERSION = "JS1_4";
12 var TITLE = "The break in statment";
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 eval("break;");
26 } catch ( e ) {
27 result = expect;
28 exception = e.toString();
29 }
30
31 testcases[tc++] = new TestCase(
32 SECTION,
33 "break outside of an iteration statement" +
34 " (threw " + exception +")",
35 expect,
36 result );
37
38 test();
39