| * File Name: exception-006 |
| * Description: Tests for JavaScript Standard Exceptions |
| * Author: christine@netscape.com |
| var SECTION = "exception-006"; |
| var TITLE = "Tests for JavaScript Standard Exceptions: TypeError"; |
| writeHeaderToLog( SECTION + " "+ TITLE); |
| var testcases = new Array(); |
| * Getting the [[DefaultValue]] of any instances of MyObject |
| * should result in a runtime error in ToPrimitive. |
| function ToPrimitive_1() { |
| result = "failed: no exception thrown"; |
| result = new MyObject() + new MyObject(); |
| result = "passed: threw exception", |
| exception = e.toString(); |
| testcases[tc++] = new TestCase( |
| "new MyObject() + new MyObject() [ exception is " + exception +" ]", |
| "passed: threw exception", |