]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/object-get-own-property-symbols-perform-to-object.js
4 [Symbol("symbol"), []],
9 function compare(ax
, bx
) {
10 if (ax
.length
!== bx
.length
)
12 for (var i
= 0, iz
= ax
.length
; i
< iz
; ++i
) {
19 for (var [primitive
, expected
] of primitives
) {
20 var ret
= Object
.getOwnPropertySymbols(primitive
);
21 if (!compare(ret
, expected
))
22 throw new Error("bad value for " + String(primitive
) + ": " + String(ret
));
26 [ null, "TypeError: null is not an object (evaluating 'Object.getOwnPropertySymbols(value)')" ],
27 [ undefined, "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertySymbols(value)')" ]
28 ].forEach(function ([value
, message
]) {
31 Object
.getOwnPropertySymbols(value
);
36 throw new Error("error not thrown");
37 if (String(error
) !== message
)
38 throw new Error("bad error: " + String(error
));