Skip to content

Commit

Permalink
Temporal: Test @@toStringTag properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger authored and ptomato committed May 19, 2022
1 parent 494b678 commit 912559f
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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,
});
Original file line number Diff line number Diff line change
@@ -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,
});
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
});
Original file line number Diff line number Diff line change
@@ -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,
});
Original file line number Diff line number Diff line change
@@ -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,
});
Original file line number Diff line number Diff line change
@@ -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,
});
Original file line number Diff line number Diff line change
@@ -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,
});
Original file line number Diff line number Diff line change
@@ -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,
});
Original file line number Diff line number Diff line change
@@ -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,
});

0 comments on commit 912559f

Please sign in to comment.