]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Exceptions/expression-002.js
2 File Name: expressions-002.js
3 Corresponds to: ecma/Expressions/11.2.1-3-n.js
4 ECMA Section: 11.2.1 Property Accessors
7 Try to access properties of an object whose value is undefined.
9 Author: christine@netscape.com
10 Date: 09 september 1998
12 var SECTION
= "expressions-002.js";
13 var VERSION
= "JS1_4";
14 var TITLE
= "Property Accessors";
15 writeHeaderToLog( SECTION
+ " "+TITLE
);
20 var testcases
= new Array();
22 // go through all Native Function objects, methods, and properties and get their typeof.
24 var PROPERTY
= new Array();
27 // try to access properties of primitive types
29 OBJECT
= new Property( "undefined", void 0, "undefined", NaN
);
31 var result
= "Failed";
32 var exception
= "No exception thrown";
33 var expect
= "Passed";
36 result
= OBJECT
.value
.valueOf();
39 exception
= e
.toString();
43 testcases
[tc
++] = new TestCase(
45 "Get the value of an object whose value is undefined "+
46 "(threw " + exception
+")",
52 function Property( object
, value
, string
, number
) {
54 this.string
= String(value
);
55 this.number
= Number(value
);