From 9b3d9d970047459dffdd4625d26295843ddd33b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Wed, 9 Oct 2024 14:37:13 +0200 Subject: [PATCH] Update built-ins/Date to verifyProperty --- test/built-ins/Date/UTC/S15.9.4.3_A1_T1.js | 19 ------------ test/built-ins/Date/UTC/S15.9.4.3_A1_T2.js | 13 --------- test/built-ins/Date/UTC/S15.9.4.3_A1_T3.js | 19 ------------ test/built-ins/Date/UTC/S15.9.4.3_A2_T1.js | 11 ------- test/built-ins/Date/UTC/S15.9.4.3_A3_T1.js | 18 ------------ test/built-ins/Date/UTC/S15.9.4.3_A3_T2.js | 20 ------------- test/built-ins/Date/UTC/S15.9.4.3_A3_T3.js | 21 -------------- test/built-ins/Date/UTC/length.js | 25 ++++++++++++++++ test/built-ins/Date/UTC/prop-desc.js | 22 ++++++++++++++ test/built-ins/Date/length.js | 25 ++++++++++++++++ test/built-ins/Date/parse/S15.9.4.2_A1_T1.js | 13 --------- test/built-ins/Date/parse/S15.9.4.2_A1_T2.js | 12 -------- test/built-ins/Date/parse/S15.9.4.2_A1_T3.js | 18 ------------ test/built-ins/Date/parse/S15.9.4.2_A2_T1.js | 10 ------- test/built-ins/Date/parse/S15.9.4.2_A3_T1.js | 17 ----------- test/built-ins/Date/parse/S15.9.4.2_A3_T2.js | 18 ------------ test/built-ins/Date/parse/S15.9.4.2_A3_T3.js | 20 ------------- test/built-ins/Date/parse/length.js | 29 +++++++++++++++++++ test/built-ins/Date/parse/prop-desc.js | 22 ++++++++++++++ test/built-ins/Date/prop-desc.js | 2 +- .../Date/prototype/S15.9.4.1_A1_T1.js | 17 ----------- .../Date/prototype/S15.9.4.1_A1_T2.js | 28 ------------------ .../Date/prototype/S15.9.4.1_A1_T3.js | 20 ------------- .../prototype/constructor/S15.9.5.1_A1_T1.js | 23 --------------- .../prototype/constructor/S15.9.5.1_A1_T2.js | 20 ------------- .../prototype/constructor/S15.9.5.1_A1_T3.js | 18 ------------ .../prototype/constructor/S15.9.5.1_A2_T1.js | 19 ------------ .../prototype/constructor/S15.9.5.1_A3_T1.js | 22 -------------- .../prototype/constructor/S15.9.5.1_A3_T2.js | 22 -------------- .../prototype/constructor/S15.9.5.1_A3_T3.js | 20 ------------- .../Date/prototype/constructor/prop-desc.js | 25 ++++++++++++++++ test/built-ins/Date/prototype/prop-desc.js | 20 +++++++++++++ .../prototype/toDateString/S15.9.5.3_A1_T1.js | 23 --------------- .../prototype/toDateString/S15.9.5.3_A1_T2.js | 20 ------------- .../prototype/toDateString/S15.9.5.3_A1_T3.js | 18 ------------ .../prototype/toDateString/S15.9.5.3_A2_T1.js | 19 ------------ .../prototype/toDateString/S15.9.5.3_A3_T1.js | 22 -------------- .../prototype/toDateString/S15.9.5.3_A3_T2.js | 22 -------------- .../prototype/toDateString/S15.9.5.3_A3_T3.js | 20 ------------- .../Date/prototype/toDateString/length.js | 29 +++++++++++++++++++ .../Date/prototype/toDateString/prop-desc.js | 22 ++++++++++++++ .../toLocaleDateString/S15.9.5.6_A1_T1.js | 25 ---------------- .../toLocaleDateString/S15.9.5.6_A1_T2.js | 22 -------------- .../toLocaleDateString/S15.9.5.6_A1_T3.js | 20 ------------- .../toLocaleDateString/S15.9.5.6_A2_T1.js | 19 ------------ .../toLocaleDateString/S15.9.5.6_A3_T1.js | 22 -------------- .../toLocaleDateString/S15.9.5.6_A3_T2.js | 22 -------------- .../toLocaleDateString/S15.9.5.6_A3_T3.js | 20 ------------- .../prototype/toLocaleDateString/length.js | 29 +++++++++++++++++++ .../prototype/toLocaleDateString/prop-desc.js | 22 ++++++++++++++ .../toLocaleString/S15.9.5.5_A1_T1.js | 23 --------------- .../toLocaleString/S15.9.5.5_A1_T2.js | 21 -------------- .../toLocaleString/S15.9.5.5_A1_T3.js | 18 ------------ .../toLocaleString/S15.9.5.5_A2_T1.js | 20 ------------- .../toLocaleString/S15.9.5.5_A3_T1.js | 22 -------------- .../toLocaleString/S15.9.5.5_A3_T2.js | 23 --------------- .../toLocaleString/S15.9.5.5_A3_T3.js | 20 ------------- .../Date/prototype/toLocaleString/length.js | 29 +++++++++++++++++++ .../prototype/toLocaleString/prop-desc.js | 22 ++++++++++++++ .../toLocaleTimeString/S15.9.5.7_A1_T1.js | 25 ---------------- .../toLocaleTimeString/S15.9.5.7_A1_T2.js | 23 --------------- .../toLocaleTimeString/S15.9.5.7_A1_T3.js | 20 ------------- .../toLocaleTimeString/S15.9.5.7_A2_T1.js | 20 ------------- .../toLocaleTimeString/S15.9.5.7_A3_T1.js | 22 -------------- .../toLocaleTimeString/S15.9.5.7_A3_T2.js | 23 --------------- .../toLocaleTimeString/S15.9.5.7_A3_T3.js | 20 ------------- .../prototype/toLocaleTimeString/length.js | 29 +++++++++++++++++++ .../prototype/toLocaleTimeString/prop-desc.js | 22 ++++++++++++++ .../prototype/toString/S15.9.5.2_A1_T1.js | 23 --------------- .../prototype/toString/S15.9.5.2_A1_T2.js | 16 ---------- .../prototype/toString/S15.9.5.2_A1_T3.js | 18 ------------ .../prototype/toString/S15.9.5.2_A2_T1.js | 16 ---------- .../prototype/toString/S15.9.5.2_A3_T1.js | 22 -------------- .../prototype/toString/S15.9.5.2_A3_T2.js | 23 --------------- .../prototype/toString/S15.9.5.2_A3_T3.js | 20 ------------- .../Date/prototype/toString/length.js | 29 +++++++++++++++++++ .../Date/prototype/toString/prop-desc.js | 22 ++++++++++++++ .../prototype/toTimeString/S15.9.5.4_A1_T1.js | 23 --------------- .../prototype/toTimeString/S15.9.5.4_A1_T2.js | 21 -------------- .../prototype/toTimeString/S15.9.5.4_A1_T3.js | 18 ------------ .../prototype/toTimeString/S15.9.5.4_A2_T1.js | 20 ------------- .../prototype/toTimeString/S15.9.5.4_A3_T1.js | 22 -------------- .../prototype/toTimeString/S15.9.5.4_A3_T2.js | 22 -------------- .../prototype/toTimeString/S15.9.5.4_A3_T3.js | 20 ------------- .../Date/prototype/toTimeString/length.js | 29 +++++++++++++++++++ .../Date/prototype/toTimeString/prop-desc.js | 22 ++++++++++++++ .../prototype/toUTCString/S15.9.5.42_A1_T1.js | 23 --------------- .../prototype/toUTCString/S15.9.5.42_A1_T2.js | 21 -------------- .../prototype/toUTCString/S15.9.5.42_A1_T3.js | 18 ------------ .../prototype/toUTCString/S15.9.5.42_A2_T1.js | 20 ------------- .../prototype/toUTCString/S15.9.5.42_A3_T1.js | 22 -------------- .../prototype/toUTCString/S15.9.5.42_A3_T2.js | 23 --------------- .../prototype/toUTCString/S15.9.5.42_A3_T3.js | 20 ------------- .../Date/prototype/toUTCString/length.js | 29 +++++++++++++++++++ .../Date/prototype/toUTCString/prop-desc.js | 22 ++++++++++++++ .../Date/prototype/valueOf/S15.9.5.8_A1_T1.js | 23 --------------- .../Date/prototype/valueOf/S15.9.5.8_A1_T2.js | 17 ----------- .../Date/prototype/valueOf/S15.9.5.8_A1_T3.js | 18 ------------ .../Date/prototype/valueOf/S15.9.5.8_A2_T1.js | 16 ---------- .../Date/prototype/valueOf/S15.9.5.8_A3_T1.js | 22 -------------- .../Date/prototype/valueOf/S15.9.5.8_A3_T2.js | 23 --------------- .../Date/prototype/valueOf/S15.9.5.8_A3_T3.js | 20 ------------- .../Date/prototype/valueOf/length.js | 29 +++++++++++++++++++ .../Date/prototype/valueOf/prop-desc.js | 22 ++++++++++++++ 104 files changed, 577 insertions(+), 1603 deletions(-) delete mode 100644 test/built-ins/Date/UTC/S15.9.4.3_A1_T1.js delete mode 100644 test/built-ins/Date/UTC/S15.9.4.3_A1_T2.js delete mode 100644 test/built-ins/Date/UTC/S15.9.4.3_A1_T3.js delete mode 100644 test/built-ins/Date/UTC/S15.9.4.3_A2_T1.js delete mode 100644 test/built-ins/Date/UTC/S15.9.4.3_A3_T1.js delete mode 100644 test/built-ins/Date/UTC/S15.9.4.3_A3_T2.js delete mode 100644 test/built-ins/Date/UTC/S15.9.4.3_A3_T3.js create mode 100644 test/built-ins/Date/UTC/length.js create mode 100644 test/built-ins/Date/UTC/prop-desc.js create mode 100644 test/built-ins/Date/length.js delete mode 100644 test/built-ins/Date/parse/S15.9.4.2_A1_T1.js delete mode 100644 test/built-ins/Date/parse/S15.9.4.2_A1_T2.js delete mode 100644 test/built-ins/Date/parse/S15.9.4.2_A1_T3.js delete mode 100644 test/built-ins/Date/parse/S15.9.4.2_A2_T1.js delete mode 100644 test/built-ins/Date/parse/S15.9.4.2_A3_T1.js delete mode 100644 test/built-ins/Date/parse/S15.9.4.2_A3_T2.js delete mode 100644 test/built-ins/Date/parse/S15.9.4.2_A3_T3.js create mode 100644 test/built-ins/Date/parse/length.js create mode 100644 test/built-ins/Date/parse/prop-desc.js delete mode 100644 test/built-ins/Date/prototype/S15.9.4.1_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/S15.9.4.1_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/S15.9.4.1_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/constructor/S15.9.5.1_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/constructor/S15.9.5.1_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/constructor/S15.9.5.1_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/constructor/S15.9.5.1_A2_T1.js delete mode 100644 test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T1.js delete mode 100644 test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T2.js delete mode 100644 test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T3.js create mode 100644 test/built-ins/Date/prototype/constructor/prop-desc.js create mode 100644 test/built-ins/Date/prototype/prop-desc.js delete mode 100644 test/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/toDateString/S15.9.5.3_A2_T1.js delete mode 100644 test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T1.js delete mode 100644 test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T2.js delete mode 100644 test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T3.js create mode 100644 test/built-ins/Date/prototype/toDateString/length.js create mode 100644 test/built-ins/Date/prototype/toDateString/prop-desc.js delete mode 100644 test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A2_T1.js delete mode 100644 test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T1.js delete mode 100644 test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T2.js delete mode 100644 test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T3.js create mode 100644 test/built-ins/Date/prototype/toLocaleDateString/length.js create mode 100644 test/built-ins/Date/prototype/toLocaleDateString/prop-desc.js delete mode 100644 test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A2_T1.js delete mode 100644 test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T1.js delete mode 100644 test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T2.js delete mode 100644 test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T3.js create mode 100644 test/built-ins/Date/prototype/toLocaleString/length.js create mode 100644 test/built-ins/Date/prototype/toLocaleString/prop-desc.js delete mode 100644 test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A2_T1.js delete mode 100644 test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T1.js delete mode 100644 test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T2.js delete mode 100644 test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T3.js create mode 100644 test/built-ins/Date/prototype/toLocaleTimeString/length.js create mode 100644 test/built-ins/Date/prototype/toLocaleTimeString/prop-desc.js delete mode 100644 test/built-ins/Date/prototype/toString/S15.9.5.2_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/toString/S15.9.5.2_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/toString/S15.9.5.2_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/toString/S15.9.5.2_A2_T1.js delete mode 100644 test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T1.js delete mode 100644 test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T2.js delete mode 100644 test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T3.js create mode 100644 test/built-ins/Date/prototype/toString/length.js create mode 100644 test/built-ins/Date/prototype/toString/prop-desc.js delete mode 100644 test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A2_T1.js delete mode 100644 test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T1.js delete mode 100644 test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T2.js delete mode 100644 test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T3.js create mode 100644 test/built-ins/Date/prototype/toTimeString/length.js create mode 100644 test/built-ins/Date/prototype/toTimeString/prop-desc.js delete mode 100644 test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A2_T1.js delete mode 100644 test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T1.js delete mode 100644 test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T2.js delete mode 100644 test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T3.js create mode 100644 test/built-ins/Date/prototype/toUTCString/length.js create mode 100644 test/built-ins/Date/prototype/toUTCString/prop-desc.js delete mode 100644 test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T1.js delete mode 100644 test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T2.js delete mode 100644 test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T3.js delete mode 100644 test/built-ins/Date/prototype/valueOf/S15.9.5.8_A2_T1.js delete mode 100644 test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T1.js delete mode 100644 test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T2.js delete mode 100644 test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T3.js create mode 100644 test/built-ins/Date/prototype/valueOf/length.js create mode 100644 test/built-ins/Date/prototype/valueOf/prop-desc.js diff --git a/test/built-ins/Date/UTC/S15.9.4.3_A1_T1.js b/test/built-ins/Date/UTC/S15.9.4.3_A1_T1.js deleted file mode 100644 index 24ace7c0be..0000000000 --- a/test/built-ins/Date/UTC/S15.9.4.3_A1_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. - -/*--- -esid: sec-date.utc -info: The Date property "UTC" has { DontEnum } attributes -es5id: 15.9.4.3_A1_T1 -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.UTC; -if (x === 1) { - Date.UTC = 2; -} else { - Date.UTC = 1; -} -assert.notSameValue(Date.UTC, x, 'The value of Date.UTC is expected to not equal the value of `x`'); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/UTC/S15.9.4.3_A1_T2.js b/test/built-ins/Date/UTC/S15.9.4.3_A1_T2.js deleted file mode 100644 index 8ca2e8b5ad..0000000000 --- a/test/built-ins/Date/UTC/S15.9.4.3_A1_T2.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-date.utc -info: The Date property "UTC" has { DontEnum } attributes -es5id: 15.9.4.3_A1_T2 -description: Checking absence of DontDelete attribute ----*/ -assert.notSameValue(delete Date.UTC, false, 'The value of delete Date.UTC is not false'); -assert(!Date.hasOwnProperty('UTC'), 'The value of !Date.hasOwnProperty(\'UTC\') is expected to be true'); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/UTC/S15.9.4.3_A1_T3.js b/test/built-ins/Date/UTC/S15.9.4.3_A1_T3.js deleted file mode 100644 index 9c994c638b..0000000000 --- a/test/built-ins/Date/UTC/S15.9.4.3_A1_T3.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. - -/*--- -esid: sec-date.utc -info: The Date property "UTC" has { DontEnum } attributes -es5id: 15.9.4.3_A1_T3 -description: Checking DontEnum attribute ----*/ -assert( - !Date.propertyIsEnumerable('UTC'), - 'The value of !Date.propertyIsEnumerable(\'UTC\') is expected to be true' -); - -for (var x in Date) { - assert.notSameValue(x, "UTC", 'The value of x is not "UTC"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/UTC/S15.9.4.3_A2_T1.js b/test/built-ins/Date/UTC/S15.9.4.3_A2_T1.js deleted file mode 100644 index 9aa5398f1c..0000000000 --- a/test/built-ins/Date/UTC/S15.9.4.3_A2_T1.js +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-date.utc -info: The "length" property of the "UTC" is 7 -es5id: 15.9.4.3_A2_T1 -description: The "length" property of the "UTC" is 7 ----*/ -assert.sameValue(Date.UTC.hasOwnProperty("length"), true, 'Date.UTC.hasOwnProperty("length") must return true'); -assert.sameValue(Date.UTC.length, 7, 'The value of Date.UTC.length is expected to be 7'); diff --git a/test/built-ins/Date/UTC/S15.9.4.3_A3_T1.js b/test/built-ins/Date/UTC/S15.9.4.3_A3_T1.js deleted file mode 100644 index 941534ef7c..0000000000 --- a/test/built-ins/Date/UTC/S15.9.4.3_A3_T1.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. - -/*--- -esid: sec-date.utc -info: | - The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum } - attributes -es5id: 15.9.4.3_A3_T1 -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.UTC.length; -verifyNotWritable(Date.UTC, "length", null, 1); -assert.sameValue(Date.UTC.length, x, 'The value of Date.UTC.length is expected to equal the value of x'); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/UTC/S15.9.4.3_A3_T2.js b/test/built-ins/Date/UTC/S15.9.4.3_A3_T2.js deleted file mode 100644 index 10c88c71ce..0000000000 --- a/test/built-ins/Date/UTC/S15.9.4.3_A3_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. - -/*--- -esid: sec-date.utc -info: | - The Date.UTC property "length" has { ReadOnly, ! DontDelete, DontEnum } - attributes -es5id: 15.9.4.3_A3_T2 -description: Checking DontDelete attribute ----*/ - -assert.sameValue(delete Date.UTC.length, true, 'The value of `delete Date.UTC.length` is expected to be true'); - -assert( - !Date.UTC.hasOwnProperty('length'), - 'The value of !Date.UTC.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/UTC/S15.9.4.3_A3_T3.js b/test/built-ins/Date/UTC/S15.9.4.3_A3_T3.js deleted file mode 100644 index b49550ba96..0000000000 --- a/test/built-ins/Date/UTC/S15.9.4.3_A3_T3.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-date.utc -info: | - The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum } - attributes -es5id: 15.9.4.3_A3_T3 -description: Checking DontEnum attribute ----*/ -assert( - !Date.UTC.propertyIsEnumerable('length'), - 'The value of !Date.UTC.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.UTC) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/UTC/length.js b/test/built-ins/Date/UTC/length.js new file mode 100644 index 0000000000..e3bd02aca8 --- /dev/null +++ b/test/built-ins/Date/UTC/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.utc +description: > + Date.UTC.length is 7. +info: | + Date.UTC ( year [ , month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] ] ) + + The "length" property of this function is 7𝔽. + + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.UTC, "length", { + value: 7, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/UTC/prop-desc.js b/test/built-ins/Date/UTC/prop-desc.js new file mode 100644 index 0000000000..a240d45a25 --- /dev/null +++ b/test/built-ins/Date/UTC/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.utc +description: > + Property descriptor for Date.UTC. +info: | + Date.UTC ( year [ , month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] ] ) + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date, "UTC", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/length.js b/test/built-ins/Date/length.js new file mode 100644 index 0000000000..699d4427a2 --- /dev/null +++ b/test/built-ins/Date/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-properties-of-the-date-constructor +description: > + Date.length is 7. +info: | + Properties of the Date Constructor + + The Date constructor has a "length" property whose value is 7𝔽. + + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date, "length", { + value: 7, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/parse/S15.9.4.2_A1_T1.js b/test/built-ins/Date/parse/S15.9.4.2_A1_T1.js deleted file mode 100644 index ea1fe0dd89..0000000000 --- a/test/built-ins/Date/parse/S15.9.4.2_A1_T1.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The Date property "parse" has { DontEnum } attributes -esid: sec-date.parse -description: Checking absence of ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -verifyPrimordialProperty(Date, "parse", { - writable: true, -}); diff --git a/test/built-ins/Date/parse/S15.9.4.2_A1_T2.js b/test/built-ins/Date/parse/S15.9.4.2_A1_T2.js deleted file mode 100644 index 817ba4fbc7..0000000000 --- a/test/built-ins/Date/parse/S15.9.4.2_A1_T2.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The Date property "parse" has { DontEnum } attributes -esid: sec-date.parse -description: Checking absence of DontDelete attribute ----*/ -assert.notSameValue(delete Date.parse, false, 'The value of delete Date.parse is not false'); -assert(!Date.hasOwnProperty('parse'), 'The value of !Date.hasOwnProperty(\'parse\') is expected to be true'); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/parse/S15.9.4.2_A1_T3.js b/test/built-ins/Date/parse/S15.9.4.2_A1_T3.js deleted file mode 100644 index 6f7bf78b4d..0000000000 --- a/test/built-ins/Date/parse/S15.9.4.2_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 property "parse" has { DontEnum } attributes -esid: sec-date.parse -description: Checking DontEnum attribute ----*/ -assert( - !Date.propertyIsEnumerable('parse'), - 'The value of !Date.propertyIsEnumerable(\'parse\') is expected to be true' -); - -for (var x in Date) { - assert.notSameValue(x, "parse", 'The value of x is not "parse"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/parse/S15.9.4.2_A2_T1.js b/test/built-ins/Date/parse/S15.9.4.2_A2_T1.js deleted file mode 100644 index a1aeaaaf61..0000000000 --- a/test/built-ins/Date/parse/S15.9.4.2_A2_T1.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The "length" property of the "parse" is 1 -esid: sec-date.parse -description: The "length" property of the "parse" is 1 ----*/ -assert.sameValue(Date.parse.hasOwnProperty("length"), true, 'Date.parse.hasOwnProperty("length") must return true'); -assert.sameValue(Date.parse.length, 1, 'The value of Date.parse.length is expected to be 1'); diff --git a/test/built-ins/Date/parse/S15.9.4.2_A3_T1.js b/test/built-ins/Date/parse/S15.9.4.2_A3_T1.js deleted file mode 100644 index fcf48374d0..0000000000 --- a/test/built-ins/Date/parse/S15.9.4.2_A3_T1.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - The Date.parse property "length" has { ReadOnly, DontDelete, DontEnum } - attributes -esid: sec-date.parse -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.parse.length; -verifyNotWritable(Date.parse, "length", null, 1); -assert.sameValue(Date.parse.length, x, 'The value of Date.parse.length is expected to equal the value of x'); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/parse/S15.9.4.2_A3_T2.js b/test/built-ins/Date/parse/S15.9.4.2_A3_T2.js deleted file mode 100644 index df81d9e820..0000000000 --- a/test/built-ins/Date/parse/S15.9.4.2_A3_T2.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.parse property "length" has { ReadOnly, ! DontDelete, DontEnum } - attributes -esid: sec-date.parse -description: Checking DontDelete attribute ----*/ -assert.sameValue(delete Date.parse.length, true, 'The value of `delete Date.parse.length` is expected to be true'); - -assert( - !Date.parse.hasOwnProperty('length'), - 'The value of !Date.parse.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/parse/S15.9.4.2_A3_T3.js b/test/built-ins/Date/parse/S15.9.4.2_A3_T3.js deleted file mode 100644 index 08749e2492..0000000000 --- a/test/built-ins/Date/parse/S15.9.4.2_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.parse property "length" has { ReadOnly, DontDelete, DontEnum } - attributes -esid: sec-date.parse -description: Checking DontEnum attribute ----*/ -assert( - !Date.parse.propertyIsEnumerable('length'), - 'The value of !Date.parse.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.parse) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/parse/length.js b/test/built-ins/Date/parse/length.js new file mode 100644 index 0000000000..e9d226c561 --- /dev/null +++ b/test/built-ins/Date/parse/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.parse +description: > + Date.parse.length is 1. +info: | + Date.parse ( string ) + + 17 ECMAScript Standard Built-in Objects: + Every built-in function object, including constructors, has a "length" + property whose value is a non-negative integral Number. Unless otherwise + specified, this value is the number of required parameters shown in the + subclause heading for the function description. Optional parameters and rest + parameters are not included in the parameter count. + + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.parse, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/parse/prop-desc.js b/test/built-ins/Date/parse/prop-desc.js new file mode 100644 index 0000000000..166368aab4 --- /dev/null +++ b/test/built-ins/Date/parse/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.parse +description: > + Property descriptor for Date.parse. +info: | + Date.parse ( string ) + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date, "parse", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prop-desc.js b/test/built-ins/Date/prop-desc.js index b79b164068..ef3328c5aa 100644 --- a/test/built-ins/Date/prop-desc.js +++ b/test/built-ins/Date/prop-desc.js @@ -14,5 +14,5 @@ includes: [propertyHelper.js] verifyProperty(this, "Date", { writable: true, enumerable: false, - configurable: true + configurable: true, }); diff --git a/test/built-ins/Date/prototype/S15.9.4.1_A1_T1.js b/test/built-ins/Date/prototype/S15.9.4.1_A1_T1.js deleted file mode 100644 index f229ee91df..0000000000 --- a/test/built-ins/Date/prototype/S15.9.4.1_A1_T1.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - The Date property "prototype" has { DontEnum, DontDelete, ReadOnly } - attributes -esid: sec-date.prototype -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype; -verifyNotWritable(Date, "prototype", null, 1); -assert.sameValue(Date.prototype, x, 'The value of Date.prototype is expected to equal the value of x'); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/S15.9.4.1_A1_T2.js b/test/built-ins/Date/prototype/S15.9.4.1_A1_T2.js deleted file mode 100644 index 272985463e..0000000000 --- a/test/built-ins/Date/prototype/S15.9.4.1_A1_T2.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - The Date property "prototype" has { DontEnum, DontDelete, ReadOnly } - attributes -esid: sec-date.prototype -description: Checking DontDelete attribute -includes: [propertyHelper.js] ----*/ - -verifyNotConfigurable(Date, "prototype"); - -try { - assert.sameValue(delete Date.prototype, false); -} catch (e) { - if (e instanceof Test262Error) { - throw e; - } - assert(e instanceof TypeError); -} - -if (!Date.hasOwnProperty('prototype')) { - throw new Test262Error('#2: The Date.prototype property has the attributes DontDelete'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/S15.9.4.1_A1_T3.js b/test/built-ins/Date/prototype/S15.9.4.1_A1_T3.js deleted file mode 100644 index 92b5edfc4c..0000000000 --- a/test/built-ins/Date/prototype/S15.9.4.1_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 property "prototype" has { DontEnum, DontDelete, ReadOnly } - attributes -esid: sec-date.prototype -description: Checking DontEnum attribute ----*/ -assert( - !Date.propertyIsEnumerable('prototype'), - 'The value of !Date.propertyIsEnumerable(\'prototype\') is expected to be true' -); - -for (var x in Date) { - assert.notSameValue(x, "prototype", 'The value of x is not "prototype"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/constructor/S15.9.5.1_A1_T1.js b/test/built-ins/Date/prototype/constructor/S15.9.5.1_A1_T1.js deleted file mode 100644 index a383f5830c..0000000000 --- a/test/built-ins/Date/prototype/constructor/S15.9.5.1_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 "constructor" has { DontEnum } attributes -esid: sec-date.prototype.constructor -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.constructor; -if (x === 1) { - Date.prototype.constructor = 2; -} else { - Date.prototype.constructor = 1; -} - -assert.notSameValue( - Date.prototype.constructor, - x, - 'The value of Date.prototype.constructor is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/constructor/S15.9.5.1_A1_T2.js b/test/built-ins/Date/prototype/constructor/S15.9.5.1_A1_T2.js deleted file mode 100644 index 8119a5d5fa..0000000000 --- a/test/built-ins/Date/prototype/constructor/S15.9.5.1_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 "constructor" has { DontEnum } attributes -esid: sec-date.prototype.constructor -description: Checking absence of DontDelete attribute ----*/ -assert.notSameValue( - delete Date.prototype.constructor, - false, - 'The value of delete Date.prototype.constructor is not false' -); - -assert( - !Date.prototype.hasOwnProperty('constructor'), - 'The value of !Date.prototype.hasOwnProperty(\'constructor\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/constructor/S15.9.5.1_A1_T3.js b/test/built-ins/Date/prototype/constructor/S15.9.5.1_A1_T3.js deleted file mode 100644 index 18422a80c1..0000000000 --- a/test/built-ins/Date/prototype/constructor/S15.9.5.1_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 "constructor" has { DontEnum } attributes -esid: sec-date.prototype.constructor -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('constructor'), - 'The value of !Date.prototype.propertyIsEnumerable(\'constructor\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "constructor", 'The value of x is not "constructor"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/constructor/S15.9.5.1_A2_T1.js b/test/built-ins/Date/prototype/constructor/S15.9.5.1_A2_T1.js deleted file mode 100644 index d3df848504..0000000000 --- a/test/built-ins/Date/prototype/constructor/S15.9.5.1_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 "constructor" is 7 -esid: sec-date.prototype.constructor -description: The "length" property of the "constructor" is 7 ----*/ -assert.sameValue( - Date.prototype.constructor.hasOwnProperty("length"), - true, - 'Date.prototype.constructor.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.constructor.length, - 7, - 'The value of Date.prototype.constructor.length is expected to be 7' -); diff --git a/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T1.js b/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T1.js deleted file mode 100644 index 8118ea96f0..0000000000 --- a/test/built-ins/Date/prototype/constructor/S15.9.5.1_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.constructor property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.constructor -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.constructor.length; -verifyNotWritable(Date.prototype.constructor, "length", null, 1); - -assert.sameValue( - Date.prototype.constructor.length, - x, - 'The value of Date.prototype.constructor.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T2.js b/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T2.js deleted file mode 100644 index eb3fa0e752..0000000000 --- a/test/built-ins/Date/prototype/constructor/S15.9.5.1_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.constructor property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.constructor -description: Checking DontDelete attribute ----*/ -assert.sameValue( - delete Date.prototype.constructor.length, - true, - 'The value of `delete Date.prototype.constructor.length` is expected to be true' -); - -assert( - !Date.prototype.constructor.hasOwnProperty('length'), - 'The value of !Date.prototype.constructor.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T3.js b/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T3.js deleted file mode 100644 index 0871ea8bd4..0000000000 --- a/test/built-ins/Date/prototype/constructor/S15.9.5.1_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.constructor property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.constructor -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.constructor.propertyIsEnumerable('length'), - 'The value of !Date.prototype.constructor.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.constructor) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/constructor/prop-desc.js b/test/built-ins/Date/prototype/constructor/prop-desc.js new file mode 100644 index 0000000000..db2b42ef69 --- /dev/null +++ b/test/built-ins/Date/prototype/constructor/prop-desc.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.constructor +description: > + Property descriptor for Date.prototype.constructor. +info: | + Date.prototype.constructor + + The initial value of Date.prototype.constructor is %Date%. + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype, "constructor", { + value: Date, + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/prop-desc.js b/test/built-ins/Date/prototype/prop-desc.js new file mode 100644 index 0000000000..c724e665a8 --- /dev/null +++ b/test/built-ins/Date/prototype/prop-desc.js @@ -0,0 +1,20 @@ +// Copyright (C) 2024 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-date.prototype +description: > + Property descriptor for Date.prototype. +info: | + The initial value of Date.prototype is the Date prototype object. + + This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: false }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date, "prototype", { + writable: false, + enumerable: false, + configurable: false, +}); diff --git a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T1.js b/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T1.js deleted file mode 100644 index 0eaa5ae500..0000000000 --- a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_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 "toDateString" has { DontEnum } attributes -esid: sec-date.prototype.todatestring -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.toDateString; -if (x === 1) { - Date.prototype.toDateString = 2; -} else { - Date.prototype.toDateString = 1; -} - -assert.notSameValue( - Date.prototype.toDateString, - x, - 'The value of Date.prototype.toDateString is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T2.js b/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T2.js deleted file mode 100644 index c9944c7fb0..0000000000 --- a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_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 "toDateString" has { DontEnum } attributes -esid: sec-date.prototype.todatestring -description: Checking absence of DontDelete attribute ----*/ -assert.notSameValue( - delete Date.prototype.toDateString, - false, - 'The value of delete Date.prototype.toDateString is not false' -); - -assert( - !Date.prototype.hasOwnProperty('toDateString'), - 'The value of !Date.prototype.hasOwnProperty(\'toDateString\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T3.js b/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A1_T3.js deleted file mode 100644 index 272107e096..0000000000 --- a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_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 "toDateString" has { DontEnum } attributes -esid: sec-date.prototype.todatestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('toDateString'), - 'The value of !Date.prototype.propertyIsEnumerable(\'toDateString\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "toDateString", 'The value of x is not "toDateString"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A2_T1.js b/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A2_T1.js deleted file mode 100644 index 8b0c715bd9..0000000000 --- a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_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 "toDateString" is 0 -esid: sec-date.prototype.todatestring -description: The "length" property of the "toDateString" is 0 ----*/ -assert.sameValue( - Date.prototype.toDateString.hasOwnProperty("length"), - true, - 'Date.prototype.toDateString.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.toDateString.length, - 0, - 'The value of Date.prototype.toDateString.length is expected to be 0' -); diff --git a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T1.js b/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T1.js deleted file mode 100644 index 0a03072117..0000000000 --- a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_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.toDateString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.todatestring -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.toDateString.length; -verifyNotWritable(Date.prototype.toDateString, "length", null, 1); - -assert.sameValue( - Date.prototype.toDateString.length, - x, - 'The value of Date.prototype.toDateString.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T2.js b/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T2.js deleted file mode 100644 index 47cac272f1..0000000000 --- a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_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.toDateString property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.todatestring -description: Checking DontDelete attribute ----*/ -assert.sameValue( - delete Date.prototype.toDateString.length, - true, - 'The value of `delete Date.prototype.toDateString.length` is expected to be true' -); - -assert( - !Date.prototype.toDateString.hasOwnProperty('length'), - 'The value of !Date.prototype.toDateString.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T3.js b/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T3.js deleted file mode 100644 index 48bc3d4e37..0000000000 --- a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_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.toDateString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.todatestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.toDateString.propertyIsEnumerable('length'), - 'The value of !Date.prototype.toDateString.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.toDateString) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toDateString/length.js b/test/built-ins/Date/prototype/toDateString/length.js new file mode 100644 index 0000000000..ff7a9ebd0c --- /dev/null +++ b/test/built-ins/Date/prototype/toDateString/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.todatestring +description: > + Date.prototype.toDateString.length is 0. +info: | + Date.prototype.toDateString ( ) + + 17 ECMAScript Standard Built-in Objects: + Every built-in function object, including constructors, has a "length" + property whose value is a non-negative integral Number. Unless otherwise + specified, this value is the number of required parameters shown in the + subclause heading for the function description. Optional parameters and rest + parameters are not included in the parameter count. + + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype.toDateString, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toDateString/prop-desc.js b/test/built-ins/Date/prototype/toDateString/prop-desc.js new file mode 100644 index 0000000000..fc6e631aa4 --- /dev/null +++ b/test/built-ins/Date/prototype/toDateString/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.todatestring +description: > + Property descriptor for Date.prototype.toDateString. +info: | + Date.prototype.toDateString ( ) + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype, "toDateString", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A1_T1.js b/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A1_T1.js deleted file mode 100644 index 9d9d41c992..0000000000 --- a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_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 "toLocaleDateString" has { DontEnum } - attributes -esid: sec-date.prototype.tolocaledatestring -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.toLocaleDateString; -if (x === 1) { - Date.prototype.toLocaleDateString = 2; -} else { - Date.prototype.toLocaleDateString = 1; -} - -assert.notSameValue( - Date.prototype.toLocaleDateString, - x, - 'The value of Date.prototype.toLocaleDateString is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A1_T2.js b/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A1_T2.js deleted file mode 100644 index a6113edb48..0000000000 --- a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_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 "toLocaleDateString" has { DontEnum } - attributes -esid: sec-date.prototype.tolocaledatestring -description: Checking absence of DontDelete attribute ----*/ -assert.notSameValue( - delete Date.prototype.toLocaleDateString, - false, - 'The value of delete Date.prototype.toLocaleDateString is not false' -); - -assert( - !Date.prototype.hasOwnProperty('toLocaleDateString'), - 'The value of !Date.prototype.hasOwnProperty(\'toLocaleDateString\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A1_T3.js b/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A1_T3.js deleted file mode 100644 index c98c73f72b..0000000000 --- a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_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 "toLocaleDateString" has { DontEnum } - attributes -esid: sec-date.prototype.tolocaledatestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('toLocaleDateString'), - 'The value of !Date.prototype.propertyIsEnumerable(\'toLocaleDateString\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "toLocaleDateString", 'The value of x is not "toLocaleDateString"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A2_T1.js b/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A2_T1.js deleted file mode 100644 index 6d77b5f7d2..0000000000 --- a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_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 "toLocaleDateString" is 0 -esid: sec-date.prototype.tolocaledatestring -description: The "length" property of the "toLocaleDateString" is 0 ----*/ -assert.sameValue( - Date.prototype.toLocaleDateString.hasOwnProperty("length"), - true, - 'Date.prototype.toLocaleDateString.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.toLocaleDateString.length, - 0, - 'The value of Date.prototype.toLocaleDateString.length is expected to be 0' -); diff --git a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T1.js b/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T1.js deleted file mode 100644 index 5ec2ab6618..0000000000 --- a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_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.toLocaleDateString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tolocaledatestring -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.toLocaleDateString.length; -verifyNotWritable(Date.prototype.toLocaleDateString, "length", null, 1); - -assert.sameValue( - Date.prototype.toLocaleDateString.length, - x, - 'The value of Date.prototype.toLocaleDateString.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T2.js b/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T2.js deleted file mode 100644 index 7ecbf4c49b..0000000000 --- a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_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.toLocaleDateString property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tolocaledatestring -description: Checking DontDelete attribute ----*/ -assert.sameValue( - delete Date.prototype.toLocaleDateString.length, - true, - 'The value of `delete Date.prototype.toLocaleDateString.length` is expected to be true' -); - -assert( - !Date.prototype.toLocaleDateString.hasOwnProperty('length'), - 'The value of !Date.prototype.toLocaleDateString.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T3.js b/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T3.js deleted file mode 100644 index ed8f950521..0000000000 --- a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_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.toLocaleDateString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tolocaledatestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.toLocaleDateString.propertyIsEnumerable('length'), - 'The value of !Date.prototype.toLocaleDateString.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.toLocaleDateString) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleDateString/length.js b/test/built-ins/Date/prototype/toLocaleDateString/length.js new file mode 100644 index 0000000000..6faeb66390 --- /dev/null +++ b/test/built-ins/Date/prototype/toLocaleDateString/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.tolocaledatestring +description: > + Date.prototype.toLocaleDateString.length is 0. +info: | + Date.prototype.toLocaleDateString ( [ reserved1 [ , reserved2 ] ] ) + + 17 ECMAScript Standard Built-in Objects: + Every built-in function object, including constructors, has a "length" + property whose value is a non-negative integral Number. Unless otherwise + specified, this value is the number of required parameters shown in the + subclause heading for the function description. Optional parameters and rest + parameters are not included in the parameter count. + + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype.toLocaleDateString, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toLocaleDateString/prop-desc.js b/test/built-ins/Date/prototype/toLocaleDateString/prop-desc.js new file mode 100644 index 0000000000..039cac78e4 --- /dev/null +++ b/test/built-ins/Date/prototype/toLocaleDateString/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.tolocaledatestring +description: > + Property descriptor for Date.prototype.toLocaleDateString. +info: | + Date.prototype.toLocaleDateString ( [ reserved1 [ , reserved2 ] ] ) + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype, "toLocaleDateString", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T1.js b/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T1.js deleted file mode 100644 index 14ffa5db8f..0000000000 --- a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_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 "toLocaleString" has { DontEnum } attributes -esid: sec-date.prototype.tolocalestring -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.toLocaleString; -if (x === 1) { - Date.prototype.toLocaleString = 2; -} else { - Date.prototype.toLocaleString = 1; -} - -assert.notSameValue( - Date.prototype.toLocaleString, - x, - 'The value of Date.prototype.toLocaleString is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T2.js b/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T2.js deleted file mode 100644 index 2217581359..0000000000 --- a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T2.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The Date.prototype property "toLocaleString" has { DontEnum } attributes -esid: sec-date.prototype.tolocalestring -description: Checking absence of DontDelete attribute ----*/ - -assert.notSameValue( - delete Date.prototype.toLocaleString, - false, - 'The value of delete Date.prototype.toLocaleString is not false' -); - -assert( - !Date.prototype.hasOwnProperty('toLocaleString'), - 'The value of !Date.prototype.hasOwnProperty(\'toLocaleString\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T3.js b/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A1_T3.js deleted file mode 100644 index ee6993976b..0000000000 --- a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_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 "toLocaleString" has { DontEnum } attributes -esid: sec-date.prototype.tolocalestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('toLocaleString'), - 'The value of !Date.prototype.propertyIsEnumerable(\'toLocaleString\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "toLocaleString", 'The value of x is not "toLocaleString"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A2_T1.js b/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A2_T1.js deleted file mode 100644 index e6a4864d31..0000000000 --- a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A2_T1.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 "length" property of the "toLocaleString" is 0 -esid: sec-date.prototype.tolocalestring -description: The "length" property of the "toLocaleString" is 0 ----*/ - -assert.sameValue( - Date.prototype.toLocaleString.hasOwnProperty("length"), - true, - 'Date.prototype.toLocaleString.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.toLocaleString.length, - 0, - 'The value of Date.prototype.toLocaleString.length is expected to be 0' -); diff --git a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T1.js b/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T1.js deleted file mode 100644 index 6e8a96e9df..0000000000 --- a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_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.toLocaleString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tolocalestring -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.toLocaleString.length; -verifyNotWritable(Date.prototype.toLocaleString, "length", null, 1); - -assert.sameValue( - Date.prototype.toLocaleString.length, - x, - 'The value of Date.prototype.toLocaleString.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T2.js b/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T2.js deleted file mode 100644 index 75216ba55b..0000000000 --- a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T2.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.toLocaleString property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tolocalestring -description: Checking DontDelete attribute ----*/ - -assert.sameValue( - delete Date.prototype.toLocaleString.length, - true, - 'The value of `delete Date.prototype.toLocaleString.length` is expected to be true' -); - -assert( - !Date.prototype.toLocaleString.hasOwnProperty('length'), - 'The value of !Date.prototype.toLocaleString.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T3.js b/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T3.js deleted file mode 100644 index 8d83d25a58..0000000000 --- a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_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.toLocaleString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tolocalestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.toLocaleString.propertyIsEnumerable('length'), - 'The value of !Date.prototype.toLocaleString.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.toLocaleString) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleString/length.js b/test/built-ins/Date/prototype/toLocaleString/length.js new file mode 100644 index 0000000000..f0c2e6faf2 --- /dev/null +++ b/test/built-ins/Date/prototype/toLocaleString/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.tolocalestring +description: > + Date.prototype.toLocaleString.length is 0. +info: | + Date.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ) + + 17 ECMAScript Standard Built-in Objects: + Every built-in function object, including constructors, has a "length" + property whose value is a non-negative integral Number. Unless otherwise + specified, this value is the number of required parameters shown in the + subclause heading for the function description. Optional parameters and rest + parameters are not included in the parameter count. + + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype.toLocaleString, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toLocaleString/prop-desc.js b/test/built-ins/Date/prototype/toLocaleString/prop-desc.js new file mode 100644 index 0000000000..ce9e92f8fc --- /dev/null +++ b/test/built-ins/Date/prototype/toLocaleString/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.tolocalestring +description: > + Property descriptor for Date.prototype.toLocaleString. +info: | + Date.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ) + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype, "toLocaleString", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T1.js b/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T1.js deleted file mode 100644 index b0b81edd6b..0000000000 --- a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_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 "toLocaleTimeString" has { DontEnum } - attributes -esid: sec-date.prototype.tolocaletimestring -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.toLocaleTimeString; -if (x === 1) { - Date.prototype.toLocaleTimeString = 2; -} else { - Date.prototype.toLocaleTimeString = 1; -} - -assert.notSameValue( - Date.prototype.toLocaleTimeString, - x, - 'The value of Date.prototype.toLocaleTimeString is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T2.js b/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T2.js deleted file mode 100644 index 9be253900b..0000000000 --- a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T2.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 "toLocaleTimeString" has { DontEnum } - attributes -esid: sec-date.prototype.tolocaletimestring -description: Checking absence of DontDelete attribute ----*/ - -assert.notSameValue( - delete Date.prototype.toLocaleTimeString, - false, - 'The value of delete Date.prototype.toLocaleTimeString is not false' -); - -assert( - !Date.prototype.hasOwnProperty('toLocaleTimeString'), - 'The value of !Date.prototype.hasOwnProperty(\'toLocaleTimeString\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T3.js b/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A1_T3.js deleted file mode 100644 index 44c1c59d3d..0000000000 --- a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_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 "toLocaleTimeString" has { DontEnum } - attributes -esid: sec-date.prototype.tolocaletimestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('toLocaleTimeString'), - 'The value of !Date.prototype.propertyIsEnumerable(\'toLocaleTimeString\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "toLocaleTimeString", 'The value of x is not "toLocaleTimeString"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A2_T1.js b/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A2_T1.js deleted file mode 100644 index ee7b4840e2..0000000000 --- a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A2_T1.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 "length" property of the "toLocaleTimeString" is 0 -esid: sec-date.prototype.tolocaletimestring -description: The "length" property of the "toLocaleTimeString" is 0 ----*/ - -assert.sameValue( - Date.prototype.toLocaleTimeString.hasOwnProperty("length"), - true, - 'Date.prototype.toLocaleTimeString.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.toLocaleTimeString.length, - 0, - 'The value of Date.prototype.toLocaleTimeString.length is expected to be 0' -); diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T1.js b/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T1.js deleted file mode 100644 index 3cc1366310..0000000000 --- a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_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.toLocaleTimeString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tolocaletimestring -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.toLocaleTimeString.length; -verifyNotWritable(Date.prototype.toLocaleTimeString, "length", null, 1); - -assert.sameValue( - Date.prototype.toLocaleTimeString.length, - x, - 'The value of Date.prototype.toLocaleTimeString.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T2.js b/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T2.js deleted file mode 100644 index 1e6e08dd8d..0000000000 --- a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T2.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.toLocaleTimeString property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tolocaletimestring -description: Checking DontDelete attribute ----*/ - -assert.sameValue( - delete Date.prototype.toLocaleTimeString.length, - true, - 'The value of `delete Date.prototype.toLocaleTimeString.length` is expected to be true' -); - -assert( - !Date.prototype.toLocaleTimeString.hasOwnProperty('length'), - 'The value of !Date.prototype.toLocaleTimeString.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T3.js b/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T3.js deleted file mode 100644 index b9bd5fd99e..0000000000 --- a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_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.toLocaleTimeString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tolocaletimestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.toLocaleTimeString.propertyIsEnumerable('length'), - 'The value of !Date.prototype.toLocaleTimeString.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.toLocaleTimeString) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/length.js b/test/built-ins/Date/prototype/toLocaleTimeString/length.js new file mode 100644 index 0000000000..6b19cc188d --- /dev/null +++ b/test/built-ins/Date/prototype/toLocaleTimeString/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.tolocaletimestring +description: > + Date.prototype.toLocaleTimeString.length is 0. +info: | + Date.prototype.toLocaleTimeString ( [ reserved1 [ , reserved2 ] ] ) + + 17 ECMAScript Standard Built-in Objects: + Every built-in function object, including constructors, has a "length" + property whose value is a non-negative integral Number. Unless otherwise + specified, this value is the number of required parameters shown in the + subclause heading for the function description. Optional parameters and rest + parameters are not included in the parameter count. + + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype.toLocaleTimeString, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/prop-desc.js b/test/built-ins/Date/prototype/toLocaleTimeString/prop-desc.js new file mode 100644 index 0000000000..c9e3a99c43 --- /dev/null +++ b/test/built-ins/Date/prototype/toLocaleTimeString/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.tolocaletimestring +description: > + Property descriptor for Date.prototype.toLocaleTimeString. +info: | + Date.prototype.toLocaleTimeString ( [ reserved1 [ , reserved2 ] ] ) + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype, "toLocaleTimeString", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toString/S15.9.5.2_A1_T1.js b/test/built-ins/Date/prototype/toString/S15.9.5.2_A1_T1.js deleted file mode 100644 index a3c1936f13..0000000000 --- a/test/built-ins/Date/prototype/toString/S15.9.5.2_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 "toString" has { DontEnum } attributes -esid: sec-date.prototype.tostring -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.toString; -if (x === 1) { - Date.prototype.toString = 2; -} else { - Date.prototype.toString = 1; -} - -assert.notSameValue( - Date.prototype.toString, - x, - 'The value of Date.prototype.toString is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toString/S15.9.5.2_A1_T2.js b/test/built-ins/Date/prototype/toString/S15.9.5.2_A1_T2.js deleted file mode 100644 index 9025196e78..0000000000 --- a/test/built-ins/Date/prototype/toString/S15.9.5.2_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 "toString" has { DontEnum } attributes -esid: sec-date.prototype.tostring -description: Checking absence of DontDelete attribute ----*/ - -assert.notSameValue(delete Date.prototype.toString, false, 'The value of delete Date.prototype.toString is not false'); -assert( - !Date.prototype.hasOwnProperty('toString'), - 'The value of !Date.prototype.hasOwnProperty(\'toString\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toString/S15.9.5.2_A1_T3.js b/test/built-ins/Date/prototype/toString/S15.9.5.2_A1_T3.js deleted file mode 100644 index cd86da98d8..0000000000 --- a/test/built-ins/Date/prototype/toString/S15.9.5.2_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 "toString" has { DontEnum } attributes -esid: sec-date.prototype.tostring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('toString'), - 'The value of !Date.prototype.propertyIsEnumerable(\'toString\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "toString", 'The value of x is not "toString"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toString/S15.9.5.2_A2_T1.js b/test/built-ins/Date/prototype/toString/S15.9.5.2_A2_T1.js deleted file mode 100644 index 53d6f0c4d0..0000000000 --- a/test/built-ins/Date/prototype/toString/S15.9.5.2_A2_T1.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 "length" property of the "toString" is 0 -esid: sec-date.prototype.tostring -description: The "length" property of the "toString" is 0 ----*/ - -assert.sameValue( - Date.prototype.toString.hasOwnProperty("length"), - true, - 'Date.prototype.toString.hasOwnProperty("length") must return true' -); - -assert.sameValue(Date.prototype.toString.length, 0, 'The value of Date.prototype.toString.length is expected to be 0'); diff --git a/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T1.js b/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T1.js deleted file mode 100644 index 3207cb118a..0000000000 --- a/test/built-ins/Date/prototype/toString/S15.9.5.2_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.toString property "length" has { ReadOnly, DontDelete, - DontEnum } attributes -esid: sec-date.prototype.tostring -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.toString.length; -verifyNotWritable(Date.prototype.toString, "length", null, 1); - -assert.sameValue( - Date.prototype.toString.length, - x, - 'The value of Date.prototype.toString.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T2.js b/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T2.js deleted file mode 100644 index 5a410f30e1..0000000000 --- a/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T2.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.toString property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.tostring -description: Checking DontDelete attribute ----*/ - -assert.sameValue( - delete Date.prototype.toString.length, - true, - 'The value of `delete Date.prototype.toString.length` is expected to be true' -); - -assert( - !Date.prototype.toString.hasOwnProperty('length'), - 'The value of !Date.prototype.toString.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T3.js b/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T3.js deleted file mode 100644 index 03f76818e9..0000000000 --- a/test/built-ins/Date/prototype/toString/S15.9.5.2_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.toString property "length" has { ReadOnly, DontDelete, - DontEnum } attributes -esid: sec-date.prototype.tostring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.toString.propertyIsEnumerable('length'), - 'The value of !Date.prototype.toString.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.toString) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toString/length.js b/test/built-ins/Date/prototype/toString/length.js new file mode 100644 index 0000000000..0b59bd09c5 --- /dev/null +++ b/test/built-ins/Date/prototype/toString/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.tostring +description: > + Date.prototype.toString.length is 0. +info: | + Date.prototype.toString ( ) + + 17 ECMAScript Standard Built-in Objects: + Every built-in function object, including constructors, has a "length" + property whose value is a non-negative integral Number. Unless otherwise + specified, this value is the number of required parameters shown in the + subclause heading for the function description. Optional parameters and rest + parameters are not included in the parameter count. + + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype.toString, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toString/prop-desc.js b/test/built-ins/Date/prototype/toString/prop-desc.js new file mode 100644 index 0000000000..13a4dc4d2d --- /dev/null +++ b/test/built-ins/Date/prototype/toString/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.tostring +description: > + Property descriptor for Date.prototype.toString. +info: | + Date.prototype.toString ( ) + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype, "toString", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T1.js b/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T1.js deleted file mode 100644 index a8e7c93b81..0000000000 --- a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_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 "toTimeString" has { DontEnum } attributes -esid: sec-date.prototype.totimestring -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.toTimeString; -if (x === 1) { - Date.prototype.toTimeString = 2; -} else { - Date.prototype.toTimeString = 1; -} - -assert.notSameValue( - Date.prototype.toTimeString, - x, - 'The value of Date.prototype.toTimeString is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T2.js b/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T2.js deleted file mode 100644 index 5046dafcc4..0000000000 --- a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T2.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The Date.prototype property "toTimeString" has { DontEnum } attributes -esid: sec-date.prototype.totimestring -description: Checking absence of DontDelete attribute ----*/ - -assert.notSameValue( - delete Date.prototype.toTimeString, - false, - 'The value of delete Date.prototype.toTimeString is not false' -); - -assert( - !Date.prototype.hasOwnProperty('toTimeString'), - 'The value of !Date.prototype.hasOwnProperty(\'toTimeString\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T3.js b/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A1_T3.js deleted file mode 100644 index 6b8848c6c8..0000000000 --- a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_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 "toTimeString" has { DontEnum } attributes -esid: sec-date.prototype.totimestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('toTimeString'), - 'The value of !Date.prototype.propertyIsEnumerable(\'toTimeString\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "toTimeString", 'The value of x is not "toTimeString"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A2_T1.js b/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A2_T1.js deleted file mode 100644 index a690818fa8..0000000000 --- a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A2_T1.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 "length" property of the "toTimeString" is 0 -esid: sec-date.prototype.totimestring -description: The "length" property of the "toTimeString" is 0 ----*/ - -assert.sameValue( - Date.prototype.toTimeString.hasOwnProperty("length"), - true, - 'Date.prototype.toTimeString.hasOwnProperty("length") must return true' -); - - -assert.sameValue( - Date.prototype.toTimeString.length, - 0, - 'The value of Date.prototype.toTimeString.length is expected to be 0' -); diff --git a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T1.js b/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T1.js deleted file mode 100644 index e08d191165..0000000000 --- a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_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.toTimeString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.totimestring -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.toTimeString.length; -verifyNotWritable(Date.prototype.toTimeString, "length", null, 1); - -assert.sameValue( - Date.prototype.toTimeString.length, - x, - 'The value of Date.prototype.toTimeString.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T2.js b/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T2.js deleted file mode 100644 index 103757cb9a..0000000000 --- a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_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.toTimeString property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.totimestring -description: Checking DontDelete attribute ----*/ -assert.sameValue( - delete Date.prototype.toTimeString.length, - true, - 'The value of `delete Date.prototype.toTimeString.length` is expected to be true' -); - -assert( - !Date.prototype.toTimeString.hasOwnProperty('length'), - 'The value of !Date.prototype.toTimeString.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T3.js b/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T3.js deleted file mode 100644 index dcf419a5e6..0000000000 --- a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_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.toTimeString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.totimestring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.toTimeString.propertyIsEnumerable('length'), - 'The value of !Date.prototype.toTimeString.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.toTimeString) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toTimeString/length.js b/test/built-ins/Date/prototype/toTimeString/length.js new file mode 100644 index 0000000000..7a1d401bb2 --- /dev/null +++ b/test/built-ins/Date/prototype/toTimeString/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.totimestring +description: > + Date.prototype.toTimeString.length is 0. +info: | + Date.prototype.toTimeString ( ) + + 17 ECMAScript Standard Built-in Objects: + Every built-in function object, including constructors, has a "length" + property whose value is a non-negative integral Number. Unless otherwise + specified, this value is the number of required parameters shown in the + subclause heading for the function description. Optional parameters and rest + parameters are not included in the parameter count. + + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype.toTimeString, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toTimeString/prop-desc.js b/test/built-ins/Date/prototype/toTimeString/prop-desc.js new file mode 100644 index 0000000000..66802f0a7f --- /dev/null +++ b/test/built-ins/Date/prototype/toTimeString/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.totimestring +description: > + Property descriptor for Date.prototype.toTimeString. +info: | + Date.prototype.toTimeString ( ) + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype, "toTimeString", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T1.js b/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T1.js deleted file mode 100644 index 6964d878ba..0000000000 --- a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_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 "toUTCString" has { DontEnum } attributes -esid: sec-date.prototype.toutcstring -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.toUTCString; -if (x === 1) { - Date.prototype.toUTCString = 2; -} else { - Date.prototype.toUTCString = 1; -} - -assert.notSameValue( - Date.prototype.toUTCString, - x, - 'The value of Date.prototype.toUTCString is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T2.js b/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T2.js deleted file mode 100644 index 5139e72b02..0000000000 --- a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T2.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The Date.prototype property "toUTCString" has { DontEnum } attributes -esid: sec-date.prototype.toutcstring -description: Checking absence of DontDelete attribute ----*/ - -assert.notSameValue( - delete Date.prototype.toUTCString, - false, - 'The value of delete Date.prototype.toUTCString is not false' -); - -assert( - !Date.prototype.hasOwnProperty('toUTCString'), - 'The value of !Date.prototype.hasOwnProperty(\'toUTCString\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T3.js b/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A1_T3.js deleted file mode 100644 index c01428b297..0000000000 --- a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_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 "toUTCString" has { DontEnum } attributes -esid: sec-date.prototype.toutcstring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('toUTCString'), - 'The value of !Date.prototype.propertyIsEnumerable(\'toUTCString\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "toUTCString", 'The value of x is not "toUTCString"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A2_T1.js b/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A2_T1.js deleted file mode 100644 index 847ec8b722..0000000000 --- a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A2_T1.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 "length" property of the "toUTCString" is 0 -esid: sec-date.prototype.toutcstring -description: The "length" property of the "toUTCString" is 0 ----*/ - -assert.sameValue( - Date.prototype.toUTCString.hasOwnProperty("length"), - true, - 'Date.prototype.toUTCString.hasOwnProperty("length") must return true' -); - -assert.sameValue( - Date.prototype.toUTCString.length, - 0, - 'The value of Date.prototype.toUTCString.length is expected to be 0' -); diff --git a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T1.js b/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T1.js deleted file mode 100644 index d7ccf72536..0000000000 --- a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_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.toUTCString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.toutcstring -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.toUTCString.length; -verifyNotWritable(Date.prototype.toUTCString, "length", null, 1); - -assert.sameValue( - Date.prototype.toUTCString.length, - x, - 'The value of Date.prototype.toUTCString.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T2.js b/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T2.js deleted file mode 100644 index 25fbd958c9..0000000000 --- a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T2.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.toUTCString property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.toutcstring -description: Checking DontDelete attribute ----*/ - -assert.sameValue( - delete Date.prototype.toUTCString.length, - true, - 'The value of `delete Date.prototype.toUTCString.length` is expected to be true' -); - -assert( - !Date.prototype.toUTCString.hasOwnProperty('length'), - 'The value of !Date.prototype.toUTCString.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T3.js b/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T3.js deleted file mode 100644 index e4d7ae59f3..0000000000 --- a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_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.toUTCString property "length" has { ReadOnly, - DontDelete, DontEnum } attributes -esid: sec-date.prototype.toutcstring -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.toUTCString.propertyIsEnumerable('length'), - 'The value of !Date.prototype.toUTCString.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.toUTCString) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/toUTCString/length.js b/test/built-ins/Date/prototype/toUTCString/length.js new file mode 100644 index 0000000000..c7147bacb2 --- /dev/null +++ b/test/built-ins/Date/prototype/toUTCString/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.toutcstring +description: > + Date.prototype.toUTCString.length is 0. +info: | + Date.prototype.toUTCString ( ) + + 17 ECMAScript Standard Built-in Objects: + Every built-in function object, including constructors, has a "length" + property whose value is a non-negative integral Number. Unless otherwise + specified, this value is the number of required parameters shown in the + subclause heading for the function description. Optional parameters and rest + parameters are not included in the parameter count. + + Unless otherwise specified, the "length" property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype.toUTCString, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/toUTCString/prop-desc.js b/test/built-ins/Date/prototype/toUTCString/prop-desc.js new file mode 100644 index 0000000000..c85a06bb58 --- /dev/null +++ b/test/built-ins/Date/prototype/toUTCString/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.toutcstring +description: > + Property descriptor for Date.prototype.toUTCString. +info: | + Date.prototype.toUTCString ( ) + + 17 ECMAScript Standard Built-in Objects: + Every other data property described in clauses 19 through 28 and in + Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, + [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Date.prototype, "toUTCString", { + writable: true, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T1.js b/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T1.js deleted file mode 100644 index c196fd3194..0000000000 --- a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_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 "valueOf" has { DontEnum } attributes -esid: sec-date.prototype.valueof -description: Checking absence of ReadOnly attribute ----*/ - -var x = Date.prototype.valueOf; -if (x === 1) { - Date.prototype.valueOf = 2; -} else { - Date.prototype.valueOf = 1; -} - -assert.notSameValue( - Date.prototype.valueOf, - x, - 'The value of Date.prototype.valueOf is expected to not equal the value of `x`' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T2.js b/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T2.js deleted file mode 100644 index 1e7da42a87..0000000000 --- a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T2.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: The Date.prototype property "valueOf" has { DontEnum } attributes -esid: sec-date.prototype.valueof -description: Checking absence of DontDelete attribute ----*/ - -assert.notSameValue(delete Date.prototype.valueOf, false, 'The value of delete Date.prototype.valueOf is not false'); - -assert( - !Date.prototype.hasOwnProperty('valueOf'), - 'The value of !Date.prototype.hasOwnProperty(\'valueOf\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T3.js b/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A1_T3.js deleted file mode 100644 index a5ddaa2a96..0000000000 --- a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_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 "valueOf" has { DontEnum } attributes -esid: sec-date.prototype.valueof -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.propertyIsEnumerable('valueOf'), - 'The value of !Date.prototype.propertyIsEnumerable(\'valueOf\') is expected to be true' -); - -for (var x in Date.prototype) { - assert.notSameValue(x, "valueOf", 'The value of x is not "valueOf"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A2_T1.js b/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A2_T1.js deleted file mode 100644 index 8d339e67d9..0000000000 --- a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A2_T1.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 "length" property of the "valueOf" is 0 -esid: sec-date.prototype.valueof -description: The "length" property of the "valueOf" is 0 ----*/ - -assert.sameValue( - Date.prototype.valueOf.hasOwnProperty("length"), - true, - 'Date.prototype.valueOf.hasOwnProperty("length") must return true' -); - -assert.sameValue(Date.prototype.valueOf.length, 0, 'The value of Date.prototype.valueOf.length is expected to be 0'); diff --git a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T1.js b/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T1.js deleted file mode 100644 index a3e2b07766..0000000000 --- a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_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.valueOf property "length" has { ReadOnly, DontDelete, - DontEnum } attributes -esid: sec-date.prototype.valueof -description: Checking ReadOnly attribute -includes: [propertyHelper.js] ----*/ - -var x = Date.prototype.valueOf.length; -verifyNotWritable(Date.prototype.valueOf, "length", null, 1); - -assert.sameValue( - Date.prototype.valueOf.length, - x, - 'The value of Date.prototype.valueOf.length is expected to equal the value of x' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T2.js b/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T2.js deleted file mode 100644 index 188e7b75ec..0000000000 --- a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T2.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.valueOf property "length" has { ReadOnly, ! - DontDelete, DontEnum } attributes -esid: sec-date.prototype.valueof -description: Checking DontDelete attribute ----*/ - -assert.sameValue( - delete Date.prototype.valueOf.length, - true, - 'The value of `delete Date.prototype.valueOf.length` is expected to be true' -); - -assert( - !Date.prototype.valueOf.hasOwnProperty('length'), - 'The value of !Date.prototype.valueOf.hasOwnProperty(\'length\') is expected to be true' -); - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T3.js b/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T3.js deleted file mode 100644 index f932f69a10..0000000000 --- a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_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.valueOf property "length" has { ReadOnly, DontDelete, - DontEnum } attributes -esid: sec-date.prototype.valueof -description: Checking DontEnum attribute ----*/ -assert( - !Date.prototype.valueOf.propertyIsEnumerable('length'), - 'The value of !Date.prototype.valueOf.propertyIsEnumerable(\'length\') is expected to be true' -); - -for (var x in Date.prototype.valueOf) { - assert.notSameValue(x, "length", 'The value of x is not "length"'); -} - -// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/Date/prototype/valueOf/length.js b/test/built-ins/Date/prototype/valueOf/length.js new file mode 100644 index 0000000000..2c057cadad --- /dev/null +++ b/test/built-ins/Date/prototype/valueOf/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.valueof +description: > + Date.prototype.valueOf.length is 0. +info: | + Date.prototype.valueOf ( ) + + 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.valueOf, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/Date/prototype/valueOf/prop-desc.js b/test/built-ins/Date/prototype/valueOf/prop-desc.js new file mode 100644 index 0000000000..618a4d03b2 --- /dev/null +++ b/test/built-ins/Date/prototype/valueOf/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.valueof +description: > + Property descriptor for Date.prototype.valueOf. +info: | + Date.prototype.valueOf ( ) + + 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, "valueOf", { + writable: true, + enumerable: false, + configurable: true, +});