]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/object-get-own-property-descriptor-perform-to-object.js
4 [Symbol("symbol"), undefined],
9 for (var [primitive
, expected
] of primitives
) {
10 var ret
= Object
.getOwnPropertyDescriptor(primitive
, 'length');
11 if (expected
=== undefined) {
13 throw new Error("bad value for " + String(primitive
) + ": " + String(ret
));
14 } else if (ret
.value
!== expected
)
15 throw new Error("bad value for " + String(primitive
) + ": " + String(ret
));
23 throw new Error("out");
29 [ null, "TypeError: null is not an object (evaluating 'Object.getOwnPropertyDescriptor(value, property)')" ],
30 [ undefined, "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(value, property)')" ]
31 ].forEach(function ([value
, message
]) {
32 var property
= canary();
35 Object
.getOwnPropertyDescriptor(value
, property
);
40 throw new Error("error not thrown");
41 if (String(error
) !== message
)
42 throw new Error("bad error: " + String(error
));