]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/object-prevent-extensions-accept-non-object.js
564febb794ab1eb56e25f39dc72ed574b9f3ab92
[apple/javascriptcore.git] / tests / stress / object-prevent-extensions-accept-non-object.js
1 var primitives = [
2 "string",
3 42,
4 null,
5 undefined,
6 Symbol("symbol"),
7 true,
8 false
9 ];
10
11 for (var primitive of primitives) {
12 var ret = Object.preventExtensions(primitive);
13 if (ret !== primitive)
14 throw new Error("bad value: " + String(ret));
15 }