Temporal: Test @@toStringTag properties.

This commit is contained in:
Ms2ger 2022-05-19 15:39:22 +02:00 committed by Philip Chimento
parent 494b678cc5
commit 912559f683
10 changed files with 145 additions and 2 deletions

View File

@ -0,0 +1,16 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.calendar.prototype-@@tostringtag
description: The @@toStringTag property of Temporal.Calendar
includes: [propertyHelper.js]
features: [Temporal]
---*/
verifyProperty(Temporal.Calendar.prototype, Symbol.toStringTag, {
value: "Temporal.Calendar",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -0,0 +1,16 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.duration.prototype-@@tostringtag
description: The @@toStringTag property of Temporal.Duration
includes: [propertyHelper.js]
features: [Temporal]
---*/
verifyProperty(Temporal.Duration.prototype, Symbol.toStringTag, {
value: "Temporal.Duration",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -8,8 +8,7 @@ includes: [propertyHelper.js]
features: [Temporal]
---*/
const { Instant } = Temporal;
verifyProperty(Instant.prototype, Symbol.toStringTag, {
verifyProperty(Temporal.Instant.prototype, Symbol.toStringTag, {
value: "Temporal.Instant",
writable: false,
enumerable: false,

View File

@ -0,0 +1,16 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plaindate.prototype-@@tostringtag
description: The @@toStringTag property of Temporal.PlainDate
includes: [propertyHelper.js]
features: [Temporal]
---*/
verifyProperty(Temporal.PlainDate.prototype, Symbol.toStringTag, {
value: "Temporal.PlainDate",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -0,0 +1,16 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plaindatetime.prototype-@@tostringtag
description: The @@toStringTag property of Temporal.PlainDateTime
includes: [propertyHelper.js]
features: [Temporal]
---*/
verifyProperty(Temporal.PlainDateTime.prototype, Symbol.toStringTag, {
value: "Temporal.PlainDateTime",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -0,0 +1,16 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plainmonthday.prototype-@@tostringtag
description: The @@toStringTag property of Temporal.PlainMonthDay
includes: [propertyHelper.js]
features: [Temporal]
---*/
verifyProperty(Temporal.PlainMonthDay.prototype, Symbol.toStringTag, {
value: "Temporal.PlainMonthDay",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -0,0 +1,16 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plaintime.prototype-@@tostringtag
description: The @@toStringTag property of Temporal.PlainTime
includes: [propertyHelper.js]
features: [Temporal]
---*/
verifyProperty(Temporal.PlainTime.prototype, Symbol.toStringTag, {
value: "Temporal.PlainTime",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -0,0 +1,16 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plainyearmonth.prototype-@@tostringtag
description: The @@toStringTag property of Temporal.PlainYearMonth
includes: [propertyHelper.js]
features: [Temporal]
---*/
verifyProperty(Temporal.PlainYearMonth.prototype, Symbol.toStringTag, {
value: "Temporal.PlainYearMonth",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -0,0 +1,16 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.timezone.prototype-@@tostringtag
description: The @@toStringTag property of Temporal.TimeZone
includes: [propertyHelper.js]
features: [Temporal]
---*/
verifyProperty(Temporal.TimeZone.prototype, Symbol.toStringTag, {
value: "Temporal.TimeZone",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -0,0 +1,16 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.zoneddatetime.prototype-@@tostringtag
description: The @@toStringTag property of Temporal.ZonedDateTime
includes: [propertyHelper.js]
features: [Temporal]
---*/
verifyProperty(Temporal.ZonedDateTime.prototype, Symbol.toStringTag, {
value: "Temporal.ZonedDateTime",
writable: false,
enumerable: false,
configurable: true,
});