mirror of https://github.com/tc39/test262.git
Update built-ins/Date/prototype/setXXX to verifyProperty
This commit is contained in:
parent
60963bf468
commit
800d2190b3
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setDate" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setdate
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setDate;
|
||||
if (x === 1) {
|
||||
Date.prototype.setDate = 2;
|
||||
} else {
|
||||
Date.prototype.setDate = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setDate,
|
||||
x,
|
||||
'The value of Date.prototype.setDate is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setDate" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setdate
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(delete Date.prototype.setDate, false, 'The value of delete Date.prototype.setDate is not false');
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setDate'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setDate\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setDate" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setdate
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setDate'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setDate\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setDate", 'The value of x is not "setDate"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setDate" is 1
|
||||
esid: sec-date.prototype.setdate
|
||||
description: The "length" property of the "setDate" is 1
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setDate.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setDate.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(Date.prototype.setDate.length, 1, 'The value of Date.prototype.setDate.length is expected to be 1');
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setDate property "length" has { ReadOnly, DontDelete,
|
||||
DontEnum } attributes
|
||||
esid: sec-date.prototype.setdate
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setDate.length;
|
||||
verifyNotWritable(Date.prototype.setDate, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setDate.length,
|
||||
x,
|
||||
'The value of Date.prototype.setDate.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setDate property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setdate
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setDate.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setDate.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setDate.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setDate.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setDate property "length" has { ReadOnly, DontDelete,
|
||||
DontEnum } attributes
|
||||
esid: sec-date.prototype.setdate
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setDate.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setDate.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setDate) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setdate
|
||||
description: >
|
||||
Date.prototype.setDate.length is 1.
|
||||
info: |
|
||||
Date.prototype.setDate ( date )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every built-in function object, including constructors, has a "length"
|
||||
property whose value is a non-negative integral Number. Unless otherwise
|
||||
specified, this value is the number of required parameters shown in the
|
||||
subclause heading for the function description. Optional parameters and rest
|
||||
parameters are not included in the parameter count.
|
||||
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setDate, "length", {
|
||||
value: 1,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setdate
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setDate.
|
||||
info: |
|
||||
Date.prototype.setDate ( date )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setDate", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setFullYear" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setfullyear
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setFullYear;
|
||||
if (x === 1) {
|
||||
Date.prototype.setFullYear = 2;
|
||||
} else {
|
||||
Date.prototype.setFullYear = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setFullYear,
|
||||
x,
|
||||
'The value of Date.prototype.setFullYear is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setFullYear" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setfullyear
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(
|
||||
delete Date.prototype.setFullYear,
|
||||
false,
|
||||
'The value of delete Date.prototype.setFullYear is not false'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setFullYear'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setFullYear\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setFullYear" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setfullyear
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setFullYear'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setFullYear\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setFullYear", 'The value of x is not "setFullYear"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setFullYear" is 3
|
||||
esid: sec-date.prototype.setfullyear
|
||||
description: The "length" property of the "setFullYear" is 3
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setFullYear.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setFullYear.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setFullYear.length,
|
||||
3,
|
||||
'The value of Date.prototype.setFullYear.length is expected to be 3'
|
||||
);
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setFullYear property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setfullyear
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setFullYear.length;
|
||||
verifyNotWritable(Date.prototype.setFullYear, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setFullYear.length,
|
||||
x,
|
||||
'The value of Date.prototype.setFullYear.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setFullYear property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setfullyear
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setFullYear.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setFullYear.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setFullYear.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setFullYear.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setFullYear property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setfullyear
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setFullYear.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setFullYear.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setFullYear) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setfullyear
|
||||
description: >
|
||||
Date.prototype.setFullYear.length is 3.
|
||||
info: |
|
||||
Date.prototype.setFullYear ( year [ , month [ , date ] ] )
|
||||
|
||||
The "length" property of this method is 3𝔽.
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setFullYear, "length", {
|
||||
value: 3,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setfullyear
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setFullYear.
|
||||
info: |
|
||||
Date.prototype.setFullYear ( year [ , month [ , date ] ] )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setFullYear", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setHours" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.sethours
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setHours;
|
||||
if (x === 1) {
|
||||
Date.prototype.setHours = 2;
|
||||
} else {
|
||||
Date.prototype.setHours = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setHours,
|
||||
x,
|
||||
'The value of Date.prototype.setHours is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setHours" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.sethours
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(delete Date.prototype.setHours, false, 'The value of delete Date.prototype.setHours is not false');
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setHours'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setHours\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setHours" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.sethours
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setHours'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setHours\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setHours", 'The value of x is not "setHours"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setHours" is 4
|
||||
esid: sec-date.prototype.sethours
|
||||
description: The "length" property of the "setHours" is 4
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setHours.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setHours.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(Date.prototype.setHours.length, 4, 'The value of Date.prototype.setHours.length is expected to be 4');
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setHours property "length" has { ReadOnly, DontDelete,
|
||||
DontEnum } attributes
|
||||
esid: sec-date.prototype.sethours
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setHours.length;
|
||||
verifyNotWritable(Date.prototype.setHours, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setHours.length,
|
||||
x,
|
||||
'The value of Date.prototype.setHours.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setHours property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.sethours
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setHours.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setHours.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setHours.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setHours.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setHours property "length" has { ReadOnly, DontDelete,
|
||||
DontEnum } attributes
|
||||
esid: sec-date.prototype.sethours
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setHours.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setHours.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setHours) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.sethours
|
||||
description: >
|
||||
Date.prototype.setHours.length is 4.
|
||||
info: |
|
||||
Date.prototype.setHours ( hour [ , min [ , sec [ , ms ] ] ] )
|
||||
|
||||
The "length" property of this method is 4𝔽.
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setHours, "length", {
|
||||
value: 4,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.sethours
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setHours.
|
||||
info: |
|
||||
Date.prototype.setHours ( hour [ , min [ , sec [ , ms ] ] ] )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setHours", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setMilliseconds" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setmilliseconds
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setMilliseconds;
|
||||
if (x === 1) {
|
||||
Date.prototype.setMilliseconds = 2;
|
||||
} else {
|
||||
Date.prototype.setMilliseconds = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setMilliseconds,
|
||||
x,
|
||||
'The value of Date.prototype.setMilliseconds is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setMilliseconds" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setmilliseconds
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(
|
||||
delete Date.prototype.setMilliseconds,
|
||||
false,
|
||||
'The value of delete Date.prototype.setMilliseconds is not false'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setMilliseconds'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setMilliseconds\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setMilliseconds" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setmilliseconds
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setMilliseconds'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setMilliseconds\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setMilliseconds", 'The value of x is not "setMilliseconds"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setMilliseconds" is 1
|
||||
esid: sec-date.prototype.setmilliseconds
|
||||
description: The "length" property of the "setMilliseconds" is 1
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setMilliseconds.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setMilliseconds.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setMilliseconds.length,
|
||||
1,
|
||||
'The value of Date.prototype.setMilliseconds.length is expected to be 1'
|
||||
);
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setMilliseconds property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setmilliseconds
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setMilliseconds.length;
|
||||
verifyNotWritable(Date.prototype.setMilliseconds, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setMilliseconds.length,
|
||||
x,
|
||||
'The value of Date.prototype.setMilliseconds.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setMilliseconds property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setmilliseconds
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setMilliseconds.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setMilliseconds.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setMilliseconds.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setMilliseconds.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setMilliseconds property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setmilliseconds
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setMilliseconds.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setMilliseconds.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setMilliseconds) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setmilliseconds
|
||||
description: >
|
||||
Date.prototype.setMilliseconds.length is 1.
|
||||
info: |
|
||||
Date.prototype.setMilliseconds ( ms )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every built-in function object, including constructors, has a "length"
|
||||
property whose value is a non-negative integral Number. Unless otherwise
|
||||
specified, this value is the number of required parameters shown in the
|
||||
subclause heading for the function description. Optional parameters and rest
|
||||
parameters are not included in the parameter count.
|
||||
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setMilliseconds, "length", {
|
||||
value: 1,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setmilliseconds
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setMilliseconds.
|
||||
info: |
|
||||
Date.prototype.setMilliseconds ( ms )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setMilliseconds", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setMinutes" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setminutes
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setMinutes;
|
||||
if (x === 1) {
|
||||
Date.prototype.setMinutes = 2;
|
||||
} else {
|
||||
Date.prototype.setMinutes = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setMinutes,
|
||||
x,
|
||||
'The value of Date.prototype.setMinutes is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setMinutes" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setminutes
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(
|
||||
delete Date.prototype.setMinutes,
|
||||
false,
|
||||
'The value of delete Date.prototype.setMinutes is not false'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setMinutes'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setMinutes\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setMinutes" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setminutes
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setMinutes'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setMinutes\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setMinutes", 'The value of x is not "setMinutes"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setMinutes" is 3
|
||||
esid: sec-date.prototype.setminutes
|
||||
description: The "length" property of the "setMinutes" is 3
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setMinutes.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setMinutes.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setMinutes.length,
|
||||
3,
|
||||
'The value of Date.prototype.setMinutes.length is expected to be 3'
|
||||
);
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setMinutes property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setminutes
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setMinutes.length;
|
||||
verifyNotWritable(Date.prototype.setMinutes, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setMinutes.length,
|
||||
x,
|
||||
'The value of Date.prototype.setMinutes.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setMinutes property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setminutes
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setMinutes.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setMinutes.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setMinutes.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setMinutes.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setMinutes property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setminutes
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setMinutes.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setMinutes.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setMinutes) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setminutes
|
||||
description: >
|
||||
Date.prototype.setMinutes.length is 3.
|
||||
info: |
|
||||
Date.prototype.setMinutes ( min [ , sec [ , ms ] ] )
|
||||
|
||||
The "length" property of this method is 3𝔽.
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setMinutes, "length", {
|
||||
value: 3,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setminutes
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setMinutes.
|
||||
info: |
|
||||
Date.prototype.setMinutes ( min [ , sec [ , ms ] ] )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setMinutes", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setMonth" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setmonth
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setMonth;
|
||||
if (x === 1) {
|
||||
Date.prototype.setMonth = 2;
|
||||
} else {
|
||||
Date.prototype.setMonth = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setMonth,
|
||||
x,
|
||||
'The value of Date.prototype.setMonth is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setMonth" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setmonth
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(delete Date.prototype.setMonth, false, 'The value of delete Date.prototype.setMonth is not false');
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setMonth'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setMonth\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setMonth" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setmonth
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setMonth'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setMonth\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setMonth", 'The value of x is not "setMonth"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setMonth" is 2
|
||||
esid: sec-date.prototype.setmonth
|
||||
description: The "length" property of the "setMonth" is 2
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setMonth.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setMonth.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(Date.prototype.setMonth.length, 2, 'The value of Date.prototype.setMonth.length is expected to be 2');
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setMonth property "length" has { ReadOnly, DontDelete,
|
||||
DontEnum } attributes
|
||||
esid: sec-date.prototype.setmonth
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setMonth.length;
|
||||
verifyNotWritable(Date.prototype.setMonth, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setMonth.length,
|
||||
x,
|
||||
'The value of Date.prototype.setMonth.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setMonth property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setmonth
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setMonth.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setMonth.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setMonth.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setMonth.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setMonth property "length" has { ReadOnly, DontDelete,
|
||||
DontEnum } attributes
|
||||
esid: sec-date.prototype.setmonth
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setMonth.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setMonth.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setMonth) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setmonth
|
||||
description: >
|
||||
Date.prototype.setMonth.length is 2.
|
||||
info: |
|
||||
Date.prototype.setMonth ( month [ , date ] )
|
||||
|
||||
The "length" property of this method is 2𝔽.
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setMonth, "length", {
|
||||
value: 2,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setmonth
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setMonth.
|
||||
info: |
|
||||
Date.prototype.setMonth ( month [ , date ] )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setMonth", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setSeconds" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setseconds
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setSeconds;
|
||||
if (x === 1) {
|
||||
Date.prototype.setSeconds = 2;
|
||||
} else {
|
||||
Date.prototype.setSeconds = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setSeconds,
|
||||
x,
|
||||
'The value of Date.prototype.setSeconds is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setSeconds" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setseconds
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(
|
||||
delete Date.prototype.setSeconds,
|
||||
false,
|
||||
'The value of delete Date.prototype.setSeconds is not false'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setSeconds'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setSeconds\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setSeconds" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setseconds
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setSeconds'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setSeconds\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setSeconds", 'The value of x is not "setSeconds"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setSeconds" is 2
|
||||
esid: sec-date.prototype.setseconds
|
||||
description: The "length" property of the "setSeconds" is 2
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setSeconds.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setSeconds.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setSeconds.length,
|
||||
2,
|
||||
'The value of Date.prototype.setSeconds.length is expected to be 2'
|
||||
);
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setSeconds property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setseconds
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setSeconds.length;
|
||||
verifyNotWritable(Date.prototype.setSeconds, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setSeconds.length,
|
||||
x,
|
||||
'The value of Date.prototype.setSeconds.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setSeconds property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setseconds
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setSeconds.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setSeconds.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setSeconds.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setSeconds.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setSeconds property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setseconds
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setSeconds.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setSeconds.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setSeconds) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setseconds
|
||||
description: >
|
||||
Date.prototype.setSeconds.length is 2.
|
||||
info: |
|
||||
Date.prototype.setSeconds ( sec [ , ms ] )
|
||||
|
||||
The "length" property of this method is 2𝔽.
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setSeconds, "length", {
|
||||
value: 2,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setseconds
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setSeconds.
|
||||
info: |
|
||||
Date.prototype.setSeconds ( sec [ , ms ] )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setSeconds", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setTime" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.settime
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setTime;
|
||||
if (x === 1) {
|
||||
Date.prototype.setTime = 2;
|
||||
} else {
|
||||
Date.prototype.setTime = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setTime,
|
||||
x,
|
||||
'The value of Date.prototype.setTime is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setTime" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.settime
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(delete Date.prototype.setTime, false, 'The value of delete Date.prototype.setTime is not false');
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setTime'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setTime\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setTime" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.settime
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setTime'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setTime\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setTime", 'The value of x is not "setTime"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setTime" is 1
|
||||
esid: sec-date.prototype.settime
|
||||
description: The "length" property of the "setTime" is 1
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setTime.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setTime.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(Date.prototype.setTime.length, 1, 'The value of Date.prototype.setTime.length is expected to be 1');
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setTime property "length" has { ReadOnly, DontDelete,
|
||||
DontEnum } attributes
|
||||
esid: sec-date.prototype.settime
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setTime.length;
|
||||
verifyNotWritable(Date.prototype.setTime, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setTime.length,
|
||||
x,
|
||||
'The value of Date.prototype.setTime.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setTime property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.settime
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setTime.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setTime.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setTime.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setTime.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setTime property "length" has { ReadOnly, DontDelete,
|
||||
DontEnum } attributes
|
||||
esid: sec-date.prototype.settime
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setTime.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setTime.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setTime) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.settime
|
||||
description: >
|
||||
Date.prototype.setTime.length is 1.
|
||||
info: |
|
||||
Date.prototype.setTime ( time )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every built-in function object, including constructors, has a "length"
|
||||
property whose value is a non-negative integral Number. Unless otherwise
|
||||
specified, this value is the number of required parameters shown in the
|
||||
subclause heading for the function description. Optional parameters and rest
|
||||
parameters are not included in the parameter count.
|
||||
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setTime, "length", {
|
||||
value: 1,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.settime
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setTime.
|
||||
info: |
|
||||
Date.prototype.setTime ( time )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setTime", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setUTCDate" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcdate
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setUTCDate;
|
||||
if (x === 1) {
|
||||
Date.prototype.setUTCDate = 2;
|
||||
} else {
|
||||
Date.prototype.setUTCDate = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setUTCDate,
|
||||
x,
|
||||
'The value of Date.prototype.setUTCDate is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setUTCDate" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcdate
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(
|
||||
delete Date.prototype.setUTCDate,
|
||||
false,
|
||||
'The value of delete Date.prototype.setUTCDate is not false'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setUTCDate'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setUTCDate\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setUTCDate" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcdate
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setUTCDate'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setUTCDate\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setUTCDate", 'The value of x is not "setUTCDate"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setUTCDate" is 1
|
||||
esid: sec-date.prototype.setutcdate
|
||||
description: The "length" property of the "setUTCDate" is 1
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setUTCDate.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setUTCDate.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setUTCDate.length,
|
||||
1,
|
||||
'The value of Date.prototype.setUTCDate.length is expected to be 1'
|
||||
);
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setUTCDate property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcdate
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setUTCDate.length;
|
||||
verifyNotWritable(Date.prototype.setUTCDate, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setUTCDate.length,
|
||||
x,
|
||||
'The value of Date.prototype.setUTCDate.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setUTCDate property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcdate
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setUTCDate.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setUTCDate.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setUTCDate.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setUTCDate.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setUTCDate property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcdate
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setUTCDate.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setUTCDate.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setUTCDate) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setutcdate
|
||||
description: >
|
||||
Date.prototype.setUTCDate.length is 1.
|
||||
info: |
|
||||
Date.prototype.setUTCDate ( date )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every built-in function object, including constructors, has a "length"
|
||||
property whose value is a non-negative integral Number. Unless otherwise
|
||||
specified, this value is the number of required parameters shown in the
|
||||
subclause heading for the function description. Optional parameters and rest
|
||||
parameters are not included in the parameter count.
|
||||
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setUTCDate, "length", {
|
||||
value: 1,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setutcdate
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setUTCDate.
|
||||
info: |
|
||||
Date.prototype.setUTCDate ( date )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setUTCDate", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setUTCFullYear" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcfullyear
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setUTCFullYear;
|
||||
if (x === 1) {
|
||||
Date.prototype.setUTCFullYear = 2;
|
||||
} else {
|
||||
Date.prototype.setUTCFullYear = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setUTCFullYear,
|
||||
x,
|
||||
'The value of Date.prototype.setUTCFullYear is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setUTCFullYear" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcfullyear
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(
|
||||
delete Date.prototype.setUTCFullYear,
|
||||
false,
|
||||
'The value of delete Date.prototype.setUTCFullYear is not false'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setUTCFullYear'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setUTCFullYear\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setUTCFullYear" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcfullyear
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setUTCFullYear'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setUTCFullYear\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setUTCFullYear", 'The value of x is not "setUTCFullYear"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setUTCFullYear" is 3
|
||||
esid: sec-date.prototype.setutcfullyear
|
||||
description: The "length" property of the "setUTCFullYear" is 3
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setUTCFullYear.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setUTCFullYear.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setUTCFullYear.length,
|
||||
3,
|
||||
'The value of Date.prototype.setUTCFullYear.length is expected to be 3'
|
||||
);
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setUTCFullYear property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcfullyear
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setUTCFullYear.length;
|
||||
verifyNotWritable(Date.prototype.setUTCFullYear, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setUTCFullYear.length,
|
||||
x,
|
||||
'The value of Date.prototype.setUTCFullYear.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setUTCFullYear property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcfullyear
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setUTCFullYear.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setUTCFullYear.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setUTCFullYear.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setUTCFullYear.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setUTCFullYear property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setutcfullyear
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setUTCFullYear.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setUTCFullYear.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setUTCFullYear) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setutcfullyear
|
||||
description: >
|
||||
Date.prototype.setUTCFullYear.length is 3.
|
||||
info: |
|
||||
Date.prototype.setUTCFullYear ( year [ , month [ , date ] ] )
|
||||
|
||||
The "length" property of this method is 3𝔽.
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setUTCFullYear, "length", {
|
||||
value: 3,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setutcfullyear
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setUTCFullYear.
|
||||
info: |
|
||||
Date.prototype.setUTCFullYear ( year [ , month [ , date ] ] )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setUTCFullYear", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setUTCHours" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setutchours
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setUTCHours;
|
||||
if (x === 1) {
|
||||
Date.prototype.setUTCHours = 2;
|
||||
} else {
|
||||
Date.prototype.setUTCHours = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setUTCHours,
|
||||
x,
|
||||
'The value of Date.prototype.setUTCHours is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setUTCHours" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setutchours
|
||||
description: Checking absence of DontDelete attribute
|
||||
---*/
|
||||
assert.notSameValue(
|
||||
delete Date.prototype.setUTCHours,
|
||||
false,
|
||||
'The value of delete Date.prototype.setUTCHours is not false'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.hasOwnProperty('setUTCHours'),
|
||||
'The value of !Date.prototype.hasOwnProperty(\'setUTCHours\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The Date.prototype property "setUTCHours" has { DontEnum } attributes
|
||||
esid: sec-date.prototype.setutchours
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.propertyIsEnumerable('setUTCHours'),
|
||||
'The value of !Date.prototype.propertyIsEnumerable(\'setUTCHours\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype) {
|
||||
assert.notSameValue(x, "setUTCHours", 'The value of x is not "setUTCHours"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: The "length" property of the "setUTCHours" is 4
|
||||
esid: sec-date.prototype.setutchours
|
||||
description: The "length" property of the "setUTCHours" is 4
|
||||
---*/
|
||||
assert.sameValue(
|
||||
Date.prototype.setUTCHours.hasOwnProperty("length"),
|
||||
true,
|
||||
'Date.prototype.setUTCHours.hasOwnProperty("length") must return true'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setUTCHours.length,
|
||||
4,
|
||||
'The value of Date.prototype.setUTCHours.length is expected to be 4'
|
||||
);
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setUTCHours property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setutchours
|
||||
description: Checking ReadOnly attribute
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setUTCHours.length;
|
||||
verifyNotWritable(Date.prototype.setUTCHours, "length", null, 1);
|
||||
|
||||
assert.sameValue(
|
||||
Date.prototype.setUTCHours.length,
|
||||
x,
|
||||
'The value of Date.prototype.setUTCHours.length is expected to equal the value of x'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setUTCHours property "length" has { ReadOnly, !
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setutchours
|
||||
description: Checking DontDelete attribute
|
||||
---*/
|
||||
assert.sameValue(
|
||||
delete Date.prototype.setUTCHours.length,
|
||||
true,
|
||||
'The value of `delete Date.prototype.setUTCHours.length` is expected to be true'
|
||||
);
|
||||
|
||||
assert(
|
||||
!Date.prototype.setUTCHours.hasOwnProperty('length'),
|
||||
'The value of !Date.prototype.setUTCHours.hasOwnProperty(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype.setUTCHours property "length" has { ReadOnly,
|
||||
DontDelete, DontEnum } attributes
|
||||
esid: sec-date.prototype.setutchours
|
||||
description: Checking DontEnum attribute
|
||||
---*/
|
||||
assert(
|
||||
!Date.prototype.setUTCHours.propertyIsEnumerable('length'),
|
||||
'The value of !Date.prototype.setUTCHours.propertyIsEnumerable(\'length\') is expected to be true'
|
||||
);
|
||||
|
||||
for (var x in Date.prototype.setUTCHours) {
|
||||
assert.notSameValue(x, "length", 'The value of x is not "length"');
|
||||
}
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setutchours
|
||||
description: >
|
||||
Date.prototype.setUTCHours.length is 4.
|
||||
info: |
|
||||
Date.prototype.setUTCHours ( hour [ , min [ , sec [ , ms ] ] ] )
|
||||
|
||||
The "length" property of this method is 4𝔽.
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Unless otherwise specified, the "length" property of a built-in function
|
||||
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
|
||||
[[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype.setUTCHours, "length", {
|
||||
value: 4,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-date.prototype.setutchours
|
||||
description: >
|
||||
Property descriptor for Date.prototype.setUTCHours.
|
||||
info: |
|
||||
Date.prototype.setUTCHours ( hour [ , min [ , sec [ , ms ] ] ] )
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
Every other data property described in clauses 19 through 28 and in
|
||||
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
|
||||
[[Configurable]]: true } unless otherwise specified.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Date.prototype, "setUTCHours", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
info: |
|
||||
The Date.prototype property "setUTCMilliseconds" has { DontEnum }
|
||||
attributes
|
||||
esid: sec-date.prototype.setutcmilliseconds
|
||||
description: Checking absence of ReadOnly attribute
|
||||
---*/
|
||||
|
||||
var x = Date.prototype.setUTCMilliseconds;
|
||||
if (x === 1) {
|
||||
Date.prototype.setUTCMilliseconds = 2;
|
||||
} else {
|
||||
Date.prototype.setUTCMilliseconds = 1;
|
||||
}
|
||||
|
||||
assert.notSameValue(
|
||||
Date.prototype.setUTCMilliseconds,
|
||||
x,
|
||||
'The value of Date.prototype.setUTCMilliseconds is expected to not equal the value of `x`'
|
||||
);
|
||||
|
||||
// TODO: Convert to verifyProperty() format.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue