1/**
2 *  File Name:          exception-002
3 *  ECMA Section:
4 *  Description:        Tests for JavaScript Standard Exceptions
5 *
6 *  Construct error.
7 *
8 *  Author:             christine@netscape.com
9 *  Date:               31 August 1998
10 */
11    var SECTION = "exception-002";
12    var VERSION = "js1_4";
13    var TITLE   = "Tests for JavaScript Standard Exceptions: ConstructError";
14
15    startTest();
16    writeHeaderToLog( SECTION + " "+ TITLE);
17
18    var tc = 0;
19    var testcases = new Array();
20
21    Construct_1();
22
23    test();
24
25    function Construct_1() {
26        result = "failed: no exception thrown";
27        exception = null;
28
29        try {
30            result = new Math();
31        } catch ( e ) {
32            result = "passed:  threw exception",
33            exception = e.toString();
34        } finally {
35            testcases[tc++] = new TestCase(
36                SECTION,
37                "new Math() [ exception is " + exception +" ]",
38                "passed:  threw exception",
39                result );
40        }
41    }
42
43