]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/mozilla/ecma_2/Exceptions/exception-008.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / exception-008.js
CommitLineData
b37bf2e1
A
1/**
2 * File Name: exception-008
3 * ECMA Section:
4 * Description: Tests for JavaScript Standard Exceptions
5 *
6 * SyntaxError.
7 *
8 * Author: christine@netscape.com
9 * Date: 31 August 1998
10 */
11 var SECTION = "exception-008";
12 var VERSION = "js1_4";
13 var TITLE = "Tests for JavaScript Standard Exceptions: SyntaxError";
14
15 startTest();
16 writeHeaderToLog( SECTION + " "+ TITLE);
17
18 var tc = 0;
19 var testcases = new Array();
20
21 Syntax_1();
22
23 test();
24
25 function Syntax_1() {
26 result = "failed: no exception thrown";
27 exception = null;
28
29 try {
30 result = eval("continue;");
31 } catch ( e ) {
32 result = "passed: threw exception",
33 exception = e.toString();
34 } finally {
35 testcases[tc++] = new TestCase(
36 SECTION,
37 "eval(\"continue\") [ exception is " + exception +" ]",
38 "passed: threw exception",
39 result );
40 }
41 }