diff --git a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A1_T1.js b/test/built-ins/Date/prototype/setDate/S15.9.5.36_A1_T1.js deleted file mode 100644 index 4e577d3553..0000000000 --- a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A1_T2.js b/test/built-ins/Date/prototype/setDate/S15.9.5.36_A1_T2.js deleted file mode 100644 index 6a45881169..0000000000 --- a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A1_T3.js b/test/built-ins/Date/prototype/setDate/S15.9.5.36_A1_T3.js deleted file mode 100644 index 2fd55052e1..0000000000 --- a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A2_T1.js b/test/built-ins/Date/prototype/setDate/S15.9.5.36_A2_T1.js deleted file mode 100644 index c56c0a7803..0000000000 --- a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A2_T1.js +++ /dev/null @@ -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'); diff --git a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T1.js b/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T1.js deleted file mode 100644 index eec7600d5c..0000000000 --- a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T2.js b/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T2.js deleted file mode 100644 index 39a5491bcf..0000000000 --- a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T3.js b/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T3.js deleted file mode 100644 index ba806d6df4..0000000000 --- a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setDate/length.js b/test/built-ins/Date/prototype/setDate/length.js new file mode 100644 index 0000000000..7bb55027f2 --- /dev/null +++ b/test/built-ins/Date/prototype/setDate/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setDate/prop-desc.js b/test/built-ins/Date/prototype/setDate/prop-desc.js new file mode 100644 index 0000000000..a044c8b3a7 --- /dev/null +++ b/test/built-ins/Date/prototype/setDate/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A1_T1.js b/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A1_T1.js deleted file mode 100644 index b9b16f1598..0000000000 --- a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A1_T2.js b/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A1_T2.js deleted file mode 100644 index 43f21d0088..0000000000 --- a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A1_T3.js b/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A1_T3.js deleted file mode 100644 index 96feba4468..0000000000 --- a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A2_T1.js b/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A2_T1.js deleted file mode 100644 index a65679a20e..0000000000 --- a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A2_T1.js +++ /dev/null @@ -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' -); diff --git a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T1.js b/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T1.js deleted file mode 100644 index 2d48084433..0000000000 --- a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T2.js b/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T2.js deleted file mode 100644 index 3567ab1c71..0000000000 --- a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T3.js b/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T3.js deleted file mode 100644 index 87c60d1574..0000000000 --- a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setFullYear/length.js b/test/built-ins/Date/prototype/setFullYear/length.js new file mode 100644 index 0000000000..b9971970fd --- /dev/null +++ b/test/built-ins/Date/prototype/setFullYear/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setFullYear/prop-desc.js b/test/built-ins/Date/prototype/setFullYear/prop-desc.js new file mode 100644 index 0000000000..7a15bfee14 --- /dev/null +++ b/test/built-ins/Date/prototype/setFullYear/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A1_T1.js b/test/built-ins/Date/prototype/setHours/S15.9.5.34_A1_T1.js deleted file mode 100644 index 3da5edfb6d..0000000000 --- a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A1_T2.js b/test/built-ins/Date/prototype/setHours/S15.9.5.34_A1_T2.js deleted file mode 100644 index 0b56eb5777..0000000000 --- a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A1_T3.js b/test/built-ins/Date/prototype/setHours/S15.9.5.34_A1_T3.js deleted file mode 100644 index f9e1603d08..0000000000 --- a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A2_T1.js b/test/built-ins/Date/prototype/setHours/S15.9.5.34_A2_T1.js deleted file mode 100644 index 5452e487f0..0000000000 --- a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A2_T1.js +++ /dev/null @@ -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'); diff --git a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T1.js b/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T1.js deleted file mode 100644 index b4bf2200b9..0000000000 --- a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T2.js b/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T2.js deleted file mode 100644 index cf8e48aadd..0000000000 --- a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T3.js b/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T3.js deleted file mode 100644 index 574494e264..0000000000 --- a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setHours/length.js b/test/built-ins/Date/prototype/setHours/length.js new file mode 100644 index 0000000000..d1dc42a1f7 --- /dev/null +++ b/test/built-ins/Date/prototype/setHours/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setHours/prop-desc.js b/test/built-ins/Date/prototype/setHours/prop-desc.js new file mode 100644 index 0000000000..620e2fd4e9 --- /dev/null +++ b/test/built-ins/Date/prototype/setHours/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A1_T1.js b/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A1_T1.js deleted file mode 100644 index 61279646d6..0000000000 --- a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A1_T2.js b/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A1_T2.js deleted file mode 100644 index 3302a4dafa..0000000000 --- a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A1_T3.js b/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A1_T3.js deleted file mode 100644 index d2493e19f2..0000000000 --- a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A2_T1.js b/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A2_T1.js deleted file mode 100644 index bb06bc3991..0000000000 --- a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A2_T1.js +++ /dev/null @@ -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' -); diff --git a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T1.js b/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T1.js deleted file mode 100644 index 7579c04f4f..0000000000 --- a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T2.js b/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T2.js deleted file mode 100644 index aed70f8290..0000000000 --- a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T3.js b/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T3.js deleted file mode 100644 index f64ba986da..0000000000 --- a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMilliseconds/length.js b/test/built-ins/Date/prototype/setMilliseconds/length.js new file mode 100644 index 0000000000..26522e513e --- /dev/null +++ b/test/built-ins/Date/prototype/setMilliseconds/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setMilliseconds/prop-desc.js b/test/built-ins/Date/prototype/setMilliseconds/prop-desc.js new file mode 100644 index 0000000000..184f7c1dad --- /dev/null +++ b/test/built-ins/Date/prototype/setMilliseconds/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A1_T1.js b/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A1_T1.js deleted file mode 100644 index 8bef31c0c4..0000000000 --- a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A1_T2.js b/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A1_T2.js deleted file mode 100644 index e51e7e52d4..0000000000 --- a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A1_T3.js b/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A1_T3.js deleted file mode 100644 index c7b693421a..0000000000 --- a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A2_T1.js b/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A2_T1.js deleted file mode 100644 index 5f9749a111..0000000000 --- a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A2_T1.js +++ /dev/null @@ -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' -); diff --git a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T1.js b/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T1.js deleted file mode 100644 index 81dcd90fd7..0000000000 --- a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T2.js b/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T2.js deleted file mode 100644 index 2d64138b8e..0000000000 --- a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T3.js b/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T3.js deleted file mode 100644 index 6f2d4fc6fe..0000000000 --- a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMinutes/length.js b/test/built-ins/Date/prototype/setMinutes/length.js new file mode 100644 index 0000000000..2431ce9c81 --- /dev/null +++ b/test/built-ins/Date/prototype/setMinutes/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setMinutes/prop-desc.js b/test/built-ins/Date/prototype/setMinutes/prop-desc.js new file mode 100644 index 0000000000..0d6794bf71 --- /dev/null +++ b/test/built-ins/Date/prototype/setMinutes/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A1_T1.js b/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A1_T1.js deleted file mode 100644 index 558a92c24f..0000000000 --- a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A1_T2.js b/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A1_T2.js deleted file mode 100644 index 3a5235dc05..0000000000 --- a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A1_T3.js b/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A1_T3.js deleted file mode 100644 index 7b9c734012..0000000000 --- a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A2_T1.js b/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A2_T1.js deleted file mode 100644 index ff19d8a321..0000000000 --- a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A2_T1.js +++ /dev/null @@ -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'); diff --git a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T1.js b/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T1.js deleted file mode 100644 index 1ebcff7837..0000000000 --- a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T2.js b/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T2.js deleted file mode 100644 index b038993b85..0000000000 --- a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T3.js b/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T3.js deleted file mode 100644 index cde3cd38be..0000000000 --- a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setMonth/length.js b/test/built-ins/Date/prototype/setMonth/length.js new file mode 100644 index 0000000000..253a4101f4 --- /dev/null +++ b/test/built-ins/Date/prototype/setMonth/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setMonth/prop-desc.js b/test/built-ins/Date/prototype/setMonth/prop-desc.js new file mode 100644 index 0000000000..8116a60357 --- /dev/null +++ b/test/built-ins/Date/prototype/setMonth/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A1_T1.js b/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A1_T1.js deleted file mode 100644 index c6614f4b4c..0000000000 --- a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A1_T2.js b/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A1_T2.js deleted file mode 100644 index 9fee3da775..0000000000 --- a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A1_T3.js b/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A1_T3.js deleted file mode 100644 index eefed814b1..0000000000 --- a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A2_T1.js b/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A2_T1.js deleted file mode 100644 index a217da2360..0000000000 --- a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A2_T1.js +++ /dev/null @@ -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' -); diff --git a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T1.js b/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T1.js deleted file mode 100644 index 00a52c74fc..0000000000 --- a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T2.js b/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T2.js deleted file mode 100644 index c32cd0ba0c..0000000000 --- a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T3.js b/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T3.js deleted file mode 100644 index d142da4c5c..0000000000 --- a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setSeconds/length.js b/test/built-ins/Date/prototype/setSeconds/length.js new file mode 100644 index 0000000000..3e614cc954 --- /dev/null +++ b/test/built-ins/Date/prototype/setSeconds/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setSeconds/prop-desc.js b/test/built-ins/Date/prototype/setSeconds/prop-desc.js new file mode 100644 index 0000000000..f09fe0da87 --- /dev/null +++ b/test/built-ins/Date/prototype/setSeconds/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A1_T1.js b/test/built-ins/Date/prototype/setTime/S15.9.5.27_A1_T1.js deleted file mode 100644 index d79e45efea..0000000000 --- a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A1_T2.js b/test/built-ins/Date/prototype/setTime/S15.9.5.27_A1_T2.js deleted file mode 100644 index d4cb684ddf..0000000000 --- a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A1_T3.js b/test/built-ins/Date/prototype/setTime/S15.9.5.27_A1_T3.js deleted file mode 100644 index 0e68b6f3b1..0000000000 --- a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A2_T1.js b/test/built-ins/Date/prototype/setTime/S15.9.5.27_A2_T1.js deleted file mode 100644 index b85feb89a4..0000000000 --- a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A2_T1.js +++ /dev/null @@ -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'); diff --git a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T1.js b/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T1.js deleted file mode 100644 index df37a2e074..0000000000 --- a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T2.js b/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T2.js deleted file mode 100644 index 714b313a8e..0000000000 --- a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T3.js b/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T3.js deleted file mode 100644 index feaa5484e4..0000000000 --- a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setTime/length.js b/test/built-ins/Date/prototype/setTime/length.js new file mode 100644 index 0000000000..1f89b49c20 --- /dev/null +++ b/test/built-ins/Date/prototype/setTime/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setTime/prop-desc.js b/test/built-ins/Date/prototype/setTime/prop-desc.js new file mode 100644 index 0000000000..26412db9fe --- /dev/null +++ b/test/built-ins/Date/prototype/setTime/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A1_T1.js b/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A1_T1.js deleted file mode 100644 index 0d8cb821ce..0000000000 --- a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A1_T2.js b/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A1_T2.js deleted file mode 100644 index 06732cfbd1..0000000000 --- a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A1_T3.js b/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A1_T3.js deleted file mode 100644 index 5ceba4fc96..0000000000 --- a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A2_T1.js b/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A2_T1.js deleted file mode 100644 index 84c31dd7f9..0000000000 --- a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A2_T1.js +++ /dev/null @@ -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' -); diff --git a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T1.js b/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T1.js deleted file mode 100644 index e8b58a62b9..0000000000 --- a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T2.js b/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T2.js deleted file mode 100644 index ea02054c40..0000000000 --- a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T3.js b/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T3.js deleted file mode 100644 index 8108c86ccb..0000000000 --- a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCDate/length.js b/test/built-ins/Date/prototype/setUTCDate/length.js new file mode 100644 index 0000000000..d0c386afe4 --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCDate/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setUTCDate/prop-desc.js b/test/built-ins/Date/prototype/setUTCDate/prop-desc.js new file mode 100644 index 0000000000..5a5be2f72a --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCDate/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A1_T1.js b/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A1_T1.js deleted file mode 100644 index 5445322f03..0000000000 --- a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A1_T2.js b/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A1_T2.js deleted file mode 100644 index 80ef77e03f..0000000000 --- a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A1_T3.js b/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A1_T3.js deleted file mode 100644 index 6e469e6a8a..0000000000 --- a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A2_T1.js b/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A2_T1.js deleted file mode 100644 index c54d8cd288..0000000000 --- a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A2_T1.js +++ /dev/null @@ -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' -); diff --git a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T1.js b/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T1.js deleted file mode 100644 index cf6fbe7c43..0000000000 --- a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T2.js b/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T2.js deleted file mode 100644 index 615048fd13..0000000000 --- a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T3.js b/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T3.js deleted file mode 100644 index a111f91b80..0000000000 --- a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCFullYear/length.js b/test/built-ins/Date/prototype/setUTCFullYear/length.js new file mode 100644 index 0000000000..6c53fc8d6f --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCFullYear/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setUTCFullYear/prop-desc.js b/test/built-ins/Date/prototype/setUTCFullYear/prop-desc.js new file mode 100644 index 0000000000..7accc0e0ca --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCFullYear/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A1_T1.js b/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A1_T1.js deleted file mode 100644 index e7f87882a3..0000000000 --- a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A1_T2.js b/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A1_T2.js deleted file mode 100644 index fe82465f2e..0000000000 --- a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A1_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A1_T3.js b/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A1_T3.js deleted file mode 100644 index a99c5b7006..0000000000 --- a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A1_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A2_T1.js b/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A2_T1.js deleted file mode 100644 index c8868f1d29..0000000000 --- a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A2_T1.js +++ /dev/null @@ -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' -); diff --git a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T1.js b/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T1.js deleted file mode 100644 index b9ff7f6f55..0000000000 --- a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T2.js b/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T2.js deleted file mode 100644 index 5f42f554af..0000000000 --- a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T2.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T3.js b/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T3.js deleted file mode 100644 index 94ab4c2fa7..0000000000 --- a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T3.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCHours/length.js b/test/built-ins/Date/prototype/setUTCHours/length.js new file mode 100644 index 0000000000..19fef54cd3 --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCHours/length.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setUTCHours/prop-desc.js b/test/built-ins/Date/prototype/setUTCHours/prop-desc.js new file mode 100644 index 0000000000..901c8ed289 --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCHours/prop-desc.js @@ -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, +}); diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A1_T1.js b/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A1_T1.js deleted file mode 100644 index 5db756326b..0000000000 --- a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A1_T1.js +++ /dev/null @@ -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. diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A1_T2.js b/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A1_T2.js deleted file mode 100644 index b597ba9be4..0000000000 --- a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A1_T2.js +++ /dev/null @@ -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 "setUTCMilliseconds" has { DontEnum } - attributes -esid: sec-date.prototype.setutcmilliseconds -description: Checking absence of DontDelete attribute ----*/ -assert.notSameValue( - delete Date.prototype.setUTCMilliseconds, - false, - 'The value of delete Date.prototype.setUTCMilliseconds is not false' -); - -assert( - !Date.prototype.hasOwnProperty('setUTCMilliseconds'), - 'The value of !Date.prototype.hasOwnProperty(\'setUTCMilliseconds\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A1_T3.js b/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A1_T3.js deleted file mode 100644 index f20775041c..0000000000 --- a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A1_T3.js +++ /dev/null @@ -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 "setUTCMilliseconds" has { DontEnum } - attributes -esid: sec-date.prototype.setutcmilliseconds -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('setUTCMilliseconds'), - 'The value of !Date.prototype.propertyIsEnumerable(\'setUTCMilliseconds\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "setUTCMilliseconds", 'The value of x is not "setUTCMilliseconds"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A2_T1.js b/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A2_T1.js deleted file mode 100644 index 87bb57047f..0000000000 --- a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A2_T1.js +++ /dev/null @@ -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 "setUTCMilliseconds" is 1 -esid: sec-date.prototype.setutcmilliseconds -description: The "length" property of the "setUTCMilliseconds" is 1 ----*/ -assert.sameValue( - Date.prototype.setUTCMilliseconds.hasOwnProperty("length"), - true, - 'Date.prototype.setUTCMilliseconds.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.setUTCMilliseconds.length, - 1, - 'The value of Date.prototype.setUTCMilliseconds.length is expected to be 1' -); diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T1.js b/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T1.js deleted file mode 100644 index 759e07372c..0000000000 --- a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T1.js +++ /dev/null @@ -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.setUTCMilliseconds property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcmilliseconds -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.setUTCMilliseconds.length; -verifyNotWritable(Date.prototype.setUTCMilliseconds, "length", null, 1); - -assert.sameValue( - Date.prototype.setUTCMilliseconds.length, - x, - 'The value of Date.prototype.setUTCMilliseconds.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T2.js b/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T2.js deleted file mode 100644 index c357903eda..0000000000 --- a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T2.js +++ /dev/null @@ -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.setUTCMilliseconds property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcmilliseconds -description: Checking DontDelete attribute ----*/ -assert.sameValue( - delete Date.prototype.setUTCMilliseconds.length, - true, - 'The value of `delete Date.prototype.setUTCMilliseconds.length` is expected to be true' -); - -assert( - !Date.prototype.setUTCMilliseconds.hasOwnProperty('length'), - 'The value of !Date.prototype.setUTCMilliseconds.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T3.js b/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T3.js deleted file mode 100644 index 4c62d20b7c..0000000000 --- a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T3.js +++ /dev/null @@ -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.setUTCMilliseconds property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcmilliseconds -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.setUTCMilliseconds.propertyIsEnumerable('length'), - 'The value of !Date.prototype.setUTCMilliseconds.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.setUTCMilliseconds) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/length.js b/test/built-ins/Date/prototype/setUTCMilliseconds/length.js new file mode 100644 index 0000000000..43b2756609 --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCMilliseconds/length.js @@ -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.setutcmilliseconds +description: > + Date.prototype.setUTCMilliseconds.length is 1. +info: | + Date.prototype.setUTCMilliseconds ( 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.setUTCMilliseconds, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/prop-desc.js b/test/built-ins/Date/prototype/setUTCMilliseconds/prop-desc.js new file mode 100644 index 0000000000..c388f0e087 --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCMilliseconds/prop-desc.js @@ -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.setutcmilliseconds +description: > + Property descriptor for Date.prototype.setUTCMilliseconds. +info: | + Date.prototype.setUTCMilliseconds ( 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, "setUTCMilliseconds", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A1_T1.js b/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A1_T1.js deleted file mode 100644 index 16b490f32f..0000000000 --- a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A1_T1.js +++ /dev/null @@ -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 "setUTCMinutes" has { DontEnum } attributes -esid: sec-date.prototype.setutcminutes -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.setUTCMinutes; -if (x === 1) { - Date.prototype.setUTCMinutes = 2; -} else { - Date.prototype.setUTCMinutes = 1; -} - -assert.notSameValue( - Date.prototype.setUTCMinutes, - x, - 'The value of Date.prototype.setUTCMinutes is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A1_T2.js b/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A1_T2.js deleted file mode 100644 index e703d0e5b6..0000000000 --- a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A1_T2.js +++ /dev/null @@ -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 "setUTCMinutes" has { DontEnum } attributes -esid: sec-date.prototype.setutcminutes -description: Checking absence of DontDelete attribute ----*/ -assert.notSameValue( - delete Date.prototype.setUTCMinutes, - false, - 'The value of delete Date.prototype.setUTCMinutes is not false' -); - -assert( - !Date.prototype.hasOwnProperty('setUTCMinutes'), - 'The value of !Date.prototype.hasOwnProperty(\'setUTCMinutes\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A1_T3.js b/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A1_T3.js deleted file mode 100644 index 1cb8b3c0ba..0000000000 --- a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A1_T3.js +++ /dev/null @@ -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 "setUTCMinutes" has { DontEnum } attributes -esid: sec-date.prototype.setutcminutes -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('setUTCMinutes'), - 'The value of !Date.prototype.propertyIsEnumerable(\'setUTCMinutes\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "setUTCMinutes", 'The value of x is not "setUTCMinutes"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A2_T1.js b/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A2_T1.js deleted file mode 100644 index 3ca5a125df..0000000000 --- a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A2_T1.js +++ /dev/null @@ -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 "setUTCMinutes" is 3 -esid: sec-date.prototype.setutcminutes -description: The "length" property of the "setUTCMinutes" is 3 ----*/ -assert.sameValue( - Date.prototype.setUTCMinutes.hasOwnProperty("length"), - true, - 'Date.prototype.setUTCMinutes.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.setUTCMinutes.length, - 3, - 'The value of Date.prototype.setUTCMinutes.length is expected to be 3' -); diff --git a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T1.js b/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T1.js deleted file mode 100644 index 6b98ca18ae..0000000000 --- a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T1.js +++ /dev/null @@ -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.setUTCMinutes property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcminutes -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.setUTCMinutes.length; -verifyNotWritable(Date.prototype.setUTCMinutes, "length", null, 1); - -assert.sameValue( - Date.prototype.setUTCMinutes.length, - x, - 'The value of Date.prototype.setUTCMinutes.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T2.js b/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T2.js deleted file mode 100644 index bdee90360e..0000000000 --- a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T2.js +++ /dev/null @@ -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.setUTCMinutes property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcminutes -description: Checking DontDelete attribute ----*/ -assert.sameValue( - delete Date.prototype.setUTCMinutes.length, - true, - 'The value of `delete Date.prototype.setUTCMinutes.length` is expected to be true' -); - -assert( - !Date.prototype.setUTCMinutes.hasOwnProperty('length'), - 'The value of !Date.prototype.setUTCMinutes.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T3.js b/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T3.js deleted file mode 100644 index 0038d80119..0000000000 --- a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T3.js +++ /dev/null @@ -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.setUTCMinutes property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcminutes -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.setUTCMinutes.propertyIsEnumerable('length'), - 'The value of !Date.prototype.setUTCMinutes.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.setUTCMinutes) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMinutes/length.js b/test/built-ins/Date/prototype/setUTCMinutes/length.js new file mode 100644 index 0000000000..33977136dc --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCMinutes/length.js @@ -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.setutcminutes +description: > + Date.prototype.setUTCMinutes.length is 3. +info: | + Date.prototype.setUTCMinutes ( 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.setUTCMinutes, "length", { + value: 3, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/setUTCMinutes/prop-desc.js b/test/built-ins/Date/prototype/setUTCMinutes/prop-desc.js new file mode 100644 index 0000000000..bbe3fc73ba --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCMinutes/prop-desc.js @@ -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.setutcminutes +description: > + Property descriptor for Date.prototype.setUTCMinutes. +info: | + Date.prototype.setUTCMinutes ( 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, "setUTCMinutes", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A1_T1.js b/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A1_T1.js deleted file mode 100644 index 714a745bfa..0000000000 --- a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A1_T1.js +++ /dev/null @@ -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 "setUTCMonth" has { DontEnum } attributes -esid: sec-date.prototype.setutcmonth -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.setUTCMonth; -if (x === 1) { - Date.prototype.setUTCMonth = 2; -} else { - Date.prototype.setUTCMonth = 1; -} - -assert.notSameValue( - Date.prototype.setUTCMonth, - x, - 'The value of Date.prototype.setUTCMonth is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A1_T2.js b/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A1_T2.js deleted file mode 100644 index 9f935df761..0000000000 --- a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A1_T2.js +++ /dev/null @@ -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 "setUTCMonth" has { DontEnum } attributes -esid: sec-date.prototype.setutcmonth -description: Checking absence of DontDelete attribute ----*/ -assert.notSameValue( - delete Date.prototype.setUTCMonth, - false, - 'The value of delete Date.prototype.setUTCMonth is not false' -); - -assert( - !Date.prototype.hasOwnProperty('setUTCMonth'), - 'The value of !Date.prototype.hasOwnProperty(\'setUTCMonth\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A1_T3.js b/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A1_T3.js deleted file mode 100644 index 796ce3662b..0000000000 --- a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A1_T3.js +++ /dev/null @@ -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 "setUTCMonth" has { DontEnum } attributes -esid: sec-date.prototype.setutcmonth -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('setUTCMonth'), - 'The value of !Date.prototype.propertyIsEnumerable(\'setUTCMonth\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "setUTCMonth", 'The value of x is not "setUTCMonth"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A2_T1.js b/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A2_T1.js deleted file mode 100644 index fc1d5afb2e..0000000000 --- a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A2_T1.js +++ /dev/null @@ -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 "setUTCMonth" is 2 -esid: sec-date.prototype.setutcmonth -description: The "length" property of the "setUTCMonth" is 2 ----*/ -assert.sameValue( - Date.prototype.setUTCMonth.hasOwnProperty("length"), - true, - 'Date.prototype.setUTCMonth.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.setUTCMonth.length, - 2, - 'The value of Date.prototype.setUTCMonth.length is expected to be 2' -); diff --git a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T1.js b/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T1.js deleted file mode 100644 index 8c949fcc63..0000000000 --- a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T1.js +++ /dev/null @@ -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.setUTCMonth property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcmonth -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.setUTCMonth.length; -verifyNotWritable(Date.prototype.setUTCMonth, "length", null, 1); - -assert.sameValue( - Date.prototype.setUTCMonth.length, - x, - 'The value of Date.prototype.setUTCMonth.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T2.js b/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T2.js deleted file mode 100644 index bea9aff3c9..0000000000 --- a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T2.js +++ /dev/null @@ -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.setUTCMonth property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcmonth -description: Checking DontDelete attribute ----*/ -assert.sameValue( - delete Date.prototype.setUTCMonth.length, - true, - 'The value of `delete Date.prototype.setUTCMonth.length` is expected to be true' -); - -assert( - !Date.prototype.setUTCMonth.hasOwnProperty('length'), - 'The value of !Date.prototype.setUTCMonth.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T3.js b/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T3.js deleted file mode 100644 index 031a7634d5..0000000000 --- a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T3.js +++ /dev/null @@ -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.setUTCMonth property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcmonth -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.setUTCMonth.propertyIsEnumerable('length'), - 'The value of !Date.prototype.setUTCMonth.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.setUTCMonth) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCMonth/length.js b/test/built-ins/Date/prototype/setUTCMonth/length.js new file mode 100644 index 0000000000..ec2e6450d5 --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCMonth/length.js @@ -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.setutcmonth +description: > + Date.prototype.setUTCMonth.length is 2. +info: | + Date.prototype.setUTCMonth ( 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.setUTCMonth, "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/setUTCMonth/prop-desc.js b/test/built-ins/Date/prototype/setUTCMonth/prop-desc.js new file mode 100644 index 0000000000..928f4ffe63 --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCMonth/prop-desc.js @@ -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.setutcmonth +description: > + Property descriptor for Date.prototype.setUTCMonth. +info: | + Date.prototype.setUTCMonth ( 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, "setUTCMonth", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A1_T1.js b/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A1_T1.js deleted file mode 100644 index 109f674a1f..0000000000 --- a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A1_T1.js +++ /dev/null @@ -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 "setUTCSeconds" has { DontEnum } attributes -esid: sec-date.prototype.setutcseconds -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.setUTCSeconds; -if (x === 1) { - Date.prototype.setUTCSeconds = 2; -} else { - Date.prototype.setUTCSeconds = 1; -} - -assert.notSameValue( - Date.prototype.setUTCSeconds, - x, - 'The value of Date.prototype.setUTCSeconds is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A1_T2.js b/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A1_T2.js deleted file mode 100644 index 2b8d31a7fb..0000000000 --- a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A1_T2.js +++ /dev/null @@ -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 "setUTCSeconds" has { DontEnum } attributes -esid: sec-date.prototype.setutcseconds -description: Checking absence of DontDelete attribute ----*/ -assert.notSameValue( - delete Date.prototype.setUTCSeconds, - false, - 'The value of delete Date.prototype.setUTCSeconds is not false' -); - -assert( - !Date.prototype.hasOwnProperty('setUTCSeconds'), - 'The value of !Date.prototype.hasOwnProperty(\'setUTCSeconds\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A1_T3.js b/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A1_T3.js deleted file mode 100644 index 240d64794b..0000000000 --- a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A1_T3.js +++ /dev/null @@ -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 "setUTCSeconds" has { DontEnum } attributes -esid: sec-date.prototype.setutcseconds -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('setUTCSeconds'), - 'The value of !Date.prototype.propertyIsEnumerable(\'setUTCSeconds\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "setUTCSeconds", 'The value of x is not "setUTCSeconds"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A2_T1.js b/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A2_T1.js deleted file mode 100644 index df857c0c39..0000000000 --- a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A2_T1.js +++ /dev/null @@ -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 "setUTCSeconds" is 2 -esid: sec-date.prototype.setutcseconds -description: The "length" property of the "setUTCSeconds" is 2 ----*/ -assert.sameValue( - Date.prototype.setUTCSeconds.hasOwnProperty("length"), - true, - 'Date.prototype.setUTCSeconds.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.setUTCSeconds.length, - 2, - 'The value of Date.prototype.setUTCSeconds.length is expected to be 2' -); diff --git a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T1.js b/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T1.js deleted file mode 100644 index b744f9467a..0000000000 --- a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T1.js +++ /dev/null @@ -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.setUTCSeconds property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcseconds -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.setUTCSeconds.length; -verifyNotWritable(Date.prototype.setUTCSeconds, "length", null, 1); - -assert.sameValue( - Date.prototype.setUTCSeconds.length, - x, - 'The value of Date.prototype.setUTCSeconds.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T2.js b/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T2.js deleted file mode 100644 index bf36c60b35..0000000000 --- a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T2.js +++ /dev/null @@ -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.setUTCSeconds property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcseconds -description: Checking DontDelete attribute ----*/ -assert.sameValue( - delete Date.prototype.setUTCSeconds.length, - true, - 'The value of `delete Date.prototype.setUTCSeconds.length` is expected to be true' -); - -assert( - !Date.prototype.setUTCSeconds.hasOwnProperty('length'), - 'The value of !Date.prototype.setUTCSeconds.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T3.js b/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T3.js deleted file mode 100644 index 40f5cdc4fb..0000000000 --- a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T3.js +++ /dev/null @@ -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.setUTCSeconds property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.setutcseconds -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.setUTCSeconds.propertyIsEnumerable('length'), - 'The value of !Date.prototype.setUTCSeconds.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.setUTCSeconds) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/setUTCSeconds/length.js b/test/built-ins/Date/prototype/setUTCSeconds/length.js new file mode 100644 index 0000000000..b85b56268b --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCSeconds/length.js @@ -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.setutcseconds +description: > + Date.prototype.setUTCSeconds.length is 2. +info: | + Date.prototype.setUTCSeconds ( 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.setUTCSeconds, "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/setUTCSeconds/prop-desc.js b/test/built-ins/Date/prototype/setUTCSeconds/prop-desc.js new file mode 100644 index 0000000000..1361b58fb9 --- /dev/null +++ b/test/built-ins/Date/prototype/setUTCSeconds/prop-desc.js @@ -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.setutcseconds +description: > + Property descriptor for Date.prototype.setUTCSeconds. +info: | + Date.prototype.setUTCSeconds ( 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, "setUTCSeconds", { + writable: true, + enumerable: false, + configurable: true, +});