]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Exceptions/exception-007.js
2 * File Name: exception-007
4 * Description: Tests for JavaScript Standard Exceptions
8 * Author: christine@netscape.com
11 var SECTION
= "exception-007";
12 var VERSION
= "js1_4";
13 var TITLE
= "Tests for JavaScript Standard Exceptions: TypeError";
14 var BUGNUMBER
="318250";
17 writeHeaderToLog( SECTION
+ " "+ TITLE
);
20 var testcases
= new Array();
28 * Getting the [[DefaultValue]] of any instances of MyObject
29 * should result in a runtime error in ToPrimitive.
33 this.toString
= void 0;
34 this.valueOf
= new Object();
37 function DefaultValue_1() {
38 result
= "failed: no exception thrown";
42 result
= new MyObject() + new MyObject();
44 result
= "passed: threw exception",
45 exception
= e
.toString();
47 testcases
[tc
++] = new TestCase(
49 "new MyObject() + new MyObject() [ exception is " + exception
+" ]",
50 "passed: threw exception",