blob: 573da23bca0463efcccee9ea26fe93c4914189b6 [file] [log] [blame]
oliver@apple.com41c899b2009-09-19 22:14:56 +00001Test to ensure correct behaviour of Object.defineProperties
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6PASS Object.defineProperties() threw exception TypeError: Properties can only be defined on Objects..
7PASS Object.defineProperties('a string') threw exception TypeError: Properties can only be defined on Objects..
barraclough@apple.come2ea07b2012-02-16 19:06:03 +00008PASS Object.defineProperties({}, 'a string') threw exception TypeError: Property description must be an object..
oliver@apple.com41c899b2009-09-19 22:14:56 +00009PASS JSON.stringify(Object.defineProperties({},{property:{value:'foo', enumerable:true}, property2:{value:'foo', enumerable:true}})) is '{"property":"foo","property2":"foo"}'
10PASS JSON.stringify(Object.defineProperties({},{property:{value:'foo'}, property2:{value:'foo', enumerable:true}})) is '{"property2":"foo"}'
11PASS JSON.stringify(Object.defineProperties({property:'foo'},{property:{value:'foo', enumerable:true}, property2:{value:'foo', enumerable:true}})) is '{"property":"foo","property2":"foo"}'
12PASS JSON.stringify(Object.defineProperties({property:'foo'},{property:{value:'foo', enumerable:false}, property2:{value:'foo', enumerable:true}})) is '{"property2":"foo"}'
13PASS JSON.stringify(Object.defineProperties({property:'foo'},{property:{value:'foo'}, property2:{value:'foo', enumerable:true}})) is '{"property":"foo","property2":"foo"}'
14PASS Object.defineProperties(emptyObject, {foo:{value: true}, bar:{get:function(){}, writable:true}}) threw exception TypeError: Invalid property. 'writable' present on property with getter or setter..
15PASS 'foo' in emptyObject is false
16PASS successfullyParsed is true
17
18TEST COMPLETE
19