Update built-ins/Date to verifyProperty

This commit is contained in:
André Bargull 2024-10-09 14:37:13 +02:00 committed by Philip Chimento
parent d1c2a6f139
commit 9b3d9d9700
104 changed files with 577 additions and 1603 deletions

View File

@ -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.
/*---
esid: sec-date.utc
info: The Date property "UTC" has { DontEnum } attributes
es5id: 15.9.4.3_A1_T1
description: Checking absence of ReadOnly attribute
---*/
var x = Date.UTC;
if (x === 1) {
Date.UTC = 2;
} else {
Date.UTC = 1;
}
assert.notSameValue(Date.UTC, x, 'The value of Date.UTC is expected to not equal the value of `x`');
// TODO: Convert to verifyProperty() format.

View File

@ -1,13 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-date.utc
info: The Date property "UTC" has { DontEnum } attributes
es5id: 15.9.4.3_A1_T2
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(delete Date.UTC, false, 'The value of delete Date.UTC is not false');
assert(!Date.hasOwnProperty('UTC'), 'The value of !Date.hasOwnProperty(\'UTC\') is expected to be true');
// TODO: Convert to verifyProperty() format.

View File

@ -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.
/*---
esid: sec-date.utc
info: The Date property "UTC" has { DontEnum } attributes
es5id: 15.9.4.3_A1_T3
description: Checking DontEnum attribute
---*/
assert(
!Date.propertyIsEnumerable('UTC'),
'The value of !Date.propertyIsEnumerable(\'UTC\') is expected to be true'
);
for (var x in Date) {
assert.notSameValue(x, "UTC", 'The value of x is not "UTC"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -1,11 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-date.utc
info: The "length" property of the "UTC" is 7
es5id: 15.9.4.3_A2_T1
description: The "length" property of the "UTC" is 7
---*/
assert.sameValue(Date.UTC.hasOwnProperty("length"), true, 'Date.UTC.hasOwnProperty("length") must return true');
assert.sameValue(Date.UTC.length, 7, 'The value of Date.UTC.length is expected to be 7');

View File

@ -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.
/*---
esid: sec-date.utc
info: |
The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum }
attributes
es5id: 15.9.4.3_A3_T1
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.UTC.length;
verifyNotWritable(Date.UTC, "length", null, 1);
assert.sameValue(Date.UTC.length, x, 'The value of Date.UTC.length is expected to equal the value of x');
// TODO: Convert to verifyProperty() format.

View File

@ -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.
/*---
esid: sec-date.utc
info: |
The Date.UTC property "length" has { ReadOnly, ! DontDelete, DontEnum }
attributes
es5id: 15.9.4.3_A3_T2
description: Checking DontDelete attribute
---*/
assert.sameValue(delete Date.UTC.length, true, 'The value of `delete Date.UTC.length` is expected to be true');
assert(
!Date.UTC.hasOwnProperty('length'),
'The value of !Date.UTC.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -1,21 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-date.utc
info: |
The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum }
attributes
es5id: 15.9.4.3_A3_T3
description: Checking DontEnum attribute
---*/
assert(
!Date.UTC.propertyIsEnumerable('length'),
'The value of !Date.UTC.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.UTC) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.utc
description: >
Date.UTC.length is 7.
info: |
Date.UTC ( year [ , month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] ] )
The "length" property of this function is 7𝔽.
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.UTC, "length", {
value: 7,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -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.utc
description: >
Property descriptor for Date.UTC.
info: |
Date.UTC ( year [ , month [ , date [ , hours [ , minutes [ , seconds [ , 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, "UTC", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -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-properties-of-the-date-constructor
description: >
Date.length is 7.
info: |
Properties of the Date Constructor
The Date constructor has a "length" property whose value is 7𝔽.
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, "length", {
value: 7,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -1,13 +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 property "parse" has { DontEnum } attributes
esid: sec-date.parse
description: Checking absence of ReadOnly attribute
includes: [propertyHelper.js]
---*/
verifyPrimordialProperty(Date, "parse", {
writable: true,
});

View File

@ -1,12 +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 property "parse" has { DontEnum } attributes
esid: sec-date.parse
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(delete Date.parse, false, 'The value of delete Date.parse is not false');
assert(!Date.hasOwnProperty('parse'), 'The value of !Date.hasOwnProperty(\'parse\') is expected to be true');
// TODO: Convert to verifyProperty() format.

View File

@ -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 property "parse" has { DontEnum } attributes
esid: sec-date.parse
description: Checking DontEnum attribute
---*/
assert(
!Date.propertyIsEnumerable('parse'),
'The value of !Date.propertyIsEnumerable(\'parse\') is expected to be true'
);
for (var x in Date) {
assert.notSameValue(x, "parse", 'The value of x is not "parse"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -1,10 +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 "parse" is 1
esid: sec-date.parse
description: The "length" property of the "parse" is 1
---*/
assert.sameValue(Date.parse.hasOwnProperty("length"), true, 'Date.parse.hasOwnProperty("length") must return true');
assert.sameValue(Date.parse.length, 1, 'The value of Date.parse.length is expected to be 1');

View File

@ -1,17 +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.parse property "length" has { ReadOnly, DontDelete, DontEnum }
attributes
esid: sec-date.parse
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.parse.length;
verifyNotWritable(Date.parse, "length", null, 1);
assert.sameValue(Date.parse.length, x, 'The value of Date.parse.length is expected to equal the value of x');
// TODO: Convert to verifyProperty() format.

View File

@ -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.parse property "length" has { ReadOnly, ! DontDelete, DontEnum }
attributes
esid: sec-date.parse
description: Checking DontDelete attribute
---*/
assert.sameValue(delete Date.parse.length, true, 'The value of `delete Date.parse.length` is expected to be true');
assert(
!Date.parse.hasOwnProperty('length'),
'The value of !Date.parse.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.parse property "length" has { ReadOnly, DontDelete, DontEnum }
attributes
esid: sec-date.parse
description: Checking DontEnum attribute
---*/
assert(
!Date.parse.propertyIsEnumerable('length'),
'The value of !Date.parse.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.parse) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.parse
description: >
Date.parse.length is 1.
info: |
Date.parse ( string )
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.parse, "length", {
value: 1,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -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.parse
description: >
Property descriptor for Date.parse.
info: |
Date.parse ( string )
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, "parse", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -14,5 +14,5 @@ includes: [propertyHelper.js]
verifyProperty(this, "Date", {
writable: true,
enumerable: false,
configurable: true
configurable: true,
});

View File

@ -1,17 +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 property "prototype" has { DontEnum, DontDelete, ReadOnly }
attributes
esid: sec-date.prototype
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype;
verifyNotWritable(Date, "prototype", null, 1);
assert.sameValue(Date.prototype, x, 'The value of Date.prototype is expected to equal the value of x');
// TODO: Convert to verifyProperty() format.

View File

@ -1,28 +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 property "prototype" has { DontEnum, DontDelete, ReadOnly }
attributes
esid: sec-date.prototype
description: Checking DontDelete attribute
includes: [propertyHelper.js]
---*/
verifyNotConfigurable(Date, "prototype");
try {
assert.sameValue(delete Date.prototype, false);
} catch (e) {
if (e instanceof Test262Error) {
throw e;
}
assert(e instanceof TypeError);
}
if (!Date.hasOwnProperty('prototype')) {
throw new Test262Error('#2: The Date.prototype property has the attributes DontDelete');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 property "prototype" has { DontEnum, DontDelete, ReadOnly }
attributes
esid: sec-date.prototype
description: Checking DontEnum attribute
---*/
assert(
!Date.propertyIsEnumerable('prototype'),
'The value of !Date.propertyIsEnumerable(\'prototype\') is expected to be true'
);
for (var x in Date) {
assert.notSameValue(x, "prototype", 'The value of x is not "prototype"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "constructor" has { DontEnum } attributes
esid: sec-date.prototype.constructor
description: Checking absence of ReadOnly attribute
---*/
var x = Date.prototype.constructor;
if (x === 1) {
Date.prototype.constructor = 2;
} else {
Date.prototype.constructor = 1;
}
assert.notSameValue(
Date.prototype.constructor,
x,
'The value of Date.prototype.constructor is expected to not equal the value of `x`'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "constructor" has { DontEnum } attributes
esid: sec-date.prototype.constructor
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(
delete Date.prototype.constructor,
false,
'The value of delete Date.prototype.constructor is not false'
);
assert(
!Date.prototype.hasOwnProperty('constructor'),
'The value of !Date.prototype.hasOwnProperty(\'constructor\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "constructor" has { DontEnum } attributes
esid: sec-date.prototype.constructor
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.propertyIsEnumerable('constructor'),
'The value of !Date.prototype.propertyIsEnumerable(\'constructor\') is expected to be true'
);
for (var x in Date.prototype) {
assert.notSameValue(x, "constructor", 'The value of x is not "constructor"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "constructor" is 7
esid: sec-date.prototype.constructor
description: The "length" property of the "constructor" is 7
---*/
assert.sameValue(
Date.prototype.constructor.hasOwnProperty("length"),
true,
'Date.prototype.constructor.hasOwnProperty("length") must return true'
);
assert.sameValue(
Date.prototype.constructor.length,
7,
'The value of Date.prototype.constructor.length is expected to be 7'
);

View File

@ -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.constructor property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.constructor
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype.constructor.length;
verifyNotWritable(Date.prototype.constructor, "length", null, 1);
assert.sameValue(
Date.prototype.constructor.length,
x,
'The value of Date.prototype.constructor.length is expected to equal the value of x'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.constructor property "length" has { ReadOnly, !
DontDelete, DontEnum } attributes
esid: sec-date.prototype.constructor
description: Checking DontDelete attribute
---*/
assert.sameValue(
delete Date.prototype.constructor.length,
true,
'The value of `delete Date.prototype.constructor.length` is expected to be true'
);
assert(
!Date.prototype.constructor.hasOwnProperty('length'),
'The value of !Date.prototype.constructor.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.constructor property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.constructor
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.constructor.propertyIsEnumerable('length'),
'The value of !Date.prototype.constructor.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.prototype.constructor) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.constructor
description: >
Property descriptor for Date.prototype.constructor.
info: |
Date.prototype.constructor
The initial value of Date.prototype.constructor is %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, "constructor", {
value: Date,
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -0,0 +1,20 @@
// 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
description: >
Property descriptor for Date.prototype.
info: |
The initial value of Date.prototype is the Date prototype object.
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: false }.
includes: [propertyHelper.js]
---*/
verifyProperty(Date, "prototype", {
writable: false,
enumerable: false,
configurable: false,
});

View File

@ -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 "toDateString" has { DontEnum } attributes
esid: sec-date.prototype.todatestring
description: Checking absence of ReadOnly attribute
---*/
var x = Date.prototype.toDateString;
if (x === 1) {
Date.prototype.toDateString = 2;
} else {
Date.prototype.toDateString = 1;
}
assert.notSameValue(
Date.prototype.toDateString,
x,
'The value of Date.prototype.toDateString is expected to not equal the value of `x`'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toDateString" has { DontEnum } attributes
esid: sec-date.prototype.todatestring
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(
delete Date.prototype.toDateString,
false,
'The value of delete Date.prototype.toDateString is not false'
);
assert(
!Date.prototype.hasOwnProperty('toDateString'),
'The value of !Date.prototype.hasOwnProperty(\'toDateString\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toDateString" has { DontEnum } attributes
esid: sec-date.prototype.todatestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.propertyIsEnumerable('toDateString'),
'The value of !Date.prototype.propertyIsEnumerable(\'toDateString\') is expected to be true'
);
for (var x in Date.prototype) {
assert.notSameValue(x, "toDateString", 'The value of x is not "toDateString"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toDateString" is 0
esid: sec-date.prototype.todatestring
description: The "length" property of the "toDateString" is 0
---*/
assert.sameValue(
Date.prototype.toDateString.hasOwnProperty("length"),
true,
'Date.prototype.toDateString.hasOwnProperty("length") must return true'
);
assert.sameValue(
Date.prototype.toDateString.length,
0,
'The value of Date.prototype.toDateString.length is expected to be 0'
);

View File

@ -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.toDateString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.todatestring
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype.toDateString.length;
verifyNotWritable(Date.prototype.toDateString, "length", null, 1);
assert.sameValue(
Date.prototype.toDateString.length,
x,
'The value of Date.prototype.toDateString.length is expected to equal the value of x'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toDateString property "length" has { ReadOnly, !
DontDelete, DontEnum } attributes
esid: sec-date.prototype.todatestring
description: Checking DontDelete attribute
---*/
assert.sameValue(
delete Date.prototype.toDateString.length,
true,
'The value of `delete Date.prototype.toDateString.length` is expected to be true'
);
assert(
!Date.prototype.toDateString.hasOwnProperty('length'),
'The value of !Date.prototype.toDateString.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toDateString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.todatestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.toDateString.propertyIsEnumerable('length'),
'The value of !Date.prototype.toDateString.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.prototype.toDateString) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.todatestring
description: >
Date.prototype.toDateString.length is 0.
info: |
Date.prototype.toDateString ( )
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.toDateString, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -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.todatestring
description: >
Property descriptor for Date.prototype.toDateString.
info: |
Date.prototype.toDateString ( )
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, "toDateString", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -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 "toLocaleDateString" has { DontEnum }
attributes
esid: sec-date.prototype.tolocaledatestring
description: Checking absence of ReadOnly attribute
---*/
var x = Date.prototype.toLocaleDateString;
if (x === 1) {
Date.prototype.toLocaleDateString = 2;
} else {
Date.prototype.toLocaleDateString = 1;
}
assert.notSameValue(
Date.prototype.toLocaleDateString,
x,
'The value of Date.prototype.toLocaleDateString is expected to not equal the value of `x`'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 property "toLocaleDateString" has { DontEnum }
attributes
esid: sec-date.prototype.tolocaledatestring
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(
delete Date.prototype.toLocaleDateString,
false,
'The value of delete Date.prototype.toLocaleDateString is not false'
);
assert(
!Date.prototype.hasOwnProperty('toLocaleDateString'),
'The value of !Date.prototype.hasOwnProperty(\'toLocaleDateString\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toLocaleDateString" has { DontEnum }
attributes
esid: sec-date.prototype.tolocaledatestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.propertyIsEnumerable('toLocaleDateString'),
'The value of !Date.prototype.propertyIsEnumerable(\'toLocaleDateString\') is expected to be true'
);
for (var x in Date.prototype) {
assert.notSameValue(x, "toLocaleDateString", 'The value of x is not "toLocaleDateString"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toLocaleDateString" is 0
esid: sec-date.prototype.tolocaledatestring
description: The "length" property of the "toLocaleDateString" is 0
---*/
assert.sameValue(
Date.prototype.toLocaleDateString.hasOwnProperty("length"),
true,
'Date.prototype.toLocaleDateString.hasOwnProperty("length") must return true'
);
assert.sameValue(
Date.prototype.toLocaleDateString.length,
0,
'The value of Date.prototype.toLocaleDateString.length is expected to be 0'
);

View File

@ -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.toLocaleDateString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tolocaledatestring
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype.toLocaleDateString.length;
verifyNotWritable(Date.prototype.toLocaleDateString, "length", null, 1);
assert.sameValue(
Date.prototype.toLocaleDateString.length,
x,
'The value of Date.prototype.toLocaleDateString.length is expected to equal the value of x'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toLocaleDateString property "length" has { ReadOnly, !
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tolocaledatestring
description: Checking DontDelete attribute
---*/
assert.sameValue(
delete Date.prototype.toLocaleDateString.length,
true,
'The value of `delete Date.prototype.toLocaleDateString.length` is expected to be true'
);
assert(
!Date.prototype.toLocaleDateString.hasOwnProperty('length'),
'The value of !Date.prototype.toLocaleDateString.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toLocaleDateString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tolocaledatestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.toLocaleDateString.propertyIsEnumerable('length'),
'The value of !Date.prototype.toLocaleDateString.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.prototype.toLocaleDateString) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.tolocaledatestring
description: >
Date.prototype.toLocaleDateString.length is 0.
info: |
Date.prototype.toLocaleDateString ( [ reserved1 [ , reserved2 ] ] )
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.toLocaleDateString, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -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.tolocaledatestring
description: >
Property descriptor for Date.prototype.toLocaleDateString.
info: |
Date.prototype.toLocaleDateString ( [ reserved1 [ , reserved2 ] ] )
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, "toLocaleDateString", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -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 "toLocaleString" has { DontEnum } attributes
esid: sec-date.prototype.tolocalestring
description: Checking absence of ReadOnly attribute
---*/
var x = Date.prototype.toLocaleString;
if (x === 1) {
Date.prototype.toLocaleString = 2;
} else {
Date.prototype.toLocaleString = 1;
}
assert.notSameValue(
Date.prototype.toLocaleString,
x,
'The value of Date.prototype.toLocaleString is expected to not equal the value of `x`'
);
// TODO: Convert to verifyProperty() format.

View File

@ -1,21 +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 "toLocaleString" has { DontEnum } attributes
esid: sec-date.prototype.tolocalestring
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(
delete Date.prototype.toLocaleString,
false,
'The value of delete Date.prototype.toLocaleString is not false'
);
assert(
!Date.prototype.hasOwnProperty('toLocaleString'),
'The value of !Date.prototype.hasOwnProperty(\'toLocaleString\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toLocaleString" has { DontEnum } attributes
esid: sec-date.prototype.tolocalestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.propertyIsEnumerable('toLocaleString'),
'The value of !Date.prototype.propertyIsEnumerable(\'toLocaleString\') is expected to be true'
);
for (var x in Date.prototype) {
assert.notSameValue(x, "toLocaleString", 'The value of x is not "toLocaleString"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "length" property of the "toLocaleString" is 0
esid: sec-date.prototype.tolocalestring
description: The "length" property of the "toLocaleString" is 0
---*/
assert.sameValue(
Date.prototype.toLocaleString.hasOwnProperty("length"),
true,
'Date.prototype.toLocaleString.hasOwnProperty("length") must return true'
);
assert.sameValue(
Date.prototype.toLocaleString.length,
0,
'The value of Date.prototype.toLocaleString.length is expected to be 0'
);

View File

@ -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.toLocaleString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tolocalestring
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype.toLocaleString.length;
verifyNotWritable(Date.prototype.toLocaleString, "length", null, 1);
assert.sameValue(
Date.prototype.toLocaleString.length,
x,
'The value of Date.prototype.toLocaleString.length is expected to equal the value of x'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toLocaleString property "length" has { ReadOnly, !
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tolocalestring
description: Checking DontDelete attribute
---*/
assert.sameValue(
delete Date.prototype.toLocaleString.length,
true,
'The value of `delete Date.prototype.toLocaleString.length` is expected to be true'
);
assert(
!Date.prototype.toLocaleString.hasOwnProperty('length'),
'The value of !Date.prototype.toLocaleString.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toLocaleString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tolocalestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.toLocaleString.propertyIsEnumerable('length'),
'The value of !Date.prototype.toLocaleString.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.prototype.toLocaleString) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.tolocalestring
description: >
Date.prototype.toLocaleString.length is 0.
info: |
Date.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )
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.toLocaleString, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -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.tolocalestring
description: >
Property descriptor for Date.prototype.toLocaleString.
info: |
Date.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] )
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, "toLocaleString", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -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 "toLocaleTimeString" has { DontEnum }
attributes
esid: sec-date.prototype.tolocaletimestring
description: Checking absence of ReadOnly attribute
---*/
var x = Date.prototype.toLocaleTimeString;
if (x === 1) {
Date.prototype.toLocaleTimeString = 2;
} else {
Date.prototype.toLocaleTimeString = 1;
}
assert.notSameValue(
Date.prototype.toLocaleTimeString,
x,
'The value of Date.prototype.toLocaleTimeString is expected to not equal the value of `x`'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toLocaleTimeString" has { DontEnum }
attributes
esid: sec-date.prototype.tolocaletimestring
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(
delete Date.prototype.toLocaleTimeString,
false,
'The value of delete Date.prototype.toLocaleTimeString is not false'
);
assert(
!Date.prototype.hasOwnProperty('toLocaleTimeString'),
'The value of !Date.prototype.hasOwnProperty(\'toLocaleTimeString\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toLocaleTimeString" has { DontEnum }
attributes
esid: sec-date.prototype.tolocaletimestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.propertyIsEnumerable('toLocaleTimeString'),
'The value of !Date.prototype.propertyIsEnumerable(\'toLocaleTimeString\') is expected to be true'
);
for (var x in Date.prototype) {
assert.notSameValue(x, "toLocaleTimeString", 'The value of x is not "toLocaleTimeString"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "length" property of the "toLocaleTimeString" is 0
esid: sec-date.prototype.tolocaletimestring
description: The "length" property of the "toLocaleTimeString" is 0
---*/
assert.sameValue(
Date.prototype.toLocaleTimeString.hasOwnProperty("length"),
true,
'Date.prototype.toLocaleTimeString.hasOwnProperty("length") must return true'
);
assert.sameValue(
Date.prototype.toLocaleTimeString.length,
0,
'The value of Date.prototype.toLocaleTimeString.length is expected to be 0'
);

View File

@ -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.toLocaleTimeString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tolocaletimestring
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype.toLocaleTimeString.length;
verifyNotWritable(Date.prototype.toLocaleTimeString, "length", null, 1);
assert.sameValue(
Date.prototype.toLocaleTimeString.length,
x,
'The value of Date.prototype.toLocaleTimeString.length is expected to equal the value of x'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toLocaleTimeString property "length" has { ReadOnly, !
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tolocaletimestring
description: Checking DontDelete attribute
---*/
assert.sameValue(
delete Date.prototype.toLocaleTimeString.length,
true,
'The value of `delete Date.prototype.toLocaleTimeString.length` is expected to be true'
);
assert(
!Date.prototype.toLocaleTimeString.hasOwnProperty('length'),
'The value of !Date.prototype.toLocaleTimeString.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toLocaleTimeString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tolocaletimestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.toLocaleTimeString.propertyIsEnumerable('length'),
'The value of !Date.prototype.toLocaleTimeString.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.prototype.toLocaleTimeString) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.tolocaletimestring
description: >
Date.prototype.toLocaleTimeString.length is 0.
info: |
Date.prototype.toLocaleTimeString ( [ reserved1 [ , reserved2 ] ] )
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.toLocaleTimeString, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -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.tolocaletimestring
description: >
Property descriptor for Date.prototype.toLocaleTimeString.
info: |
Date.prototype.toLocaleTimeString ( [ reserved1 [ , reserved2 ] ] )
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, "toLocaleTimeString", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -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 "toString" has { DontEnum } attributes
esid: sec-date.prototype.tostring
description: Checking absence of ReadOnly attribute
---*/
var x = Date.prototype.toString;
if (x === 1) {
Date.prototype.toString = 2;
} else {
Date.prototype.toString = 1;
}
assert.notSameValue(
Date.prototype.toString,
x,
'The value of Date.prototype.toString is expected to not equal the value of `x`'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toString" has { DontEnum } attributes
esid: sec-date.prototype.tostring
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(delete Date.prototype.toString, false, 'The value of delete Date.prototype.toString is not false');
assert(
!Date.prototype.hasOwnProperty('toString'),
'The value of !Date.prototype.hasOwnProperty(\'toString\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toString" has { DontEnum } attributes
esid: sec-date.prototype.tostring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.propertyIsEnumerable('toString'),
'The value of !Date.prototype.propertyIsEnumerable(\'toString\') is expected to be true'
);
for (var x in Date.prototype) {
assert.notSameValue(x, "toString", 'The value of x is not "toString"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "length" property of the "toString" is 0
esid: sec-date.prototype.tostring
description: The "length" property of the "toString" is 0
---*/
assert.sameValue(
Date.prototype.toString.hasOwnProperty("length"),
true,
'Date.prototype.toString.hasOwnProperty("length") must return true'
);
assert.sameValue(Date.prototype.toString.length, 0, 'The value of Date.prototype.toString.length is expected to be 0');

View File

@ -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.toString property "length" has { ReadOnly, DontDelete,
DontEnum } attributes
esid: sec-date.prototype.tostring
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype.toString.length;
verifyNotWritable(Date.prototype.toString, "length", null, 1);
assert.sameValue(
Date.prototype.toString.length,
x,
'The value of Date.prototype.toString.length is expected to equal the value of x'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toString property "length" has { ReadOnly, !
DontDelete, DontEnum } attributes
esid: sec-date.prototype.tostring
description: Checking DontDelete attribute
---*/
assert.sameValue(
delete Date.prototype.toString.length,
true,
'The value of `delete Date.prototype.toString.length` is expected to be true'
);
assert(
!Date.prototype.toString.hasOwnProperty('length'),
'The value of !Date.prototype.toString.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toString property "length" has { ReadOnly, DontDelete,
DontEnum } attributes
esid: sec-date.prototype.tostring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.toString.propertyIsEnumerable('length'),
'The value of !Date.prototype.toString.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.prototype.toString) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.tostring
description: >
Date.prototype.toString.length is 0.
info: |
Date.prototype.toString ( )
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.toString, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -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.tostring
description: >
Property descriptor for Date.prototype.toString.
info: |
Date.prototype.toString ( )
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, "toString", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -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 "toTimeString" has { DontEnum } attributes
esid: sec-date.prototype.totimestring
description: Checking absence of ReadOnly attribute
---*/
var x = Date.prototype.toTimeString;
if (x === 1) {
Date.prototype.toTimeString = 2;
} else {
Date.prototype.toTimeString = 1;
}
assert.notSameValue(
Date.prototype.toTimeString,
x,
'The value of Date.prototype.toTimeString is expected to not equal the value of `x`'
);
// TODO: Convert to verifyProperty() format.

View File

@ -1,21 +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 "toTimeString" has { DontEnum } attributes
esid: sec-date.prototype.totimestring
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(
delete Date.prototype.toTimeString,
false,
'The value of delete Date.prototype.toTimeString is not false'
);
assert(
!Date.prototype.hasOwnProperty('toTimeString'),
'The value of !Date.prototype.hasOwnProperty(\'toTimeString\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toTimeString" has { DontEnum } attributes
esid: sec-date.prototype.totimestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.propertyIsEnumerable('toTimeString'),
'The value of !Date.prototype.propertyIsEnumerable(\'toTimeString\') is expected to be true'
);
for (var x in Date.prototype) {
assert.notSameValue(x, "toTimeString", 'The value of x is not "toTimeString"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "length" property of the "toTimeString" is 0
esid: sec-date.prototype.totimestring
description: The "length" property of the "toTimeString" is 0
---*/
assert.sameValue(
Date.prototype.toTimeString.hasOwnProperty("length"),
true,
'Date.prototype.toTimeString.hasOwnProperty("length") must return true'
);
assert.sameValue(
Date.prototype.toTimeString.length,
0,
'The value of Date.prototype.toTimeString.length is expected to be 0'
);

View File

@ -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.toTimeString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.totimestring
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype.toTimeString.length;
verifyNotWritable(Date.prototype.toTimeString, "length", null, 1);
assert.sameValue(
Date.prototype.toTimeString.length,
x,
'The value of Date.prototype.toTimeString.length is expected to equal the value of x'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toTimeString property "length" has { ReadOnly, !
DontDelete, DontEnum } attributes
esid: sec-date.prototype.totimestring
description: Checking DontDelete attribute
---*/
assert.sameValue(
delete Date.prototype.toTimeString.length,
true,
'The value of `delete Date.prototype.toTimeString.length` is expected to be true'
);
assert(
!Date.prototype.toTimeString.hasOwnProperty('length'),
'The value of !Date.prototype.toTimeString.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toTimeString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.totimestring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.toTimeString.propertyIsEnumerable('length'),
'The value of !Date.prototype.toTimeString.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.prototype.toTimeString) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.totimestring
description: >
Date.prototype.toTimeString.length is 0.
info: |
Date.prototype.toTimeString ( )
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.toTimeString, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -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.totimestring
description: >
Property descriptor for Date.prototype.toTimeString.
info: |
Date.prototype.toTimeString ( )
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, "toTimeString", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -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 "toUTCString" has { DontEnum } attributes
esid: sec-date.prototype.toutcstring
description: Checking absence of ReadOnly attribute
---*/
var x = Date.prototype.toUTCString;
if (x === 1) {
Date.prototype.toUTCString = 2;
} else {
Date.prototype.toUTCString = 1;
}
assert.notSameValue(
Date.prototype.toUTCString,
x,
'The value of Date.prototype.toUTCString is expected to not equal the value of `x`'
);
// TODO: Convert to verifyProperty() format.

View File

@ -1,21 +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 "toUTCString" has { DontEnum } attributes
esid: sec-date.prototype.toutcstring
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(
delete Date.prototype.toUTCString,
false,
'The value of delete Date.prototype.toUTCString is not false'
);
assert(
!Date.prototype.hasOwnProperty('toUTCString'),
'The value of !Date.prototype.hasOwnProperty(\'toUTCString\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "toUTCString" has { DontEnum } attributes
esid: sec-date.prototype.toutcstring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.propertyIsEnumerable('toUTCString'),
'The value of !Date.prototype.propertyIsEnumerable(\'toUTCString\') is expected to be true'
);
for (var x in Date.prototype) {
assert.notSameValue(x, "toUTCString", 'The value of x is not "toUTCString"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "length" property of the "toUTCString" is 0
esid: sec-date.prototype.toutcstring
description: The "length" property of the "toUTCString" is 0
---*/
assert.sameValue(
Date.prototype.toUTCString.hasOwnProperty("length"),
true,
'Date.prototype.toUTCString.hasOwnProperty("length") must return true'
);
assert.sameValue(
Date.prototype.toUTCString.length,
0,
'The value of Date.prototype.toUTCString.length is expected to be 0'
);

View File

@ -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.toUTCString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.toutcstring
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype.toUTCString.length;
verifyNotWritable(Date.prototype.toUTCString, "length", null, 1);
assert.sameValue(
Date.prototype.toUTCString.length,
x,
'The value of Date.prototype.toUTCString.length is expected to equal the value of x'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toUTCString property "length" has { ReadOnly, !
DontDelete, DontEnum } attributes
esid: sec-date.prototype.toutcstring
description: Checking DontDelete attribute
---*/
assert.sameValue(
delete Date.prototype.toUTCString.length,
true,
'The value of `delete Date.prototype.toUTCString.length` is expected to be true'
);
assert(
!Date.prototype.toUTCString.hasOwnProperty('length'),
'The value of !Date.prototype.toUTCString.hasOwnProperty(\'length\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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.toUTCString property "length" has { ReadOnly,
DontDelete, DontEnum } attributes
esid: sec-date.prototype.toutcstring
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.toUTCString.propertyIsEnumerable('length'),
'The value of !Date.prototype.toUTCString.propertyIsEnumerable(\'length\') is expected to be true'
);
for (var x in Date.prototype.toUTCString) {
assert.notSameValue(x, "length", 'The value of x is not "length"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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.toutcstring
description: >
Date.prototype.toUTCString.length is 0.
info: |
Date.prototype.toUTCString ( )
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.toUTCString, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -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.toutcstring
description: >
Property descriptor for Date.prototype.toUTCString.
info: |
Date.prototype.toUTCString ( )
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, "toUTCString", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -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 "valueOf" has { DontEnum } attributes
esid: sec-date.prototype.valueof
description: Checking absence of ReadOnly attribute
---*/
var x = Date.prototype.valueOf;
if (x === 1) {
Date.prototype.valueOf = 2;
} else {
Date.prototype.valueOf = 1;
}
assert.notSameValue(
Date.prototype.valueOf,
x,
'The value of Date.prototype.valueOf is expected to not equal the value of `x`'
);
// TODO: Convert to verifyProperty() format.

View File

@ -1,17 +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 "valueOf" has { DontEnum } attributes
esid: sec-date.prototype.valueof
description: Checking absence of DontDelete attribute
---*/
assert.notSameValue(delete Date.prototype.valueOf, false, 'The value of delete Date.prototype.valueOf is not false');
assert(
!Date.prototype.hasOwnProperty('valueOf'),
'The value of !Date.prototype.hasOwnProperty(\'valueOf\') is expected to be true'
);
// TODO: Convert to verifyProperty() format.

View File

@ -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 "valueOf" has { DontEnum } attributes
esid: sec-date.prototype.valueof
description: Checking DontEnum attribute
---*/
assert(
!Date.prototype.propertyIsEnumerable('valueOf'),
'The value of !Date.prototype.propertyIsEnumerable(\'valueOf\') is expected to be true'
);
for (var x in Date.prototype) {
assert.notSameValue(x, "valueOf", 'The value of x is not "valueOf"');
}
// TODO: Convert to verifyProperty() format.

View File

@ -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 "length" property of the "valueOf" is 0
esid: sec-date.prototype.valueof
description: The "length" property of the "valueOf" is 0
---*/
assert.sameValue(
Date.prototype.valueOf.hasOwnProperty("length"),
true,
'Date.prototype.valueOf.hasOwnProperty("length") must return true'
);
assert.sameValue(Date.prototype.valueOf.length, 0, 'The value of Date.prototype.valueOf.length is expected to be 0');

View File

@ -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.valueOf property "length" has { ReadOnly, DontDelete,
DontEnum } attributes
esid: sec-date.prototype.valueof
description: Checking ReadOnly attribute
includes: [propertyHelper.js]
---*/
var x = Date.prototype.valueOf.length;
verifyNotWritable(Date.prototype.valueOf, "length", null, 1);
assert.sameValue(
Date.prototype.valueOf.length,
x,
'The value of Date.prototype.valueOf.length is expected to 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