2 * File Name: exception-003
4 * Description: Tests for JavaScript Standard Exceptions
8 * Author: christine@netscape.com
11 var SECTION = "exception-003";
12 var VERSION = "js1_4";
13 var TITLE = "Tests for JavaScript Standard Exceptions: TargetError";
16 writeHeaderToLog( SECTION + " "+ TITLE);
19 var testcases = new Array();
26 result = "failed: no exception thrown";
30 string = new String("hi");
31 string.toString = Boolean.prototype.toString;
34 result = "passed: threw exception",
35 exception = e.toString();
37 testcases[tc++] = new TestCase(
39 "string = new String(\"hi\");"+
40 "string.toString = Boolean.prototype.toString" +
41 "string.toString() [ exception is " + exception +" ]",
42 "passed: threw exception",