a few tests use verifyPrimordialProperty

This commit is contained in:
Peter Hoddie 2024-09-21 17:52:36 -07:00 committed by Philip Chimento
parent d6155b6ef2
commit 83fae7f1f2
3 changed files with 10 additions and 13 deletions

View File

@ -16,6 +16,8 @@ includes: [propertyHelper.js]
assert.sameValue(typeof Array.prototype.every, 'function', 'typeof'); assert.sameValue(typeof Array.prototype.every, 'function', 'typeof');
verifyNotEnumerable(Array.prototype, "every"); verifyPrimordialProperty(Array.prototype, "every", {
verifyWritable(Array.prototype, "every"); writable: true,
verifyConfigurable(Array.prototype, "every"); enumerable: false,
configurable: true
});

View File

@ -23,7 +23,7 @@ info: |
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
verifyProperty(DataView.prototype.getInt16, "length", { verifyPrimordialProperty(DataView.prototype.getInt16, "length", {
value: 1, value: 1,
writable: false, writable: false,
enumerable: false, enumerable: false,

View File

@ -5,14 +5,9 @@
info: The Date property "parse" has { DontEnum } attributes info: The Date property "parse" has { DontEnum } attributes
esid: sec-date.parse esid: sec-date.parse
description: Checking absence of ReadOnly attribute description: Checking absence of ReadOnly attribute
includes: [propertyHelper.js]
---*/ ---*/
var x = Date.parse; verifyPrimordialProperty(Date, "parse", {
if (x === 1) { writable: true,
Date.parse = 2; });
} else {
Date.parse = 1;
}
assert.notSameValue(Date.parse, x, 'The value of Date.parse is expected to not equal the value of `x`');
// TODO: Convert to verifyProperty() format.