From 4eaa318c9e5e381e506e6bf67f835e8d502c873c Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 6 Aug 2021 17:08:20 -0700 Subject: [PATCH] Add branding tests from Temporal Closes: #3137 --- .../Calendar/prototype/dateAdd/branding.js | 21 +++++++++++++++++++ .../prototype/dateFromFields/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/dateUntil/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/day/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/dayOfWeek/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/dayOfYear/branding.js | 21 +++++++++++++++++++ .../prototype/daysInMonth/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/daysInWeek/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/daysInYear/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/era/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/eraYear/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/fields/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/inLeapYear/branding.js | 21 +++++++++++++++++++ .../prototype/mergeFields/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/month/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/monthCode/branding.js | 21 +++++++++++++++++++ .../prototype/monthDayFromFields/branding.js | 21 +++++++++++++++++++ .../prototype/monthsInYear/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/toString/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/weekOfYear/branding.js | 21 +++++++++++++++++++ .../Calendar/prototype/year/branding.js | 21 +++++++++++++++++++ .../prototype/yearMonthFromFields/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/abs/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/add/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/blank/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/days/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/hours/branding.js | 21 +++++++++++++++++++ .../prototype/microseconds/branding.js | 21 +++++++++++++++++++ .../prototype/milliseconds/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/minutes/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/months/branding.js | 21 +++++++++++++++++++ .../prototype/nanoseconds/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/negated/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/round/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/seconds/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/sign/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/subtract/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/toJSON/branding.js | 21 +++++++++++++++++++ .../prototype/toLocaleString/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/toString/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/total/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/valueOf/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/weeks/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/with/branding.js | 21 +++++++++++++++++++ .../Duration/prototype/years/branding.js | 21 +++++++++++++++++++ .../Instant/prototype/add/branding.js | 21 +++++++++++++++++++ .../prototype/epochMicroseconds/branding.js | 21 +++++++++++++++++++ .../prototype/epochMilliseconds/branding.js | 21 +++++++++++++++++++ .../prototype/epochNanoseconds/branding.js | 21 +++++++++++++++++++ .../prototype/epochSeconds/branding.js | 21 +++++++++++++++++++ .../Instant/prototype/equals/branding.js | 21 +++++++++++++++++++ .../Instant/prototype/round/branding.js | 21 +++++++++++++++++++ .../Instant/prototype/since/branding.js | 21 +++++++++++++++++++ .../Instant/prototype/subtract/branding.js | 21 +++++++++++++++++++ .../Instant/prototype/toJSON/branding.js | 21 +++++++++++++++++++ .../prototype/toLocaleString/branding.js | 21 +++++++++++++++++++ .../Instant/prototype/toString/branding.js | 21 +++++++++++++++++++ .../prototype/toZonedDateTime/branding.js | 21 +++++++++++++++++++ .../prototype/toZonedDateTimeISO/branding.js | 21 +++++++++++++++++++ .../Instant/prototype/until/branding.js | 21 +++++++++++++++++++ .../Instant/prototype/valueOf/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/add/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/calendar/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/day/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/dayOfWeek/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/dayOfYear/branding.js | 21 +++++++++++++++++++ .../prototype/daysInMonth/branding.js | 21 +++++++++++++++++++ .../prototype/daysInWeek/branding.js | 21 +++++++++++++++++++ .../prototype/daysInYear/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/equals/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/era/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/eraYear/branding.js | 21 +++++++++++++++++++ .../prototype/getISOFields/branding.js | 21 +++++++++++++++++++ .../prototype/inLeapYear/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/month/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/monthCode/branding.js | 21 +++++++++++++++++++ .../prototype/monthsInYear/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/since/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/subtract/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/toJSON/branding.js | 21 +++++++++++++++++++ .../prototype/toLocaleString/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainDateTime/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainMonthDay/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainYearMonth/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/toString/branding.js | 21 +++++++++++++++++++ .../prototype/toZonedDateTime/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/until/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/valueOf/branding.js | 21 +++++++++++++++++++ .../prototype/weekOfYear/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/with/branding.js | 21 +++++++++++++++++++ .../prototype/withCalendar/branding.js | 21 +++++++++++++++++++ .../PlainDate/prototype/year/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/add/branding.js | 21 +++++++++++++++++++ .../prototype/calendar/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/day/branding.js | 21 +++++++++++++++++++ .../prototype/dayOfWeek/branding.js | 21 +++++++++++++++++++ .../prototype/dayOfYear/branding.js | 21 +++++++++++++++++++ .../prototype/daysInMonth/branding.js | 21 +++++++++++++++++++ .../prototype/daysInWeek/branding.js | 21 +++++++++++++++++++ .../prototype/daysInYear/branding.js | 21 +++++++++++++++++++ .../prototype/equals/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/era/branding.js | 21 +++++++++++++++++++ .../prototype/eraYear/branding.js | 21 +++++++++++++++++++ .../prototype/getISOFields/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/hour/branding.js | 21 +++++++++++++++++++ .../prototype/inLeapYear/branding.js | 21 +++++++++++++++++++ .../prototype/microsecond/branding.js | 21 +++++++++++++++++++ .../prototype/millisecond/branding.js | 21 +++++++++++++++++++ .../prototype/minute/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/month/branding.js | 21 +++++++++++++++++++ .../prototype/monthCode/branding.js | 21 +++++++++++++++++++ .../prototype/monthsInYear/branding.js | 21 +++++++++++++++++++ .../prototype/nanosecond/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/round/branding.js | 21 +++++++++++++++++++ .../prototype/second/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/since/branding.js | 21 +++++++++++++++++++ .../prototype/subtract/branding.js | 21 +++++++++++++++++++ .../prototype/toJSON/branding.js | 21 +++++++++++++++++++ .../prototype/toLocaleString/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainDate/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainMonthDay/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainTime/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainYearMonth/branding.js | 21 +++++++++++++++++++ .../prototype/toString/branding.js | 21 +++++++++++++++++++ .../prototype/toZonedDateTime/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/until/branding.js | 21 +++++++++++++++++++ .../prototype/valueOf/branding.js | 21 +++++++++++++++++++ .../prototype/weekOfYear/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/with/branding.js | 21 +++++++++++++++++++ .../prototype/withCalendar/branding.js | 21 +++++++++++++++++++ .../prototype/withPlainDate/branding.js | 21 +++++++++++++++++++ .../prototype/withPlainTime/branding.js | 21 +++++++++++++++++++ .../PlainDateTime/prototype/year/branding.js | 21 +++++++++++++++++++ .../prototype/calendar/branding.js | 21 +++++++++++++++++++ .../PlainMonthDay/prototype/day/branding.js | 21 +++++++++++++++++++ .../prototype/equals/branding.js | 21 +++++++++++++++++++ .../prototype/getISOFields/branding.js | 21 +++++++++++++++++++ .../prototype/monthCode/branding.js | 21 +++++++++++++++++++ .../prototype/toJSON/branding.js | 21 +++++++++++++++++++ .../prototype/toLocaleString/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainDate/branding.js | 21 +++++++++++++++++++ .../prototype/toString/branding.js | 21 +++++++++++++++++++ .../prototype/valueOf/branding.js | 21 +++++++++++++++++++ .../PlainMonthDay/prototype/with/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/add/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/calendar/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/equals/branding.js | 21 +++++++++++++++++++ .../prototype/getISOFields/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/hour/branding.js | 21 +++++++++++++++++++ .../prototype/microsecond/branding.js | 21 +++++++++++++++++++ .../prototype/millisecond/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/minute/branding.js | 21 +++++++++++++++++++ .../prototype/nanosecond/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/round/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/second/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/since/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/subtract/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/toJSON/branding.js | 21 +++++++++++++++++++ .../prototype/toLocaleString/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainDateTime/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/toString/branding.js | 21 +++++++++++++++++++ .../prototype/toZonedDateTime/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/until/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/valueOf/branding.js | 21 +++++++++++++++++++ .../PlainTime/prototype/with/branding.js | 21 +++++++++++++++++++ .../PlainYearMonth/prototype/add/branding.js | 21 +++++++++++++++++++ .../prototype/calendar/branding.js | 21 +++++++++++++++++++ .../prototype/daysInMonth/branding.js | 21 +++++++++++++++++++ .../prototype/daysInYear/branding.js | 21 +++++++++++++++++++ .../prototype/equals/branding.js | 21 +++++++++++++++++++ .../PlainYearMonth/prototype/era/branding.js | 21 +++++++++++++++++++ .../prototype/eraYear/branding.js | 21 +++++++++++++++++++ .../prototype/getISOFields/branding.js | 21 +++++++++++++++++++ .../prototype/inLeapYear/branding.js | 21 +++++++++++++++++++ .../prototype/month/branding.js | 21 +++++++++++++++++++ .../prototype/monthCode/branding.js | 21 +++++++++++++++++++ .../prototype/monthsInYear/branding.js | 21 +++++++++++++++++++ .../prototype/since/branding.js | 21 +++++++++++++++++++ .../prototype/subtract/branding.js | 21 +++++++++++++++++++ .../prototype/toJSON/branding.js | 21 +++++++++++++++++++ .../prototype/toLocaleString/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainDate/branding.js | 21 +++++++++++++++++++ .../prototype/toString/branding.js | 21 +++++++++++++++++++ .../prototype/until/branding.js | 21 +++++++++++++++++++ .../prototype/valueOf/branding.js | 21 +++++++++++++++++++ .../PlainYearMonth/prototype/with/branding.js | 21 +++++++++++++++++++ .../PlainYearMonth/prototype/year/branding.js | 21 +++++++++++++++++++ .../prototype/getInstantFor/branding.js | 21 +++++++++++++++++++ .../prototype/getNextTransition/branding.js | 21 +++++++++++++++++++ .../getOffsetNanosecondsFor/branding.js | 21 +++++++++++++++++++ .../prototype/getOffsetStringFor/branding.js | 21 +++++++++++++++++++ .../getPossibleInstantsFor/branding.js | 21 +++++++++++++++++++ .../getPreviousTransition/branding.js | 21 +++++++++++++++++++ .../TimeZone/prototype/toString/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/add/branding.js | 21 +++++++++++++++++++ .../prototype/calendar/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/day/branding.js | 21 +++++++++++++++++++ .../prototype/dayOfWeek/branding.js | 21 +++++++++++++++++++ .../prototype/dayOfYear/branding.js | 21 +++++++++++++++++++ .../prototype/daysInMonth/branding.js | 21 +++++++++++++++++++ .../prototype/daysInWeek/branding.js | 21 +++++++++++++++++++ .../prototype/daysInYear/branding.js | 21 +++++++++++++++++++ .../prototype/epochMicroseconds/branding.js | 21 +++++++++++++++++++ .../prototype/epochMilliseconds/branding.js | 21 +++++++++++++++++++ .../prototype/epochNanoseconds/branding.js | 21 +++++++++++++++++++ .../prototype/epochSeconds/branding.js | 21 +++++++++++++++++++ .../prototype/equals/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/era/branding.js | 21 +++++++++++++++++++ .../prototype/eraYear/branding.js | 21 +++++++++++++++++++ .../prototype/getISOFields/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/hour/branding.js | 21 +++++++++++++++++++ .../prototype/hoursInDay/branding.js | 21 +++++++++++++++++++ .../prototype/inLeapYear/branding.js | 21 +++++++++++++++++++ .../prototype/microsecond/branding.js | 21 +++++++++++++++++++ .../prototype/millisecond/branding.js | 21 +++++++++++++++++++ .../prototype/minute/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/month/branding.js | 21 +++++++++++++++++++ .../prototype/monthCode/branding.js | 21 +++++++++++++++++++ .../prototype/monthsInYear/branding.js | 21 +++++++++++++++++++ .../prototype/nanosecond/branding.js | 21 +++++++++++++++++++ .../prototype/offset/branding.js | 21 +++++++++++++++++++ .../prototype/offsetNanoseconds/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/round/branding.js | 21 +++++++++++++++++++ .../prototype/second/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/since/branding.js | 21 +++++++++++++++++++ .../prototype/startOfDay/branding.js | 21 +++++++++++++++++++ .../prototype/subtract/branding.js | 21 +++++++++++++++++++ .../prototype/timeZone/branding.js | 21 +++++++++++++++++++ .../prototype/toInstant/branding.js | 21 +++++++++++++++++++ .../prototype/toJSON/branding.js | 21 +++++++++++++++++++ .../prototype/toLocaleString/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainDate/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainDateTime/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainMonthDay/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainTime/branding.js | 21 +++++++++++++++++++ .../prototype/toPlainYearMonth/branding.js | 21 +++++++++++++++++++ .../prototype/toString/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/until/branding.js | 21 +++++++++++++++++++ .../prototype/valueOf/branding.js | 21 +++++++++++++++++++ .../prototype/weekOfYear/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/with/branding.js | 21 +++++++++++++++++++ .../prototype/withCalendar/branding.js | 21 +++++++++++++++++++ .../prototype/withPlainDate/branding.js | 21 +++++++++++++++++++ .../prototype/withPlainTime/branding.js | 21 +++++++++++++++++++ .../prototype/withTimeZone/branding.js | 21 +++++++++++++++++++ .../ZonedDateTime/prototype/year/branding.js | 21 +++++++++++++++++++ 246 files changed, 5166 insertions(+) create mode 100644 test/built-ins/Temporal/Calendar/prototype/dateAdd/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/dateFromFields/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/dateUntil/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/day/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/dayOfWeek/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/dayOfYear/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/daysInMonth/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/daysInWeek/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/daysInYear/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/era/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/eraYear/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/fields/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/inLeapYear/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/mergeFields/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/month/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/monthCode/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/monthDayFromFields/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/monthsInYear/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/weekOfYear/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/year/branding.js create mode 100644 test/built-ins/Temporal/Calendar/prototype/yearMonthFromFields/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/abs/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/add/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/blank/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/days/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/hours/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/microseconds/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/milliseconds/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/minutes/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/months/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/nanoseconds/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/negated/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/round/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/seconds/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/sign/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/subtract/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/toJSON/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/toLocaleString/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/total/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/valueOf/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/weeks/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/with/branding.js create mode 100644 test/built-ins/Temporal/Duration/prototype/years/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/add/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/epochMicroseconds/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/epochMilliseconds/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/epochNanoseconds/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/epochSeconds/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/equals/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/round/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/since/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/subtract/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/toJSON/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/toLocaleString/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/toZonedDateTime/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/toZonedDateTimeISO/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/until/branding.js create mode 100644 test/built-ins/Temporal/Instant/prototype/valueOf/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/add/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/calendar/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/day/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/dayOfWeek/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/dayOfYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/daysInMonth/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/daysInWeek/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/daysInYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/equals/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/era/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/eraYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/getISOFields/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/inLeapYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/month/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/monthCode/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/monthsInYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/since/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/subtract/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/toJSON/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/toLocaleString/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/toPlainDateTime/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/toPlainMonthDay/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/until/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/valueOf/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/weekOfYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/with/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/withCalendar/branding.js create mode 100644 test/built-ins/Temporal/PlainDate/prototype/year/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/add/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/calendar/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/day/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/dayOfWeek/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/dayOfYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/daysInMonth/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/daysInWeek/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/daysInYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/equals/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/era/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/eraYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/getISOFields/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/hour/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/inLeapYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/microsecond/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/millisecond/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/minute/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/month/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/monthCode/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/monthsInYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/nanosecond/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/round/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/second/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/since/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/subtract/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/toJSON/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/toLocaleString/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/toPlainDate/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/toPlainMonthDay/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/toPlainTime/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/toPlainYearMonth/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/toZonedDateTime/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/until/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/valueOf/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/weekOfYear/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/with/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/withCalendar/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/withPlainTime/branding.js create mode 100644 test/built-ins/Temporal/PlainDateTime/prototype/year/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/calendar/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/day/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/equals/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/getISOFields/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/monthCode/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/toJSON/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/toLocaleString/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/valueOf/branding.js create mode 100644 test/built-ins/Temporal/PlainMonthDay/prototype/with/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/add/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/calendar/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/equals/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/getISOFields/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/hour/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/microsecond/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/millisecond/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/minute/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/nanosecond/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/round/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/second/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/since/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/subtract/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/toJSON/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/toLocaleString/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/until/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/valueOf/branding.js create mode 100644 test/built-ins/Temporal/PlainTime/prototype/with/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/add/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/calendar/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/daysInMonth/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/daysInYear/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/equals/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/era/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/eraYear/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/getISOFields/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/inLeapYear/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/month/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/monthCode/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/monthsInYear/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/since/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/subtract/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/toJSON/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/until/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/valueOf/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/with/branding.js create mode 100644 test/built-ins/Temporal/PlainYearMonth/prototype/year/branding.js create mode 100644 test/built-ins/Temporal/TimeZone/prototype/getInstantFor/branding.js create mode 100644 test/built-ins/Temporal/TimeZone/prototype/getNextTransition/branding.js create mode 100644 test/built-ins/Temporal/TimeZone/prototype/getOffsetNanosecondsFor/branding.js create mode 100644 test/built-ins/Temporal/TimeZone/prototype/getOffsetStringFor/branding.js create mode 100644 test/built-ins/Temporal/TimeZone/prototype/getPossibleInstantsFor/branding.js create mode 100644 test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/branding.js create mode 100644 test/built-ins/Temporal/TimeZone/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/add/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/calendar/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/day/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/dayOfWeek/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/dayOfYear/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/daysInMonth/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/daysInWeek/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/daysInYear/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/epochMicroseconds/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/epochMilliseconds/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/epochNanoseconds/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/epochSeconds/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/equals/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/era/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/eraYear/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/getISOFields/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/hour/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/hoursInDay/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/inLeapYear/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/microsecond/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/millisecond/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/minute/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/month/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/monthCode/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/monthsInYear/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/nanosecond/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/offset/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/offsetNanoseconds/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/round/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/second/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/since/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/startOfDay/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/subtract/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/timeZone/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/toInstant/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/toJSON/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/toLocaleString/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/toPlainDate/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/toPlainDateTime/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/toPlainMonthDay/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/toPlainTime/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/toPlainYearMonth/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/toString/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/until/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/valueOf/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/weekOfYear/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/with/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/withCalendar/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/withPlainTime/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/withTimeZone/branding.js create mode 100644 test/built-ins/Temporal/ZonedDateTime/prototype/year/branding.js diff --git a/test/built-ins/Temporal/Calendar/prototype/dateAdd/branding.js b/test/built-ins/Temporal/Calendar/prototype/dateAdd/branding.js new file mode 100644 index 00000000000..f66e31227a9 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/dateAdd/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.dateadd +features: [Symbol, Temporal] +---*/ + +const dateAdd = Temporal.Calendar.prototype.dateAdd; + +assert.sameValue(typeof dateAdd, "function"); + +assert.throws(TypeError, () => dateAdd.call(undefined), "undefined"); +assert.throws(TypeError, () => dateAdd.call(null), "null"); +assert.throws(TypeError, () => dateAdd.call(true), "true"); +assert.throws(TypeError, () => dateAdd.call(""), "empty string"); +assert.throws(TypeError, () => dateAdd.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dateAdd.call(1), "1"); +assert.throws(TypeError, () => dateAdd.call({}), "plain object"); +assert.throws(TypeError, () => dateAdd.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => dateAdd.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/dateFromFields/branding.js b/test/built-ins/Temporal/Calendar/prototype/dateFromFields/branding.js new file mode 100644 index 00000000000..fd993c82bbc --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/dateFromFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.datefromfields +features: [Symbol, Temporal] +---*/ + +const dateFromFields = Temporal.Calendar.prototype.dateFromFields; + +assert.sameValue(typeof dateFromFields, "function"); + +assert.throws(TypeError, () => dateFromFields.call(undefined), "undefined"); +assert.throws(TypeError, () => dateFromFields.call(null), "null"); +assert.throws(TypeError, () => dateFromFields.call(true), "true"); +assert.throws(TypeError, () => dateFromFields.call(""), "empty string"); +assert.throws(TypeError, () => dateFromFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dateFromFields.call(1), "1"); +assert.throws(TypeError, () => dateFromFields.call({}), "plain object"); +assert.throws(TypeError, () => dateFromFields.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => dateFromFields.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/dateUntil/branding.js b/test/built-ins/Temporal/Calendar/prototype/dateUntil/branding.js new file mode 100644 index 00000000000..7353e8f157d --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/dateUntil/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.dateuntil +features: [Symbol, Temporal] +---*/ + +const dateUntil = Temporal.Calendar.prototype.dateUntil; + +assert.sameValue(typeof dateUntil, "function"); + +assert.throws(TypeError, () => dateUntil.call(undefined), "undefined"); +assert.throws(TypeError, () => dateUntil.call(null), "null"); +assert.throws(TypeError, () => dateUntil.call(true), "true"); +assert.throws(TypeError, () => dateUntil.call(""), "empty string"); +assert.throws(TypeError, () => dateUntil.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dateUntil.call(1), "1"); +assert.throws(TypeError, () => dateUntil.call({}), "plain object"); +assert.throws(TypeError, () => dateUntil.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => dateUntil.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/day/branding.js b/test/built-ins/Temporal/Calendar/prototype/day/branding.js new file mode 100644 index 00000000000..bfd245d5772 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/day/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.day +features: [Symbol, Temporal] +---*/ + +const day = Temporal.Calendar.prototype.day; + +assert.sameValue(typeof day, "function"); + +assert.throws(TypeError, () => day.call(undefined), "undefined"); +assert.throws(TypeError, () => day.call(null), "null"); +assert.throws(TypeError, () => day.call(true), "true"); +assert.throws(TypeError, () => day.call(""), "empty string"); +assert.throws(TypeError, () => day.call(Symbol()), "symbol"); +assert.throws(TypeError, () => day.call(1), "1"); +assert.throws(TypeError, () => day.call({}), "plain object"); +assert.throws(TypeError, () => day.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => day.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/branding.js b/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/branding.js new file mode 100644 index 00000000000..69082d1712c --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.dayofweek +features: [Symbol, Temporal] +---*/ + +const dayOfWeek = Temporal.Calendar.prototype.dayOfWeek; + +assert.sameValue(typeof dayOfWeek, "function"); + +assert.throws(TypeError, () => dayOfWeek.call(undefined), "undefined"); +assert.throws(TypeError, () => dayOfWeek.call(null), "null"); +assert.throws(TypeError, () => dayOfWeek.call(true), "true"); +assert.throws(TypeError, () => dayOfWeek.call(""), "empty string"); +assert.throws(TypeError, () => dayOfWeek.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dayOfWeek.call(1), "1"); +assert.throws(TypeError, () => dayOfWeek.call({}), "plain object"); +assert.throws(TypeError, () => dayOfWeek.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => dayOfWeek.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/dayOfYear/branding.js b/test/built-ins/Temporal/Calendar/prototype/dayOfYear/branding.js new file mode 100644 index 00000000000..65d5250385a --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/dayOfYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.dayofyear +features: [Symbol, Temporal] +---*/ + +const dayOfYear = Temporal.Calendar.prototype.dayOfYear; + +assert.sameValue(typeof dayOfYear, "function"); + +assert.throws(TypeError, () => dayOfYear.call(undefined), "undefined"); +assert.throws(TypeError, () => dayOfYear.call(null), "null"); +assert.throws(TypeError, () => dayOfYear.call(true), "true"); +assert.throws(TypeError, () => dayOfYear.call(""), "empty string"); +assert.throws(TypeError, () => dayOfYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dayOfYear.call(1), "1"); +assert.throws(TypeError, () => dayOfYear.call({}), "plain object"); +assert.throws(TypeError, () => dayOfYear.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => dayOfYear.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInMonth/branding.js b/test/built-ins/Temporal/Calendar/prototype/daysInMonth/branding.js new file mode 100644 index 00000000000..03ec10729c5 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/daysInMonth/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.daysinmonth +features: [Symbol, Temporal] +---*/ + +const daysInMonth = Temporal.Calendar.prototype.daysInMonth; + +assert.sameValue(typeof daysInMonth, "function"); + +assert.throws(TypeError, () => daysInMonth.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInMonth.call(null), "null"); +assert.throws(TypeError, () => daysInMonth.call(true), "true"); +assert.throws(TypeError, () => daysInMonth.call(""), "empty string"); +assert.throws(TypeError, () => daysInMonth.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInMonth.call(1), "1"); +assert.throws(TypeError, () => daysInMonth.call({}), "plain object"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInWeek/branding.js b/test/built-ins/Temporal/Calendar/prototype/daysInWeek/branding.js new file mode 100644 index 00000000000..92efadb03b7 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/daysInWeek/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.daysinweek +features: [Symbol, Temporal] +---*/ + +const daysInWeek = Temporal.Calendar.prototype.daysInWeek; + +assert.sameValue(typeof daysInWeek, "function"); + +assert.throws(TypeError, () => daysInWeek.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInWeek.call(null), "null"); +assert.throws(TypeError, () => daysInWeek.call(true), "true"); +assert.throws(TypeError, () => daysInWeek.call(""), "empty string"); +assert.throws(TypeError, () => daysInWeek.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInWeek.call(1), "1"); +assert.throws(TypeError, () => daysInWeek.call({}), "plain object"); +assert.throws(TypeError, () => daysInWeek.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => daysInWeek.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInYear/branding.js b/test/built-ins/Temporal/Calendar/prototype/daysInYear/branding.js new file mode 100644 index 00000000000..c597014d4b6 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/daysInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.daysinyear +features: [Symbol, Temporal] +---*/ + +const daysInYear = Temporal.Calendar.prototype.daysInYear; + +assert.sameValue(typeof daysInYear, "function"); + +assert.throws(TypeError, () => daysInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInYear.call(null), "null"); +assert.throws(TypeError, () => daysInYear.call(true), "true"); +assert.throws(TypeError, () => daysInYear.call(""), "empty string"); +assert.throws(TypeError, () => daysInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInYear.call(1), "1"); +assert.throws(TypeError, () => daysInYear.call({}), "plain object"); +assert.throws(TypeError, () => daysInYear.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => daysInYear.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/era/branding.js b/test/built-ins/Temporal/Calendar/prototype/era/branding.js new file mode 100644 index 00000000000..c9397fa60a9 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/era/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.era +features: [Symbol, Temporal] +---*/ + +const era = Temporal.Calendar.prototype.era; + +assert.sameValue(typeof era, "function"); + +assert.throws(TypeError, () => era.call(undefined), "undefined"); +assert.throws(TypeError, () => era.call(null), "null"); +assert.throws(TypeError, () => era.call(true), "true"); +assert.throws(TypeError, () => era.call(""), "empty string"); +assert.throws(TypeError, () => era.call(Symbol()), "symbol"); +assert.throws(TypeError, () => era.call(1), "1"); +assert.throws(TypeError, () => era.call({}), "plain object"); +assert.throws(TypeError, () => era.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => era.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/eraYear/branding.js b/test/built-ins/Temporal/Calendar/prototype/eraYear/branding.js new file mode 100644 index 00000000000..b7c26e85ad3 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/eraYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.erayear +features: [Symbol, Temporal] +---*/ + +const eraYear = Temporal.Calendar.prototype.eraYear; + +assert.sameValue(typeof eraYear, "function"); + +assert.throws(TypeError, () => eraYear.call(undefined), "undefined"); +assert.throws(TypeError, () => eraYear.call(null), "null"); +assert.throws(TypeError, () => eraYear.call(true), "true"); +assert.throws(TypeError, () => eraYear.call(""), "empty string"); +assert.throws(TypeError, () => eraYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => eraYear.call(1), "1"); +assert.throws(TypeError, () => eraYear.call({}), "plain object"); +assert.throws(TypeError, () => eraYear.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => eraYear.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/fields/branding.js b/test/built-ins/Temporal/Calendar/prototype/fields/branding.js new file mode 100644 index 00000000000..7d09217caee --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/fields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.fields +features: [Symbol, Temporal] +---*/ + +const fields = Temporal.Calendar.prototype.fields; + +assert.sameValue(typeof fields, "function"); + +assert.throws(TypeError, () => fields.call(undefined), "undefined"); +assert.throws(TypeError, () => fields.call(null), "null"); +assert.throws(TypeError, () => fields.call(true), "true"); +assert.throws(TypeError, () => fields.call(""), "empty string"); +assert.throws(TypeError, () => fields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => fields.call(1), "1"); +assert.throws(TypeError, () => fields.call({}), "plain object"); +assert.throws(TypeError, () => fields.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => fields.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/inLeapYear/branding.js b/test/built-ins/Temporal/Calendar/prototype/inLeapYear/branding.js new file mode 100644 index 00000000000..b83ddd7d5df --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/inLeapYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.inleapyear +features: [Symbol, Temporal] +---*/ + +const inLeapYear = Temporal.Calendar.prototype.inLeapYear; + +assert.sameValue(typeof inLeapYear, "function"); + +assert.throws(TypeError, () => inLeapYear.call(undefined), "undefined"); +assert.throws(TypeError, () => inLeapYear.call(null), "null"); +assert.throws(TypeError, () => inLeapYear.call(true), "true"); +assert.throws(TypeError, () => inLeapYear.call(""), "empty string"); +assert.throws(TypeError, () => inLeapYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => inLeapYear.call(1), "1"); +assert.throws(TypeError, () => inLeapYear.call({}), "plain object"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/mergeFields/branding.js b/test/built-ins/Temporal/Calendar/prototype/mergeFields/branding.js new file mode 100644 index 00000000000..d741f21780d --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/mergeFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.mergefields +features: [Symbol, Temporal] +---*/ + +const mergeFields = Temporal.Calendar.prototype.mergeFields; + +assert.sameValue(typeof mergeFields, "function"); + +assert.throws(TypeError, () => mergeFields.call(undefined), "undefined"); +assert.throws(TypeError, () => mergeFields.call(null), "null"); +assert.throws(TypeError, () => mergeFields.call(true), "true"); +assert.throws(TypeError, () => mergeFields.call(""), "empty string"); +assert.throws(TypeError, () => mergeFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => mergeFields.call(1), "1"); +assert.throws(TypeError, () => mergeFields.call({}), "plain object"); +assert.throws(TypeError, () => mergeFields.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => mergeFields.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/month/branding.js b/test/built-ins/Temporal/Calendar/prototype/month/branding.js new file mode 100644 index 00000000000..df872a665f3 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/month/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.month +features: [Symbol, Temporal] +---*/ + +const month = Temporal.Calendar.prototype.month; + +assert.sameValue(typeof month, "function"); + +assert.throws(TypeError, () => month.call(undefined), "undefined"); +assert.throws(TypeError, () => month.call(null), "null"); +assert.throws(TypeError, () => month.call(true), "true"); +assert.throws(TypeError, () => month.call(""), "empty string"); +assert.throws(TypeError, () => month.call(Symbol()), "symbol"); +assert.throws(TypeError, () => month.call(1), "1"); +assert.throws(TypeError, () => month.call({}), "plain object"); +assert.throws(TypeError, () => month.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => month.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/monthCode/branding.js b/test/built-ins/Temporal/Calendar/prototype/monthCode/branding.js new file mode 100644 index 00000000000..654a98589ec --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/monthCode/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.monthcode +features: [Symbol, Temporal] +---*/ + +const monthCode = Temporal.Calendar.prototype.monthCode; + +assert.sameValue(typeof monthCode, "function"); + +assert.throws(TypeError, () => monthCode.call(undefined), "undefined"); +assert.throws(TypeError, () => monthCode.call(null), "null"); +assert.throws(TypeError, () => monthCode.call(true), "true"); +assert.throws(TypeError, () => monthCode.call(""), "empty string"); +assert.throws(TypeError, () => monthCode.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthCode.call(1), "1"); +assert.throws(TypeError, () => monthCode.call({}), "plain object"); +assert.throws(TypeError, () => monthCode.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => monthCode.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/monthDayFromFields/branding.js b/test/built-ins/Temporal/Calendar/prototype/monthDayFromFields/branding.js new file mode 100644 index 00000000000..c27aa35f914 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/monthDayFromFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.monthdayfromfields +features: [Symbol, Temporal] +---*/ + +const monthDayFromFields = Temporal.Calendar.prototype.monthDayFromFields; + +assert.sameValue(typeof monthDayFromFields, "function"); + +assert.throws(TypeError, () => monthDayFromFields.call(undefined), "undefined"); +assert.throws(TypeError, () => monthDayFromFields.call(null), "null"); +assert.throws(TypeError, () => monthDayFromFields.call(true), "true"); +assert.throws(TypeError, () => monthDayFromFields.call(""), "empty string"); +assert.throws(TypeError, () => monthDayFromFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthDayFromFields.call(1), "1"); +assert.throws(TypeError, () => monthDayFromFields.call({}), "plain object"); +assert.throws(TypeError, () => monthDayFromFields.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => monthDayFromFields.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/monthsInYear/branding.js b/test/built-ins/Temporal/Calendar/prototype/monthsInYear/branding.js new file mode 100644 index 00000000000..bfc5ad0797c --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/monthsInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.monthsinyear +features: [Symbol, Temporal] +---*/ + +const monthsInYear = Temporal.Calendar.prototype.monthsInYear; + +assert.sameValue(typeof monthsInYear, "function"); + +assert.throws(TypeError, () => monthsInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => monthsInYear.call(null), "null"); +assert.throws(TypeError, () => monthsInYear.call(true), "true"); +assert.throws(TypeError, () => monthsInYear.call(""), "empty string"); +assert.throws(TypeError, () => monthsInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthsInYear.call(1), "1"); +assert.throws(TypeError, () => monthsInYear.call({}), "plain object"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/toString/branding.js b/test/built-ins/Temporal/Calendar/prototype/toString/branding.js new file mode 100644 index 00000000000..698d549057b --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.Calendar.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => toString.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/weekOfYear/branding.js b/test/built-ins/Temporal/Calendar/prototype/weekOfYear/branding.js new file mode 100644 index 00000000000..05c33ce0c59 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/weekOfYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.weekofyear +features: [Symbol, Temporal] +---*/ + +const weekOfYear = Temporal.Calendar.prototype.weekOfYear; + +assert.sameValue(typeof weekOfYear, "function"); + +assert.throws(TypeError, () => weekOfYear.call(undefined), "undefined"); +assert.throws(TypeError, () => weekOfYear.call(null), "null"); +assert.throws(TypeError, () => weekOfYear.call(true), "true"); +assert.throws(TypeError, () => weekOfYear.call(""), "empty string"); +assert.throws(TypeError, () => weekOfYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => weekOfYear.call(1), "1"); +assert.throws(TypeError, () => weekOfYear.call({}), "plain object"); +assert.throws(TypeError, () => weekOfYear.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => weekOfYear.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/year/branding.js b/test/built-ins/Temporal/Calendar/prototype/year/branding.js new file mode 100644 index 00000000000..3f9b3654f78 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/year/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.year +features: [Symbol, Temporal] +---*/ + +const year = Temporal.Calendar.prototype.year; + +assert.sameValue(typeof year, "function"); + +assert.throws(TypeError, () => year.call(undefined), "undefined"); +assert.throws(TypeError, () => year.call(null), "null"); +assert.throws(TypeError, () => year.call(true), "true"); +assert.throws(TypeError, () => year.call(""), "empty string"); +assert.throws(TypeError, () => year.call(Symbol()), "symbol"); +assert.throws(TypeError, () => year.call(1), "1"); +assert.throws(TypeError, () => year.call({}), "plain object"); +assert.throws(TypeError, () => year.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => year.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Calendar/prototype/yearMonthFromFields/branding.js b/test/built-ins/Temporal/Calendar/prototype/yearMonthFromFields/branding.js new file mode 100644 index 00000000000..105a8e22016 --- /dev/null +++ b/test/built-ins/Temporal/Calendar/prototype/yearMonthFromFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.calendar.prototype.yearmonthfromfields +features: [Symbol, Temporal] +---*/ + +const yearMonthFromFields = Temporal.Calendar.prototype.yearMonthFromFields; + +assert.sameValue(typeof yearMonthFromFields, "function"); + +assert.throws(TypeError, () => yearMonthFromFields.call(undefined), "undefined"); +assert.throws(TypeError, () => yearMonthFromFields.call(null), "null"); +assert.throws(TypeError, () => yearMonthFromFields.call(true), "true"); +assert.throws(TypeError, () => yearMonthFromFields.call(""), "empty string"); +assert.throws(TypeError, () => yearMonthFromFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => yearMonthFromFields.call(1), "1"); +assert.throws(TypeError, () => yearMonthFromFields.call({}), "plain object"); +assert.throws(TypeError, () => yearMonthFromFields.call(Temporal.Calendar), "Temporal.Calendar"); +assert.throws(TypeError, () => yearMonthFromFields.call(Temporal.Calendar.prototype), "Temporal.Calendar.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/abs/branding.js b/test/built-ins/Temporal/Duration/prototype/abs/branding.js new file mode 100644 index 00000000000..3917590557b --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/abs/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.abs +features: [Symbol, Temporal] +---*/ + +const abs = Temporal.Duration.prototype.abs; + +assert.sameValue(typeof abs, "function"); + +assert.throws(TypeError, () => abs.call(undefined), "undefined"); +assert.throws(TypeError, () => abs.call(null), "null"); +assert.throws(TypeError, () => abs.call(true), "true"); +assert.throws(TypeError, () => abs.call(""), "empty string"); +assert.throws(TypeError, () => abs.call(Symbol()), "symbol"); +assert.throws(TypeError, () => abs.call(1), "1"); +assert.throws(TypeError, () => abs.call({}), "plain object"); +assert.throws(TypeError, () => abs.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => abs.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/add/branding.js b/test/built-ins/Temporal/Duration/prototype/add/branding.js new file mode 100644 index 00000000000..fe21396e452 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/add/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.add +features: [Symbol, Temporal] +---*/ + +const add = Temporal.Duration.prototype.add; + +assert.sameValue(typeof add, "function"); + +assert.throws(TypeError, () => add.call(undefined), "undefined"); +assert.throws(TypeError, () => add.call(null), "null"); +assert.throws(TypeError, () => add.call(true), "true"); +assert.throws(TypeError, () => add.call(""), "empty string"); +assert.throws(TypeError, () => add.call(Symbol()), "symbol"); +assert.throws(TypeError, () => add.call(1), "1"); +assert.throws(TypeError, () => add.call({}), "plain object"); +assert.throws(TypeError, () => add.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => add.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/blank/branding.js b/test/built-ins/Temporal/Duration/prototype/blank/branding.js new file mode 100644 index 00000000000..ece107c6dd1 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/blank/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.blank +features: [Symbol, Temporal] +---*/ + +const blank = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "blank").get; + +assert.sameValue(typeof blank, "function"); + +assert.throws(TypeError, () => blank.call(undefined), "undefined"); +assert.throws(TypeError, () => blank.call(null), "null"); +assert.throws(TypeError, () => blank.call(true), "true"); +assert.throws(TypeError, () => blank.call(""), "empty string"); +assert.throws(TypeError, () => blank.call(Symbol()), "symbol"); +assert.throws(TypeError, () => blank.call(1), "1"); +assert.throws(TypeError, () => blank.call({}), "plain object"); +assert.throws(TypeError, () => blank.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => blank.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/days/branding.js b/test/built-ins/Temporal/Duration/prototype/days/branding.js new file mode 100644 index 00000000000..bacd95160fa --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/days/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.days +features: [Symbol, Temporal] +---*/ + +const days = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "days").get; + +assert.sameValue(typeof days, "function"); + +assert.throws(TypeError, () => days.call(undefined), "undefined"); +assert.throws(TypeError, () => days.call(null), "null"); +assert.throws(TypeError, () => days.call(true), "true"); +assert.throws(TypeError, () => days.call(""), "empty string"); +assert.throws(TypeError, () => days.call(Symbol()), "symbol"); +assert.throws(TypeError, () => days.call(1), "1"); +assert.throws(TypeError, () => days.call({}), "plain object"); +assert.throws(TypeError, () => days.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => days.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/hours/branding.js b/test/built-ins/Temporal/Duration/prototype/hours/branding.js new file mode 100644 index 00000000000..7a356f9ca87 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/hours/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.hours +features: [Symbol, Temporal] +---*/ + +const hours = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "hours").get; + +assert.sameValue(typeof hours, "function"); + +assert.throws(TypeError, () => hours.call(undefined), "undefined"); +assert.throws(TypeError, () => hours.call(null), "null"); +assert.throws(TypeError, () => hours.call(true), "true"); +assert.throws(TypeError, () => hours.call(""), "empty string"); +assert.throws(TypeError, () => hours.call(Symbol()), "symbol"); +assert.throws(TypeError, () => hours.call(1), "1"); +assert.throws(TypeError, () => hours.call({}), "plain object"); +assert.throws(TypeError, () => hours.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => hours.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/microseconds/branding.js b/test/built-ins/Temporal/Duration/prototype/microseconds/branding.js new file mode 100644 index 00000000000..623cb4cef84 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/microseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.microseconds +features: [Symbol, Temporal] +---*/ + +const microseconds = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "microseconds").get; + +assert.sameValue(typeof microseconds, "function"); + +assert.throws(TypeError, () => microseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => microseconds.call(null), "null"); +assert.throws(TypeError, () => microseconds.call(true), "true"); +assert.throws(TypeError, () => microseconds.call(""), "empty string"); +assert.throws(TypeError, () => microseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => microseconds.call(1), "1"); +assert.throws(TypeError, () => microseconds.call({}), "plain object"); +assert.throws(TypeError, () => microseconds.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => microseconds.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/milliseconds/branding.js b/test/built-ins/Temporal/Duration/prototype/milliseconds/branding.js new file mode 100644 index 00000000000..4786f618b7d --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/milliseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.milliseconds +features: [Symbol, Temporal] +---*/ + +const milliseconds = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "milliseconds").get; + +assert.sameValue(typeof milliseconds, "function"); + +assert.throws(TypeError, () => milliseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => milliseconds.call(null), "null"); +assert.throws(TypeError, () => milliseconds.call(true), "true"); +assert.throws(TypeError, () => milliseconds.call(""), "empty string"); +assert.throws(TypeError, () => milliseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => milliseconds.call(1), "1"); +assert.throws(TypeError, () => milliseconds.call({}), "plain object"); +assert.throws(TypeError, () => milliseconds.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => milliseconds.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/minutes/branding.js b/test/built-ins/Temporal/Duration/prototype/minutes/branding.js new file mode 100644 index 00000000000..2a49747e654 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/minutes/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.minutes +features: [Symbol, Temporal] +---*/ + +const minutes = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "minutes").get; + +assert.sameValue(typeof minutes, "function"); + +assert.throws(TypeError, () => minutes.call(undefined), "undefined"); +assert.throws(TypeError, () => minutes.call(null), "null"); +assert.throws(TypeError, () => minutes.call(true), "true"); +assert.throws(TypeError, () => minutes.call(""), "empty string"); +assert.throws(TypeError, () => minutes.call(Symbol()), "symbol"); +assert.throws(TypeError, () => minutes.call(1), "1"); +assert.throws(TypeError, () => minutes.call({}), "plain object"); +assert.throws(TypeError, () => minutes.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => minutes.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/months/branding.js b/test/built-ins/Temporal/Duration/prototype/months/branding.js new file mode 100644 index 00000000000..56dea98af90 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/months/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.months +features: [Symbol, Temporal] +---*/ + +const months = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "months").get; + +assert.sameValue(typeof months, "function"); + +assert.throws(TypeError, () => months.call(undefined), "undefined"); +assert.throws(TypeError, () => months.call(null), "null"); +assert.throws(TypeError, () => months.call(true), "true"); +assert.throws(TypeError, () => months.call(""), "empty string"); +assert.throws(TypeError, () => months.call(Symbol()), "symbol"); +assert.throws(TypeError, () => months.call(1), "1"); +assert.throws(TypeError, () => months.call({}), "plain object"); +assert.throws(TypeError, () => months.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => months.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/nanoseconds/branding.js b/test/built-ins/Temporal/Duration/prototype/nanoseconds/branding.js new file mode 100644 index 00000000000..8968fa00112 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/nanoseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.nanoseconds +features: [Symbol, Temporal] +---*/ + +const nanoseconds = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "nanoseconds").get; + +assert.sameValue(typeof nanoseconds, "function"); + +assert.throws(TypeError, () => nanoseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => nanoseconds.call(null), "null"); +assert.throws(TypeError, () => nanoseconds.call(true), "true"); +assert.throws(TypeError, () => nanoseconds.call(""), "empty string"); +assert.throws(TypeError, () => nanoseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => nanoseconds.call(1), "1"); +assert.throws(TypeError, () => nanoseconds.call({}), "plain object"); +assert.throws(TypeError, () => nanoseconds.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => nanoseconds.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/negated/branding.js b/test/built-ins/Temporal/Duration/prototype/negated/branding.js new file mode 100644 index 00000000000..28080c3590a --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/negated/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.negated +features: [Symbol, Temporal] +---*/ + +const negated = Temporal.Duration.prototype.negated; + +assert.sameValue(typeof negated, "function"); + +assert.throws(TypeError, () => negated.call(undefined), "undefined"); +assert.throws(TypeError, () => negated.call(null), "null"); +assert.throws(TypeError, () => negated.call(true), "true"); +assert.throws(TypeError, () => negated.call(""), "empty string"); +assert.throws(TypeError, () => negated.call(Symbol()), "symbol"); +assert.throws(TypeError, () => negated.call(1), "1"); +assert.throws(TypeError, () => negated.call({}), "plain object"); +assert.throws(TypeError, () => negated.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => negated.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/round/branding.js b/test/built-ins/Temporal/Duration/prototype/round/branding.js new file mode 100644 index 00000000000..5e4386ce632 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/round/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.round +features: [Symbol, Temporal] +---*/ + +const round = Temporal.Duration.prototype.round; + +assert.sameValue(typeof round, "function"); + +assert.throws(TypeError, () => round.call(undefined), "undefined"); +assert.throws(TypeError, () => round.call(null), "null"); +assert.throws(TypeError, () => round.call(true), "true"); +assert.throws(TypeError, () => round.call(""), "empty string"); +assert.throws(TypeError, () => round.call(Symbol()), "symbol"); +assert.throws(TypeError, () => round.call(1), "1"); +assert.throws(TypeError, () => round.call({}), "plain object"); +assert.throws(TypeError, () => round.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => round.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/seconds/branding.js b/test/built-ins/Temporal/Duration/prototype/seconds/branding.js new file mode 100644 index 00000000000..51077e05fbc --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/seconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.seconds +features: [Symbol, Temporal] +---*/ + +const seconds = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "seconds").get; + +assert.sameValue(typeof seconds, "function"); + +assert.throws(TypeError, () => seconds.call(undefined), "undefined"); +assert.throws(TypeError, () => seconds.call(null), "null"); +assert.throws(TypeError, () => seconds.call(true), "true"); +assert.throws(TypeError, () => seconds.call(""), "empty string"); +assert.throws(TypeError, () => seconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => seconds.call(1), "1"); +assert.throws(TypeError, () => seconds.call({}), "plain object"); +assert.throws(TypeError, () => seconds.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => seconds.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/sign/branding.js b/test/built-ins/Temporal/Duration/prototype/sign/branding.js new file mode 100644 index 00000000000..d554766039f --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/sign/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.sign +features: [Symbol, Temporal] +---*/ + +const sign = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "sign").get; + +assert.sameValue(typeof sign, "function"); + +assert.throws(TypeError, () => sign.call(undefined), "undefined"); +assert.throws(TypeError, () => sign.call(null), "null"); +assert.throws(TypeError, () => sign.call(true), "true"); +assert.throws(TypeError, () => sign.call(""), "empty string"); +assert.throws(TypeError, () => sign.call(Symbol()), "symbol"); +assert.throws(TypeError, () => sign.call(1), "1"); +assert.throws(TypeError, () => sign.call({}), "plain object"); +assert.throws(TypeError, () => sign.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => sign.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/subtract/branding.js b/test/built-ins/Temporal/Duration/prototype/subtract/branding.js new file mode 100644 index 00000000000..3b6e509cc28 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/subtract/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.subtract +features: [Symbol, Temporal] +---*/ + +const subtract = Temporal.Duration.prototype.subtract; + +assert.sameValue(typeof subtract, "function"); + +assert.throws(TypeError, () => subtract.call(undefined), "undefined"); +assert.throws(TypeError, () => subtract.call(null), "null"); +assert.throws(TypeError, () => subtract.call(true), "true"); +assert.throws(TypeError, () => subtract.call(""), "empty string"); +assert.throws(TypeError, () => subtract.call(Symbol()), "symbol"); +assert.throws(TypeError, () => subtract.call(1), "1"); +assert.throws(TypeError, () => subtract.call({}), "plain object"); +assert.throws(TypeError, () => subtract.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => subtract.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/toJSON/branding.js b/test/built-ins/Temporal/Duration/prototype/toJSON/branding.js new file mode 100644 index 00000000000..45eb3854ee9 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/toJSON/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.tojson +features: [Symbol, Temporal] +---*/ + +const toJSON = Temporal.Duration.prototype.toJSON; + +assert.sameValue(typeof toJSON, "function"); + +assert.throws(TypeError, () => toJSON.call(undefined), "undefined"); +assert.throws(TypeError, () => toJSON.call(null), "null"); +assert.throws(TypeError, () => toJSON.call(true), "true"); +assert.throws(TypeError, () => toJSON.call(""), "empty string"); +assert.throws(TypeError, () => toJSON.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toJSON.call(1), "1"); +assert.throws(TypeError, () => toJSON.call({}), "plain object"); +assert.throws(TypeError, () => toJSON.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => toJSON.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/toLocaleString/branding.js b/test/built-ins/Temporal/Duration/prototype/toLocaleString/branding.js new file mode 100644 index 00000000000..4008d39ff5d --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/toLocaleString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.tolocalestring +features: [Symbol, Temporal] +---*/ + +const toLocaleString = Temporal.Duration.prototype.toLocaleString; + +assert.sameValue(typeof toLocaleString, "function"); + +assert.throws(TypeError, () => toLocaleString.call(undefined), "undefined"); +assert.throws(TypeError, () => toLocaleString.call(null), "null"); +assert.throws(TypeError, () => toLocaleString.call(true), "true"); +assert.throws(TypeError, () => toLocaleString.call(""), "empty string"); +assert.throws(TypeError, () => toLocaleString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toLocaleString.call(1), "1"); +assert.throws(TypeError, () => toLocaleString.call({}), "plain object"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/toString/branding.js b/test/built-ins/Temporal/Duration/prototype/toString/branding.js new file mode 100644 index 00000000000..82bf8f0ba69 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.Duration.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => toString.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/total/branding.js b/test/built-ins/Temporal/Duration/prototype/total/branding.js new file mode 100644 index 00000000000..a0260c1f23b --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/total/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.total +features: [Symbol, Temporal] +---*/ + +const total = Temporal.Duration.prototype.total; + +assert.sameValue(typeof total, "function"); + +assert.throws(TypeError, () => total.call(undefined), "undefined"); +assert.throws(TypeError, () => total.call(null), "null"); +assert.throws(TypeError, () => total.call(true), "true"); +assert.throws(TypeError, () => total.call(""), "empty string"); +assert.throws(TypeError, () => total.call(Symbol()), "symbol"); +assert.throws(TypeError, () => total.call(1), "1"); +assert.throws(TypeError, () => total.call({}), "plain object"); +assert.throws(TypeError, () => total.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => total.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/valueOf/branding.js b/test/built-ins/Temporal/Duration/prototype/valueOf/branding.js new file mode 100644 index 00000000000..10b0ce3fae3 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/valueOf/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.valueof +features: [Symbol, Temporal] +---*/ + +const valueOf = Temporal.Duration.prototype.valueOf; + +assert.sameValue(typeof valueOf, "function"); + +assert.throws(TypeError, () => valueOf.call(undefined), "undefined"); +assert.throws(TypeError, () => valueOf.call(null), "null"); +assert.throws(TypeError, () => valueOf.call(true), "true"); +assert.throws(TypeError, () => valueOf.call(""), "empty string"); +assert.throws(TypeError, () => valueOf.call(Symbol()), "symbol"); +assert.throws(TypeError, () => valueOf.call(1), "1"); +assert.throws(TypeError, () => valueOf.call({}), "plain object"); +assert.throws(TypeError, () => valueOf.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => valueOf.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/weeks/branding.js b/test/built-ins/Temporal/Duration/prototype/weeks/branding.js new file mode 100644 index 00000000000..3f0b236a34a --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/weeks/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.weeks +features: [Symbol, Temporal] +---*/ + +const weeks = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "weeks").get; + +assert.sameValue(typeof weeks, "function"); + +assert.throws(TypeError, () => weeks.call(undefined), "undefined"); +assert.throws(TypeError, () => weeks.call(null), "null"); +assert.throws(TypeError, () => weeks.call(true), "true"); +assert.throws(TypeError, () => weeks.call(""), "empty string"); +assert.throws(TypeError, () => weeks.call(Symbol()), "symbol"); +assert.throws(TypeError, () => weeks.call(1), "1"); +assert.throws(TypeError, () => weeks.call({}), "plain object"); +assert.throws(TypeError, () => weeks.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => weeks.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/with/branding.js b/test/built-ins/Temporal/Duration/prototype/with/branding.js new file mode 100644 index 00000000000..5f971c113bb --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/with/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.with +features: [Symbol, Temporal] +---*/ + +const with_ = Temporal.Duration.prototype.with; + +assert.sameValue(typeof with_, "function"); + +assert.throws(TypeError, () => with_.call(undefined), "undefined"); +assert.throws(TypeError, () => with_.call(null), "null"); +assert.throws(TypeError, () => with_.call(true), "true"); +assert.throws(TypeError, () => with_.call(""), "empty string"); +assert.throws(TypeError, () => with_.call(Symbol()), "symbol"); +assert.throws(TypeError, () => with_.call(1), "1"); +assert.throws(TypeError, () => with_.call({}), "plain object"); +assert.throws(TypeError, () => with_.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => with_.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Duration/prototype/years/branding.js b/test/built-ins/Temporal/Duration/prototype/years/branding.js new file mode 100644 index 00000000000..a4e1fa11372 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/years/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.duration.prototype.years +features: [Symbol, Temporal] +---*/ + +const years = Object.getOwnPropertyDescriptor(Temporal.Duration.prototype, "years").get; + +assert.sameValue(typeof years, "function"); + +assert.throws(TypeError, () => years.call(undefined), "undefined"); +assert.throws(TypeError, () => years.call(null), "null"); +assert.throws(TypeError, () => years.call(true), "true"); +assert.throws(TypeError, () => years.call(""), "empty string"); +assert.throws(TypeError, () => years.call(Symbol()), "symbol"); +assert.throws(TypeError, () => years.call(1), "1"); +assert.throws(TypeError, () => years.call({}), "plain object"); +assert.throws(TypeError, () => years.call(Temporal.Duration), "Temporal.Duration"); +assert.throws(TypeError, () => years.call(Temporal.Duration.prototype), "Temporal.Duration.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/add/branding.js b/test/built-ins/Temporal/Instant/prototype/add/branding.js new file mode 100644 index 00000000000..9e6801b4f2e --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/add/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.add +features: [Symbol, Temporal] +---*/ + +const add = Temporal.Instant.prototype.add; + +assert.sameValue(typeof add, "function"); + +assert.throws(TypeError, () => add.call(undefined), "undefined"); +assert.throws(TypeError, () => add.call(null), "null"); +assert.throws(TypeError, () => add.call(true), "true"); +assert.throws(TypeError, () => add.call(""), "empty string"); +assert.throws(TypeError, () => add.call(Symbol()), "symbol"); +assert.throws(TypeError, () => add.call(1), "1"); +assert.throws(TypeError, () => add.call({}), "plain object"); +assert.throws(TypeError, () => add.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => add.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/epochMicroseconds/branding.js b/test/built-ins/Temporal/Instant/prototype/epochMicroseconds/branding.js new file mode 100644 index 00000000000..0e8816b90b5 --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/epochMicroseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.instant.prototype.epochmicroseconds +features: [Symbol, Temporal] +---*/ + +const epochMicroseconds = Object.getOwnPropertyDescriptor(Temporal.Instant.prototype, "epochMicroseconds").get; + +assert.sameValue(typeof epochMicroseconds, "function"); + +assert.throws(TypeError, () => epochMicroseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => epochMicroseconds.call(null), "null"); +assert.throws(TypeError, () => epochMicroseconds.call(true), "true"); +assert.throws(TypeError, () => epochMicroseconds.call(""), "empty string"); +assert.throws(TypeError, () => epochMicroseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => epochMicroseconds.call(1), "1"); +assert.throws(TypeError, () => epochMicroseconds.call({}), "plain object"); +assert.throws(TypeError, () => epochMicroseconds.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => epochMicroseconds.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/epochMilliseconds/branding.js b/test/built-ins/Temporal/Instant/prototype/epochMilliseconds/branding.js new file mode 100644 index 00000000000..e1f0131af9f --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/epochMilliseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.instant.prototype.epochmilliseconds +features: [Symbol, Temporal] +---*/ + +const epochMilliseconds = Object.getOwnPropertyDescriptor(Temporal.Instant.prototype, "epochMilliseconds").get; + +assert.sameValue(typeof epochMilliseconds, "function"); + +assert.throws(TypeError, () => epochMilliseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => epochMilliseconds.call(null), "null"); +assert.throws(TypeError, () => epochMilliseconds.call(true), "true"); +assert.throws(TypeError, () => epochMilliseconds.call(""), "empty string"); +assert.throws(TypeError, () => epochMilliseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => epochMilliseconds.call(1), "1"); +assert.throws(TypeError, () => epochMilliseconds.call({}), "plain object"); +assert.throws(TypeError, () => epochMilliseconds.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => epochMilliseconds.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/epochNanoseconds/branding.js b/test/built-ins/Temporal/Instant/prototype/epochNanoseconds/branding.js new file mode 100644 index 00000000000..09945681d6b --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/epochNanoseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.instant.prototype.epochnanoseconds +features: [Symbol, Temporal] +---*/ + +const epochNanoseconds = Object.getOwnPropertyDescriptor(Temporal.Instant.prototype, "epochNanoseconds").get; + +assert.sameValue(typeof epochNanoseconds, "function"); + +assert.throws(TypeError, () => epochNanoseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => epochNanoseconds.call(null), "null"); +assert.throws(TypeError, () => epochNanoseconds.call(true), "true"); +assert.throws(TypeError, () => epochNanoseconds.call(""), "empty string"); +assert.throws(TypeError, () => epochNanoseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => epochNanoseconds.call(1), "1"); +assert.throws(TypeError, () => epochNanoseconds.call({}), "plain object"); +assert.throws(TypeError, () => epochNanoseconds.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => epochNanoseconds.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/epochSeconds/branding.js b/test/built-ins/Temporal/Instant/prototype/epochSeconds/branding.js new file mode 100644 index 00000000000..2855bf5cab2 --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/epochSeconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.instant.prototype.epochseconds +features: [Symbol, Temporal] +---*/ + +const epochSeconds = Object.getOwnPropertyDescriptor(Temporal.Instant.prototype, "epochSeconds").get; + +assert.sameValue(typeof epochSeconds, "function"); + +assert.throws(TypeError, () => epochSeconds.call(undefined), "undefined"); +assert.throws(TypeError, () => epochSeconds.call(null), "null"); +assert.throws(TypeError, () => epochSeconds.call(true), "true"); +assert.throws(TypeError, () => epochSeconds.call(""), "empty string"); +assert.throws(TypeError, () => epochSeconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => epochSeconds.call(1), "1"); +assert.throws(TypeError, () => epochSeconds.call({}), "plain object"); +assert.throws(TypeError, () => epochSeconds.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => epochSeconds.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/equals/branding.js b/test/built-ins/Temporal/Instant/prototype/equals/branding.js new file mode 100644 index 00000000000..c9a4554162c --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/equals/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.equals +features: [Symbol, Temporal] +---*/ + +const equals = Temporal.Instant.prototype.equals; + +assert.sameValue(typeof equals, "function"); + +assert.throws(TypeError, () => equals.call(undefined), "undefined"); +assert.throws(TypeError, () => equals.call(null), "null"); +assert.throws(TypeError, () => equals.call(true), "true"); +assert.throws(TypeError, () => equals.call(""), "empty string"); +assert.throws(TypeError, () => equals.call(Symbol()), "symbol"); +assert.throws(TypeError, () => equals.call(1), "1"); +assert.throws(TypeError, () => equals.call({}), "plain object"); +assert.throws(TypeError, () => equals.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => equals.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/round/branding.js b/test/built-ins/Temporal/Instant/prototype/round/branding.js new file mode 100644 index 00000000000..b5cecd221a9 --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/round/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.round +features: [Symbol, Temporal] +---*/ + +const round = Temporal.Instant.prototype.round; + +assert.sameValue(typeof round, "function"); + +assert.throws(TypeError, () => round.call(undefined), "undefined"); +assert.throws(TypeError, () => round.call(null), "null"); +assert.throws(TypeError, () => round.call(true), "true"); +assert.throws(TypeError, () => round.call(""), "empty string"); +assert.throws(TypeError, () => round.call(Symbol()), "symbol"); +assert.throws(TypeError, () => round.call(1), "1"); +assert.throws(TypeError, () => round.call({}), "plain object"); +assert.throws(TypeError, () => round.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => round.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/since/branding.js b/test/built-ins/Temporal/Instant/prototype/since/branding.js new file mode 100644 index 00000000000..b1ff4e4df56 --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/since/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.since +features: [Symbol, Temporal] +---*/ + +const since = Temporal.Instant.prototype.since; + +assert.sameValue(typeof since, "function"); + +assert.throws(TypeError, () => since.call(undefined), "undefined"); +assert.throws(TypeError, () => since.call(null), "null"); +assert.throws(TypeError, () => since.call(true), "true"); +assert.throws(TypeError, () => since.call(""), "empty string"); +assert.throws(TypeError, () => since.call(Symbol()), "symbol"); +assert.throws(TypeError, () => since.call(1), "1"); +assert.throws(TypeError, () => since.call({}), "plain object"); +assert.throws(TypeError, () => since.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => since.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/subtract/branding.js b/test/built-ins/Temporal/Instant/prototype/subtract/branding.js new file mode 100644 index 00000000000..f4703cf675e --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/subtract/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.subtract +features: [Symbol, Temporal] +---*/ + +const subtract = Temporal.Instant.prototype.subtract; + +assert.sameValue(typeof subtract, "function"); + +assert.throws(TypeError, () => subtract.call(undefined), "undefined"); +assert.throws(TypeError, () => subtract.call(null), "null"); +assert.throws(TypeError, () => subtract.call(true), "true"); +assert.throws(TypeError, () => subtract.call(""), "empty string"); +assert.throws(TypeError, () => subtract.call(Symbol()), "symbol"); +assert.throws(TypeError, () => subtract.call(1), "1"); +assert.throws(TypeError, () => subtract.call({}), "plain object"); +assert.throws(TypeError, () => subtract.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => subtract.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/toJSON/branding.js b/test/built-ins/Temporal/Instant/prototype/toJSON/branding.js new file mode 100644 index 00000000000..96e4fdc5c8a --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/toJSON/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.tojson +features: [Symbol, Temporal] +---*/ + +const toJSON = Temporal.Instant.prototype.toJSON; + +assert.sameValue(typeof toJSON, "function"); + +assert.throws(TypeError, () => toJSON.call(undefined), "undefined"); +assert.throws(TypeError, () => toJSON.call(null), "null"); +assert.throws(TypeError, () => toJSON.call(true), "true"); +assert.throws(TypeError, () => toJSON.call(""), "empty string"); +assert.throws(TypeError, () => toJSON.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toJSON.call(1), "1"); +assert.throws(TypeError, () => toJSON.call({}), "plain object"); +assert.throws(TypeError, () => toJSON.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => toJSON.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/toLocaleString/branding.js b/test/built-ins/Temporal/Instant/prototype/toLocaleString/branding.js new file mode 100644 index 00000000000..a592e835bde --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/toLocaleString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.tolocalestring +features: [Symbol, Temporal] +---*/ + +const toLocaleString = Temporal.Instant.prototype.toLocaleString; + +assert.sameValue(typeof toLocaleString, "function"); + +assert.throws(TypeError, () => toLocaleString.call(undefined), "undefined"); +assert.throws(TypeError, () => toLocaleString.call(null), "null"); +assert.throws(TypeError, () => toLocaleString.call(true), "true"); +assert.throws(TypeError, () => toLocaleString.call(""), "empty string"); +assert.throws(TypeError, () => toLocaleString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toLocaleString.call(1), "1"); +assert.throws(TypeError, () => toLocaleString.call({}), "plain object"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/toString/branding.js b/test/built-ins/Temporal/Instant/prototype/toString/branding.js new file mode 100644 index 00000000000..a81537922a1 --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.Instant.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => toString.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/toZonedDateTime/branding.js b/test/built-ins/Temporal/Instant/prototype/toZonedDateTime/branding.js new file mode 100644 index 00000000000..d54f8556c10 --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/toZonedDateTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.tozoneddatetime +features: [Symbol, Temporal] +---*/ + +const toZonedDateTime = Temporal.Instant.prototype.toZonedDateTime; + +assert.sameValue(typeof toZonedDateTime, "function"); + +assert.throws(TypeError, () => toZonedDateTime.call(undefined), "undefined"); +assert.throws(TypeError, () => toZonedDateTime.call(null), "null"); +assert.throws(TypeError, () => toZonedDateTime.call(true), "true"); +assert.throws(TypeError, () => toZonedDateTime.call(""), "empty string"); +assert.throws(TypeError, () => toZonedDateTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toZonedDateTime.call(1), "1"); +assert.throws(TypeError, () => toZonedDateTime.call({}), "plain object"); +assert.throws(TypeError, () => toZonedDateTime.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => toZonedDateTime.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/toZonedDateTimeISO/branding.js b/test/built-ins/Temporal/Instant/prototype/toZonedDateTimeISO/branding.js new file mode 100644 index 00000000000..a05461e5dc3 --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/toZonedDateTimeISO/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.tozoneddatetimeiso +features: [Symbol, Temporal] +---*/ + +const toZonedDateTimeISO = Temporal.Instant.prototype.toZonedDateTimeISO; + +assert.sameValue(typeof toZonedDateTimeISO, "function"); + +assert.throws(TypeError, () => toZonedDateTimeISO.call(undefined), "undefined"); +assert.throws(TypeError, () => toZonedDateTimeISO.call(null), "null"); +assert.throws(TypeError, () => toZonedDateTimeISO.call(true), "true"); +assert.throws(TypeError, () => toZonedDateTimeISO.call(""), "empty string"); +assert.throws(TypeError, () => toZonedDateTimeISO.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toZonedDateTimeISO.call(1), "1"); +assert.throws(TypeError, () => toZonedDateTimeISO.call({}), "plain object"); +assert.throws(TypeError, () => toZonedDateTimeISO.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => toZonedDateTimeISO.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/until/branding.js b/test/built-ins/Temporal/Instant/prototype/until/branding.js new file mode 100644 index 00000000000..b1d58ec975e --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/until/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.until +features: [Symbol, Temporal] +---*/ + +const until = Temporal.Instant.prototype.until; + +assert.sameValue(typeof until, "function"); + +assert.throws(TypeError, () => until.call(undefined), "undefined"); +assert.throws(TypeError, () => until.call(null), "null"); +assert.throws(TypeError, () => until.call(true), "true"); +assert.throws(TypeError, () => until.call(""), "empty string"); +assert.throws(TypeError, () => until.call(Symbol()), "symbol"); +assert.throws(TypeError, () => until.call(1), "1"); +assert.throws(TypeError, () => until.call({}), "plain object"); +assert.throws(TypeError, () => until.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => until.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/Instant/prototype/valueOf/branding.js b/test/built-ins/Temporal/Instant/prototype/valueOf/branding.js new file mode 100644 index 00000000000..4b41a140d88 --- /dev/null +++ b/test/built-ins/Temporal/Instant/prototype/valueOf/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant.prototype.valueof +features: [Symbol, Temporal] +---*/ + +const valueOf = Temporal.Instant.prototype.valueOf; + +assert.sameValue(typeof valueOf, "function"); + +assert.throws(TypeError, () => valueOf.call(undefined), "undefined"); +assert.throws(TypeError, () => valueOf.call(null), "null"); +assert.throws(TypeError, () => valueOf.call(true), "true"); +assert.throws(TypeError, () => valueOf.call(""), "empty string"); +assert.throws(TypeError, () => valueOf.call(Symbol()), "symbol"); +assert.throws(TypeError, () => valueOf.call(1), "1"); +assert.throws(TypeError, () => valueOf.call({}), "plain object"); +assert.throws(TypeError, () => valueOf.call(Temporal.Instant), "Temporal.Instant"); +assert.throws(TypeError, () => valueOf.call(Temporal.Instant.prototype), "Temporal.Instant.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/add/branding.js b/test/built-ins/Temporal/PlainDate/prototype/add/branding.js new file mode 100644 index 00000000000..40e2e61612f --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/add/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.add +features: [Symbol, Temporal] +---*/ + +const add = Temporal.PlainDate.prototype.add; + +assert.sameValue(typeof add, "function"); + +assert.throws(TypeError, () => add.call(undefined), "undefined"); +assert.throws(TypeError, () => add.call(null), "null"); +assert.throws(TypeError, () => add.call(true), "true"); +assert.throws(TypeError, () => add.call(""), "empty string"); +assert.throws(TypeError, () => add.call(Symbol()), "symbol"); +assert.throws(TypeError, () => add.call(1), "1"); +assert.throws(TypeError, () => add.call({}), "plain object"); +assert.throws(TypeError, () => add.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => add.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/calendar/branding.js b/test/built-ins/Temporal/PlainDate/prototype/calendar/branding.js new file mode 100644 index 00000000000..403e1387af3 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/calendar/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.calendar +features: [Symbol, Temporal] +---*/ + +const calendar = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "calendar").get; + +assert.sameValue(typeof calendar, "function"); + +assert.throws(TypeError, () => calendar.call(undefined), "undefined"); +assert.throws(TypeError, () => calendar.call(null), "null"); +assert.throws(TypeError, () => calendar.call(true), "true"); +assert.throws(TypeError, () => calendar.call(""), "empty string"); +assert.throws(TypeError, () => calendar.call(Symbol()), "symbol"); +assert.throws(TypeError, () => calendar.call(1), "1"); +assert.throws(TypeError, () => calendar.call({}), "plain object"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/day/branding.js b/test/built-ins/Temporal/PlainDate/prototype/day/branding.js new file mode 100644 index 00000000000..d22203460c2 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/day/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.day +features: [Symbol, Temporal] +---*/ + +const day = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "day").get; + +assert.sameValue(typeof day, "function"); + +assert.throws(TypeError, () => day.call(undefined), "undefined"); +assert.throws(TypeError, () => day.call(null), "null"); +assert.throws(TypeError, () => day.call(true), "true"); +assert.throws(TypeError, () => day.call(""), "empty string"); +assert.throws(TypeError, () => day.call(Symbol()), "symbol"); +assert.throws(TypeError, () => day.call(1), "1"); +assert.throws(TypeError, () => day.call({}), "plain object"); +assert.throws(TypeError, () => day.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => day.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/dayOfWeek/branding.js b/test/built-ins/Temporal/PlainDate/prototype/dayOfWeek/branding.js new file mode 100644 index 00000000000..7a7807b5188 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/dayOfWeek/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.dayofweek +features: [Symbol, Temporal] +---*/ + +const dayOfWeek = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "dayOfWeek").get; + +assert.sameValue(typeof dayOfWeek, "function"); + +assert.throws(TypeError, () => dayOfWeek.call(undefined), "undefined"); +assert.throws(TypeError, () => dayOfWeek.call(null), "null"); +assert.throws(TypeError, () => dayOfWeek.call(true), "true"); +assert.throws(TypeError, () => dayOfWeek.call(""), "empty string"); +assert.throws(TypeError, () => dayOfWeek.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dayOfWeek.call(1), "1"); +assert.throws(TypeError, () => dayOfWeek.call({}), "plain object"); +assert.throws(TypeError, () => dayOfWeek.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => dayOfWeek.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/dayOfYear/branding.js b/test/built-ins/Temporal/PlainDate/prototype/dayOfYear/branding.js new file mode 100644 index 00000000000..4df65a00467 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/dayOfYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.dayofyear +features: [Symbol, Temporal] +---*/ + +const dayOfYear = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "dayOfYear").get; + +assert.sameValue(typeof dayOfYear, "function"); + +assert.throws(TypeError, () => dayOfYear.call(undefined), "undefined"); +assert.throws(TypeError, () => dayOfYear.call(null), "null"); +assert.throws(TypeError, () => dayOfYear.call(true), "true"); +assert.throws(TypeError, () => dayOfYear.call(""), "empty string"); +assert.throws(TypeError, () => dayOfYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dayOfYear.call(1), "1"); +assert.throws(TypeError, () => dayOfYear.call({}), "plain object"); +assert.throws(TypeError, () => dayOfYear.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => dayOfYear.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/daysInMonth/branding.js b/test/built-ins/Temporal/PlainDate/prototype/daysInMonth/branding.js new file mode 100644 index 00000000000..43aa48eabde --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/daysInMonth/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.daysinmonth +features: [Symbol, Temporal] +---*/ + +const daysInMonth = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "daysInMonth").get; + +assert.sameValue(typeof daysInMonth, "function"); + +assert.throws(TypeError, () => daysInMonth.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInMonth.call(null), "null"); +assert.throws(TypeError, () => daysInMonth.call(true), "true"); +assert.throws(TypeError, () => daysInMonth.call(""), "empty string"); +assert.throws(TypeError, () => daysInMonth.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInMonth.call(1), "1"); +assert.throws(TypeError, () => daysInMonth.call({}), "plain object"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/daysInWeek/branding.js b/test/built-ins/Temporal/PlainDate/prototype/daysInWeek/branding.js new file mode 100644 index 00000000000..f6c1ba97964 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/daysInWeek/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.daysinweek +features: [Symbol, Temporal] +---*/ + +const daysInWeek = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "daysInWeek").get; + +assert.sameValue(typeof daysInWeek, "function"); + +assert.throws(TypeError, () => daysInWeek.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInWeek.call(null), "null"); +assert.throws(TypeError, () => daysInWeek.call(true), "true"); +assert.throws(TypeError, () => daysInWeek.call(""), "empty string"); +assert.throws(TypeError, () => daysInWeek.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInWeek.call(1), "1"); +assert.throws(TypeError, () => daysInWeek.call({}), "plain object"); +assert.throws(TypeError, () => daysInWeek.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => daysInWeek.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/daysInYear/branding.js b/test/built-ins/Temporal/PlainDate/prototype/daysInYear/branding.js new file mode 100644 index 00000000000..53f155f9fd3 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/daysInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.daysinyear +features: [Symbol, Temporal] +---*/ + +const daysInYear = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "daysInYear").get; + +assert.sameValue(typeof daysInYear, "function"); + +assert.throws(TypeError, () => daysInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInYear.call(null), "null"); +assert.throws(TypeError, () => daysInYear.call(true), "true"); +assert.throws(TypeError, () => daysInYear.call(""), "empty string"); +assert.throws(TypeError, () => daysInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInYear.call(1), "1"); +assert.throws(TypeError, () => daysInYear.call({}), "plain object"); +assert.throws(TypeError, () => daysInYear.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => daysInYear.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/equals/branding.js b/test/built-ins/Temporal/PlainDate/prototype/equals/branding.js new file mode 100644 index 00000000000..4e5d42dd9a4 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/equals/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.equals +features: [Symbol, Temporal] +---*/ + +const equals = Temporal.PlainDate.prototype.equals; + +assert.sameValue(typeof equals, "function"); + +assert.throws(TypeError, () => equals.call(undefined), "undefined"); +assert.throws(TypeError, () => equals.call(null), "null"); +assert.throws(TypeError, () => equals.call(true), "true"); +assert.throws(TypeError, () => equals.call(""), "empty string"); +assert.throws(TypeError, () => equals.call(Symbol()), "symbol"); +assert.throws(TypeError, () => equals.call(1), "1"); +assert.throws(TypeError, () => equals.call({}), "plain object"); +assert.throws(TypeError, () => equals.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => equals.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/era/branding.js b/test/built-ins/Temporal/PlainDate/prototype/era/branding.js new file mode 100644 index 00000000000..9b318aadd1a --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/era/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.era +features: [Symbol, Temporal] +---*/ + +const era = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "era").get; + +assert.sameValue(typeof era, "function"); + +assert.throws(TypeError, () => era.call(undefined), "undefined"); +assert.throws(TypeError, () => era.call(null), "null"); +assert.throws(TypeError, () => era.call(true), "true"); +assert.throws(TypeError, () => era.call(""), "empty string"); +assert.throws(TypeError, () => era.call(Symbol()), "symbol"); +assert.throws(TypeError, () => era.call(1), "1"); +assert.throws(TypeError, () => era.call({}), "plain object"); +assert.throws(TypeError, () => era.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => era.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/eraYear/branding.js b/test/built-ins/Temporal/PlainDate/prototype/eraYear/branding.js new file mode 100644 index 00000000000..a15a9c94428 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/eraYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.erayear +features: [Symbol, Temporal] +---*/ + +const eraYear = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "eraYear").get; + +assert.sameValue(typeof eraYear, "function"); + +assert.throws(TypeError, () => eraYear.call(undefined), "undefined"); +assert.throws(TypeError, () => eraYear.call(null), "null"); +assert.throws(TypeError, () => eraYear.call(true), "true"); +assert.throws(TypeError, () => eraYear.call(""), "empty string"); +assert.throws(TypeError, () => eraYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => eraYear.call(1), "1"); +assert.throws(TypeError, () => eraYear.call({}), "plain object"); +assert.throws(TypeError, () => eraYear.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => eraYear.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/getISOFields/branding.js b/test/built-ins/Temporal/PlainDate/prototype/getISOFields/branding.js new file mode 100644 index 00000000000..70d2e1e03b6 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/getISOFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.getisofields +features: [Symbol, Temporal] +---*/ + +const getISOFields = Temporal.PlainDate.prototype.getISOFields; + +assert.sameValue(typeof getISOFields, "function"); + +assert.throws(TypeError, () => getISOFields.call(undefined), "undefined"); +assert.throws(TypeError, () => getISOFields.call(null), "null"); +assert.throws(TypeError, () => getISOFields.call(true), "true"); +assert.throws(TypeError, () => getISOFields.call(""), "empty string"); +assert.throws(TypeError, () => getISOFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getISOFields.call(1), "1"); +assert.throws(TypeError, () => getISOFields.call({}), "plain object"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/inLeapYear/branding.js b/test/built-ins/Temporal/PlainDate/prototype/inLeapYear/branding.js new file mode 100644 index 00000000000..0d5d04cb8d7 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/inLeapYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.inleapyear +features: [Symbol, Temporal] +---*/ + +const inLeapYear = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "inLeapYear").get; + +assert.sameValue(typeof inLeapYear, "function"); + +assert.throws(TypeError, () => inLeapYear.call(undefined), "undefined"); +assert.throws(TypeError, () => inLeapYear.call(null), "null"); +assert.throws(TypeError, () => inLeapYear.call(true), "true"); +assert.throws(TypeError, () => inLeapYear.call(""), "empty string"); +assert.throws(TypeError, () => inLeapYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => inLeapYear.call(1), "1"); +assert.throws(TypeError, () => inLeapYear.call({}), "plain object"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/month/branding.js b/test/built-ins/Temporal/PlainDate/prototype/month/branding.js new file mode 100644 index 00000000000..d9364a2541d --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/month/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.month +features: [Symbol, Temporal] +---*/ + +const month = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "month").get; + +assert.sameValue(typeof month, "function"); + +assert.throws(TypeError, () => month.call(undefined), "undefined"); +assert.throws(TypeError, () => month.call(null), "null"); +assert.throws(TypeError, () => month.call(true), "true"); +assert.throws(TypeError, () => month.call(""), "empty string"); +assert.throws(TypeError, () => month.call(Symbol()), "symbol"); +assert.throws(TypeError, () => month.call(1), "1"); +assert.throws(TypeError, () => month.call({}), "plain object"); +assert.throws(TypeError, () => month.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => month.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/monthCode/branding.js b/test/built-ins/Temporal/PlainDate/prototype/monthCode/branding.js new file mode 100644 index 00000000000..71638f76656 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/monthCode/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.monthcode +features: [Symbol, Temporal] +---*/ + +const monthCode = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "monthCode").get; + +assert.sameValue(typeof monthCode, "function"); + +assert.throws(TypeError, () => monthCode.call(undefined), "undefined"); +assert.throws(TypeError, () => monthCode.call(null), "null"); +assert.throws(TypeError, () => monthCode.call(true), "true"); +assert.throws(TypeError, () => monthCode.call(""), "empty string"); +assert.throws(TypeError, () => monthCode.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthCode.call(1), "1"); +assert.throws(TypeError, () => monthCode.call({}), "plain object"); +assert.throws(TypeError, () => monthCode.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => monthCode.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/monthsInYear/branding.js b/test/built-ins/Temporal/PlainDate/prototype/monthsInYear/branding.js new file mode 100644 index 00000000000..572db4b079a --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/monthsInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.monthsinyear +features: [Symbol, Temporal] +---*/ + +const monthsInYear = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "monthsInYear").get; + +assert.sameValue(typeof monthsInYear, "function"); + +assert.throws(TypeError, () => monthsInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => monthsInYear.call(null), "null"); +assert.throws(TypeError, () => monthsInYear.call(true), "true"); +assert.throws(TypeError, () => monthsInYear.call(""), "empty string"); +assert.throws(TypeError, () => monthsInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthsInYear.call(1), "1"); +assert.throws(TypeError, () => monthsInYear.call({}), "plain object"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/since/branding.js b/test/built-ins/Temporal/PlainDate/prototype/since/branding.js new file mode 100644 index 00000000000..3cd7719e2fc --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/since/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.since +features: [Symbol, Temporal] +---*/ + +const since = Temporal.PlainDate.prototype.since; + +assert.sameValue(typeof since, "function"); + +assert.throws(TypeError, () => since.call(undefined), "undefined"); +assert.throws(TypeError, () => since.call(null), "null"); +assert.throws(TypeError, () => since.call(true), "true"); +assert.throws(TypeError, () => since.call(""), "empty string"); +assert.throws(TypeError, () => since.call(Symbol()), "symbol"); +assert.throws(TypeError, () => since.call(1), "1"); +assert.throws(TypeError, () => since.call({}), "plain object"); +assert.throws(TypeError, () => since.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => since.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/subtract/branding.js b/test/built-ins/Temporal/PlainDate/prototype/subtract/branding.js new file mode 100644 index 00000000000..2d41b368563 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/subtract/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.subtract +features: [Symbol, Temporal] +---*/ + +const subtract = Temporal.PlainDate.prototype.subtract; + +assert.sameValue(typeof subtract, "function"); + +assert.throws(TypeError, () => subtract.call(undefined), "undefined"); +assert.throws(TypeError, () => subtract.call(null), "null"); +assert.throws(TypeError, () => subtract.call(true), "true"); +assert.throws(TypeError, () => subtract.call(""), "empty string"); +assert.throws(TypeError, () => subtract.call(Symbol()), "symbol"); +assert.throws(TypeError, () => subtract.call(1), "1"); +assert.throws(TypeError, () => subtract.call({}), "plain object"); +assert.throws(TypeError, () => subtract.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => subtract.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/toJSON/branding.js b/test/built-ins/Temporal/PlainDate/prototype/toJSON/branding.js new file mode 100644 index 00000000000..a3d1d56eac8 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/toJSON/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.tojson +features: [Symbol, Temporal] +---*/ + +const toJSON = Temporal.PlainDate.prototype.toJSON; + +assert.sameValue(typeof toJSON, "function"); + +assert.throws(TypeError, () => toJSON.call(undefined), "undefined"); +assert.throws(TypeError, () => toJSON.call(null), "null"); +assert.throws(TypeError, () => toJSON.call(true), "true"); +assert.throws(TypeError, () => toJSON.call(""), "empty string"); +assert.throws(TypeError, () => toJSON.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toJSON.call(1), "1"); +assert.throws(TypeError, () => toJSON.call({}), "plain object"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/toLocaleString/branding.js b/test/built-ins/Temporal/PlainDate/prototype/toLocaleString/branding.js new file mode 100644 index 00000000000..79f1841b730 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/toLocaleString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.tolocalestring +features: [Symbol, Temporal] +---*/ + +const toLocaleString = Temporal.PlainDate.prototype.toLocaleString; + +assert.sameValue(typeof toLocaleString, "function"); + +assert.throws(TypeError, () => toLocaleString.call(undefined), "undefined"); +assert.throws(TypeError, () => toLocaleString.call(null), "null"); +assert.throws(TypeError, () => toLocaleString.call(true), "true"); +assert.throws(TypeError, () => toLocaleString.call(""), "empty string"); +assert.throws(TypeError, () => toLocaleString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toLocaleString.call(1), "1"); +assert.throws(TypeError, () => toLocaleString.call({}), "plain object"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/toPlainDateTime/branding.js b/test/built-ins/Temporal/PlainDate/prototype/toPlainDateTime/branding.js new file mode 100644 index 00000000000..f5d99c74dfa --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/toPlainDateTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.toplaindatetime +features: [Symbol, Temporal] +---*/ + +const toPlainDateTime = Temporal.PlainDate.prototype.toPlainDateTime; + +assert.sameValue(typeof toPlainDateTime, "function"); + +assert.throws(TypeError, () => toPlainDateTime.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainDateTime.call(null), "null"); +assert.throws(TypeError, () => toPlainDateTime.call(true), "true"); +assert.throws(TypeError, () => toPlainDateTime.call(""), "empty string"); +assert.throws(TypeError, () => toPlainDateTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainDateTime.call(1), "1"); +assert.throws(TypeError, () => toPlainDateTime.call({}), "plain object"); +assert.throws(TypeError, () => toPlainDateTime.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => toPlainDateTime.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/toPlainMonthDay/branding.js b/test/built-ins/Temporal/PlainDate/prototype/toPlainMonthDay/branding.js new file mode 100644 index 00000000000..eec07a0dd9a --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/toPlainMonthDay/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.toplainmonthday +features: [Symbol, Temporal] +---*/ + +const toPlainMonthDay = Temporal.PlainDate.prototype.toPlainMonthDay; + +assert.sameValue(typeof toPlainMonthDay, "function"); + +assert.throws(TypeError, () => toPlainMonthDay.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainMonthDay.call(null), "null"); +assert.throws(TypeError, () => toPlainMonthDay.call(true), "true"); +assert.throws(TypeError, () => toPlainMonthDay.call(""), "empty string"); +assert.throws(TypeError, () => toPlainMonthDay.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainMonthDay.call(1), "1"); +assert.throws(TypeError, () => toPlainMonthDay.call({}), "plain object"); +assert.throws(TypeError, () => toPlainMonthDay.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => toPlainMonthDay.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/branding.js b/test/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/branding.js new file mode 100644 index 00000000000..7767a6bf08c --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.toplainyearmonth +features: [Symbol, Temporal] +---*/ + +const toPlainYearMonth = Temporal.PlainDate.prototype.toPlainYearMonth; + +assert.sameValue(typeof toPlainYearMonth, "function"); + +assert.throws(TypeError, () => toPlainYearMonth.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainYearMonth.call(null), "null"); +assert.throws(TypeError, () => toPlainYearMonth.call(true), "true"); +assert.throws(TypeError, () => toPlainYearMonth.call(""), "empty string"); +assert.throws(TypeError, () => toPlainYearMonth.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainYearMonth.call(1), "1"); +assert.throws(TypeError, () => toPlainYearMonth.call({}), "plain object"); +assert.throws(TypeError, () => toPlainYearMonth.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => toPlainYearMonth.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/toString/branding.js b/test/built-ins/Temporal/PlainDate/prototype/toString/branding.js new file mode 100644 index 00000000000..ffa47542a52 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.PlainDate.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => toString.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/branding.js b/test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/branding.js new file mode 100644 index 00000000000..0fe2905af24 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.tozoneddatetime +features: [Symbol, Temporal] +---*/ + +const toZonedDateTime = Temporal.PlainDate.prototype.toZonedDateTime; + +assert.sameValue(typeof toZonedDateTime, "function"); + +assert.throws(TypeError, () => toZonedDateTime.call(undefined), "undefined"); +assert.throws(TypeError, () => toZonedDateTime.call(null), "null"); +assert.throws(TypeError, () => toZonedDateTime.call(true), "true"); +assert.throws(TypeError, () => toZonedDateTime.call(""), "empty string"); +assert.throws(TypeError, () => toZonedDateTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toZonedDateTime.call(1), "1"); +assert.throws(TypeError, () => toZonedDateTime.call({}), "plain object"); +assert.throws(TypeError, () => toZonedDateTime.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => toZonedDateTime.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/until/branding.js b/test/built-ins/Temporal/PlainDate/prototype/until/branding.js new file mode 100644 index 00000000000..ee200e6bce8 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/until/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.until +features: [Symbol, Temporal] +---*/ + +const until = Temporal.PlainDate.prototype.until; + +assert.sameValue(typeof until, "function"); + +assert.throws(TypeError, () => until.call(undefined), "undefined"); +assert.throws(TypeError, () => until.call(null), "null"); +assert.throws(TypeError, () => until.call(true), "true"); +assert.throws(TypeError, () => until.call(""), "empty string"); +assert.throws(TypeError, () => until.call(Symbol()), "symbol"); +assert.throws(TypeError, () => until.call(1), "1"); +assert.throws(TypeError, () => until.call({}), "plain object"); +assert.throws(TypeError, () => until.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => until.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/valueOf/branding.js b/test/built-ins/Temporal/PlainDate/prototype/valueOf/branding.js new file mode 100644 index 00000000000..3e9cca015c2 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/valueOf/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.valueof +features: [Symbol, Temporal] +---*/ + +const valueOf = Temporal.PlainDate.prototype.valueOf; + +assert.sameValue(typeof valueOf, "function"); + +assert.throws(TypeError, () => valueOf.call(undefined), "undefined"); +assert.throws(TypeError, () => valueOf.call(null), "null"); +assert.throws(TypeError, () => valueOf.call(true), "true"); +assert.throws(TypeError, () => valueOf.call(""), "empty string"); +assert.throws(TypeError, () => valueOf.call(Symbol()), "symbol"); +assert.throws(TypeError, () => valueOf.call(1), "1"); +assert.throws(TypeError, () => valueOf.call({}), "plain object"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/weekOfYear/branding.js b/test/built-ins/Temporal/PlainDate/prototype/weekOfYear/branding.js new file mode 100644 index 00000000000..1245485949f --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/weekOfYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.weekofyear +features: [Symbol, Temporal] +---*/ + +const weekOfYear = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "weekOfYear").get; + +assert.sameValue(typeof weekOfYear, "function"); + +assert.throws(TypeError, () => weekOfYear.call(undefined), "undefined"); +assert.throws(TypeError, () => weekOfYear.call(null), "null"); +assert.throws(TypeError, () => weekOfYear.call(true), "true"); +assert.throws(TypeError, () => weekOfYear.call(""), "empty string"); +assert.throws(TypeError, () => weekOfYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => weekOfYear.call(1), "1"); +assert.throws(TypeError, () => weekOfYear.call({}), "plain object"); +assert.throws(TypeError, () => weekOfYear.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => weekOfYear.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/with/branding.js b/test/built-ins/Temporal/PlainDate/prototype/with/branding.js new file mode 100644 index 00000000000..882bfbb017c --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/with/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.with +features: [Symbol, Temporal] +---*/ + +const with_ = Temporal.PlainDate.prototype.with; + +assert.sameValue(typeof with_, "function"); + +assert.throws(TypeError, () => with_.call(undefined), "undefined"); +assert.throws(TypeError, () => with_.call(null), "null"); +assert.throws(TypeError, () => with_.call(true), "true"); +assert.throws(TypeError, () => with_.call(""), "empty string"); +assert.throws(TypeError, () => with_.call(Symbol()), "symbol"); +assert.throws(TypeError, () => with_.call(1), "1"); +assert.throws(TypeError, () => with_.call({}), "plain object"); +assert.throws(TypeError, () => with_.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => with_.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/withCalendar/branding.js b/test/built-ins/Temporal/PlainDate/prototype/withCalendar/branding.js new file mode 100644 index 00000000000..48c2ab71733 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/withCalendar/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.withcalendar +features: [Symbol, Temporal] +---*/ + +const withCalendar = Temporal.PlainDate.prototype.withCalendar; + +assert.sameValue(typeof withCalendar, "function"); + +assert.throws(TypeError, () => withCalendar.call(undefined), "undefined"); +assert.throws(TypeError, () => withCalendar.call(null), "null"); +assert.throws(TypeError, () => withCalendar.call(true), "true"); +assert.throws(TypeError, () => withCalendar.call(""), "empty string"); +assert.throws(TypeError, () => withCalendar.call(Symbol()), "symbol"); +assert.throws(TypeError, () => withCalendar.call(1), "1"); +assert.throws(TypeError, () => withCalendar.call({}), "plain object"); +assert.throws(TypeError, () => withCalendar.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => withCalendar.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDate/prototype/year/branding.js b/test/built-ins/Temporal/PlainDate/prototype/year/branding.js new file mode 100644 index 00000000000..08ede3bef12 --- /dev/null +++ b/test/built-ins/Temporal/PlainDate/prototype/year/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindate.prototype.year +features: [Symbol, Temporal] +---*/ + +const year = Object.getOwnPropertyDescriptor(Temporal.PlainDate.prototype, "year").get; + +assert.sameValue(typeof year, "function"); + +assert.throws(TypeError, () => year.call(undefined), "undefined"); +assert.throws(TypeError, () => year.call(null), "null"); +assert.throws(TypeError, () => year.call(true), "true"); +assert.throws(TypeError, () => year.call(""), "empty string"); +assert.throws(TypeError, () => year.call(Symbol()), "symbol"); +assert.throws(TypeError, () => year.call(1), "1"); +assert.throws(TypeError, () => year.call({}), "plain object"); +assert.throws(TypeError, () => year.call(Temporal.PlainDate), "Temporal.PlainDate"); +assert.throws(TypeError, () => year.call(Temporal.PlainDate.prototype), "Temporal.PlainDate.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/add/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/add/branding.js new file mode 100644 index 00000000000..d57a276220f --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/add/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.add +features: [Symbol, Temporal] +---*/ + +const add = Temporal.PlainDateTime.prototype.add; + +assert.sameValue(typeof add, "function"); + +assert.throws(TypeError, () => add.call(undefined), "undefined"); +assert.throws(TypeError, () => add.call(null), "null"); +assert.throws(TypeError, () => add.call(true), "true"); +assert.throws(TypeError, () => add.call(""), "empty string"); +assert.throws(TypeError, () => add.call(Symbol()), "symbol"); +assert.throws(TypeError, () => add.call(1), "1"); +assert.throws(TypeError, () => add.call({}), "plain object"); +assert.throws(TypeError, () => add.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => add.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/calendar/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/calendar/branding.js new file mode 100644 index 00000000000..751eb32f2e1 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/calendar/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.calendar +features: [Symbol, Temporal] +---*/ + +const calendar = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "calendar").get; + +assert.sameValue(typeof calendar, "function"); + +assert.throws(TypeError, () => calendar.call(undefined), "undefined"); +assert.throws(TypeError, () => calendar.call(null), "null"); +assert.throws(TypeError, () => calendar.call(true), "true"); +assert.throws(TypeError, () => calendar.call(""), "empty string"); +assert.throws(TypeError, () => calendar.call(Symbol()), "symbol"); +assert.throws(TypeError, () => calendar.call(1), "1"); +assert.throws(TypeError, () => calendar.call({}), "plain object"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/day/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/day/branding.js new file mode 100644 index 00000000000..6104f8ac016 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/day/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.day +features: [Symbol, Temporal] +---*/ + +const day = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "day").get; + +assert.sameValue(typeof day, "function"); + +assert.throws(TypeError, () => day.call(undefined), "undefined"); +assert.throws(TypeError, () => day.call(null), "null"); +assert.throws(TypeError, () => day.call(true), "true"); +assert.throws(TypeError, () => day.call(""), "empty string"); +assert.throws(TypeError, () => day.call(Symbol()), "symbol"); +assert.throws(TypeError, () => day.call(1), "1"); +assert.throws(TypeError, () => day.call({}), "plain object"); +assert.throws(TypeError, () => day.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => day.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/dayOfWeek/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/dayOfWeek/branding.js new file mode 100644 index 00000000000..5f177de5749 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/dayOfWeek/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.dayofweek +features: [Symbol, Temporal] +---*/ + +const dayOfWeek = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "dayOfWeek").get; + +assert.sameValue(typeof dayOfWeek, "function"); + +assert.throws(TypeError, () => dayOfWeek.call(undefined), "undefined"); +assert.throws(TypeError, () => dayOfWeek.call(null), "null"); +assert.throws(TypeError, () => dayOfWeek.call(true), "true"); +assert.throws(TypeError, () => dayOfWeek.call(""), "empty string"); +assert.throws(TypeError, () => dayOfWeek.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dayOfWeek.call(1), "1"); +assert.throws(TypeError, () => dayOfWeek.call({}), "plain object"); +assert.throws(TypeError, () => dayOfWeek.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => dayOfWeek.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/dayOfYear/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/dayOfYear/branding.js new file mode 100644 index 00000000000..27f517c96c5 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/dayOfYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.dayofyear +features: [Symbol, Temporal] +---*/ + +const dayOfYear = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "dayOfYear").get; + +assert.sameValue(typeof dayOfYear, "function"); + +assert.throws(TypeError, () => dayOfYear.call(undefined), "undefined"); +assert.throws(TypeError, () => dayOfYear.call(null), "null"); +assert.throws(TypeError, () => dayOfYear.call(true), "true"); +assert.throws(TypeError, () => dayOfYear.call(""), "empty string"); +assert.throws(TypeError, () => dayOfYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dayOfYear.call(1), "1"); +assert.throws(TypeError, () => dayOfYear.call({}), "plain object"); +assert.throws(TypeError, () => dayOfYear.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => dayOfYear.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/daysInMonth/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/daysInMonth/branding.js new file mode 100644 index 00000000000..74773cb3a04 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/daysInMonth/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.daysinmonth +features: [Symbol, Temporal] +---*/ + +const daysInMonth = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "daysInMonth").get; + +assert.sameValue(typeof daysInMonth, "function"); + +assert.throws(TypeError, () => daysInMonth.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInMonth.call(null), "null"); +assert.throws(TypeError, () => daysInMonth.call(true), "true"); +assert.throws(TypeError, () => daysInMonth.call(""), "empty string"); +assert.throws(TypeError, () => daysInMonth.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInMonth.call(1), "1"); +assert.throws(TypeError, () => daysInMonth.call({}), "plain object"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/daysInWeek/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/daysInWeek/branding.js new file mode 100644 index 00000000000..edc77ffb0aa --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/daysInWeek/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.daysinweek +features: [Symbol, Temporal] +---*/ + +const daysInWeek = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "daysInWeek").get; + +assert.sameValue(typeof daysInWeek, "function"); + +assert.throws(TypeError, () => daysInWeek.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInWeek.call(null), "null"); +assert.throws(TypeError, () => daysInWeek.call(true), "true"); +assert.throws(TypeError, () => daysInWeek.call(""), "empty string"); +assert.throws(TypeError, () => daysInWeek.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInWeek.call(1), "1"); +assert.throws(TypeError, () => daysInWeek.call({}), "plain object"); +assert.throws(TypeError, () => daysInWeek.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => daysInWeek.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/daysInYear/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/daysInYear/branding.js new file mode 100644 index 00000000000..debb88be10b --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/daysInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.daysinyear +features: [Symbol, Temporal] +---*/ + +const daysInYear = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "daysInYear").get; + +assert.sameValue(typeof daysInYear, "function"); + +assert.throws(TypeError, () => daysInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInYear.call(null), "null"); +assert.throws(TypeError, () => daysInYear.call(true), "true"); +assert.throws(TypeError, () => daysInYear.call(""), "empty string"); +assert.throws(TypeError, () => daysInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInYear.call(1), "1"); +assert.throws(TypeError, () => daysInYear.call({}), "plain object"); +assert.throws(TypeError, () => daysInYear.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => daysInYear.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/equals/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/equals/branding.js new file mode 100644 index 00000000000..c415000c13f --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/equals/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.equals +features: [Symbol, Temporal] +---*/ + +const equals = Temporal.PlainDateTime.prototype.equals; + +assert.sameValue(typeof equals, "function"); + +assert.throws(TypeError, () => equals.call(undefined), "undefined"); +assert.throws(TypeError, () => equals.call(null), "null"); +assert.throws(TypeError, () => equals.call(true), "true"); +assert.throws(TypeError, () => equals.call(""), "empty string"); +assert.throws(TypeError, () => equals.call(Symbol()), "symbol"); +assert.throws(TypeError, () => equals.call(1), "1"); +assert.throws(TypeError, () => equals.call({}), "plain object"); +assert.throws(TypeError, () => equals.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => equals.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/era/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/era/branding.js new file mode 100644 index 00000000000..78d7dcf0524 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/era/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.era +features: [Symbol, Temporal] +---*/ + +const era = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "era").get; + +assert.sameValue(typeof era, "function"); + +assert.throws(TypeError, () => era.call(undefined), "undefined"); +assert.throws(TypeError, () => era.call(null), "null"); +assert.throws(TypeError, () => era.call(true), "true"); +assert.throws(TypeError, () => era.call(""), "empty string"); +assert.throws(TypeError, () => era.call(Symbol()), "symbol"); +assert.throws(TypeError, () => era.call(1), "1"); +assert.throws(TypeError, () => era.call({}), "plain object"); +assert.throws(TypeError, () => era.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => era.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/eraYear/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/eraYear/branding.js new file mode 100644 index 00000000000..eff8fdf5019 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/eraYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.erayear +features: [Symbol, Temporal] +---*/ + +const eraYear = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "eraYear").get; + +assert.sameValue(typeof eraYear, "function"); + +assert.throws(TypeError, () => eraYear.call(undefined), "undefined"); +assert.throws(TypeError, () => eraYear.call(null), "null"); +assert.throws(TypeError, () => eraYear.call(true), "true"); +assert.throws(TypeError, () => eraYear.call(""), "empty string"); +assert.throws(TypeError, () => eraYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => eraYear.call(1), "1"); +assert.throws(TypeError, () => eraYear.call({}), "plain object"); +assert.throws(TypeError, () => eraYear.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => eraYear.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/getISOFields/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/getISOFields/branding.js new file mode 100644 index 00000000000..60b58e3b5ce --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/getISOFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.getisofields +features: [Symbol, Temporal] +---*/ + +const getISOFields = Temporal.PlainDateTime.prototype.getISOFields; + +assert.sameValue(typeof getISOFields, "function"); + +assert.throws(TypeError, () => getISOFields.call(undefined), "undefined"); +assert.throws(TypeError, () => getISOFields.call(null), "null"); +assert.throws(TypeError, () => getISOFields.call(true), "true"); +assert.throws(TypeError, () => getISOFields.call(""), "empty string"); +assert.throws(TypeError, () => getISOFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getISOFields.call(1), "1"); +assert.throws(TypeError, () => getISOFields.call({}), "plain object"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/hour/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/hour/branding.js new file mode 100644 index 00000000000..644929c73a4 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/hour/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.hour +features: [Symbol, Temporal] +---*/ + +const hour = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "hour").get; + +assert.sameValue(typeof hour, "function"); + +assert.throws(TypeError, () => hour.call(undefined), "undefined"); +assert.throws(TypeError, () => hour.call(null), "null"); +assert.throws(TypeError, () => hour.call(true), "true"); +assert.throws(TypeError, () => hour.call(""), "empty string"); +assert.throws(TypeError, () => hour.call(Symbol()), "symbol"); +assert.throws(TypeError, () => hour.call(1), "1"); +assert.throws(TypeError, () => hour.call({}), "plain object"); +assert.throws(TypeError, () => hour.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => hour.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/inLeapYear/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/inLeapYear/branding.js new file mode 100644 index 00000000000..3ac10ea2372 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/inLeapYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.inleapyear +features: [Symbol, Temporal] +---*/ + +const inLeapYear = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "inLeapYear").get; + +assert.sameValue(typeof inLeapYear, "function"); + +assert.throws(TypeError, () => inLeapYear.call(undefined), "undefined"); +assert.throws(TypeError, () => inLeapYear.call(null), "null"); +assert.throws(TypeError, () => inLeapYear.call(true), "true"); +assert.throws(TypeError, () => inLeapYear.call(""), "empty string"); +assert.throws(TypeError, () => inLeapYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => inLeapYear.call(1), "1"); +assert.throws(TypeError, () => inLeapYear.call({}), "plain object"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/microsecond/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/microsecond/branding.js new file mode 100644 index 00000000000..9bf5d937ec9 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/microsecond/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.microsecond +features: [Symbol, Temporal] +---*/ + +const microsecond = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "microsecond").get; + +assert.sameValue(typeof microsecond, "function"); + +assert.throws(TypeError, () => microsecond.call(undefined), "undefined"); +assert.throws(TypeError, () => microsecond.call(null), "null"); +assert.throws(TypeError, () => microsecond.call(true), "true"); +assert.throws(TypeError, () => microsecond.call(""), "empty string"); +assert.throws(TypeError, () => microsecond.call(Symbol()), "symbol"); +assert.throws(TypeError, () => microsecond.call(1), "1"); +assert.throws(TypeError, () => microsecond.call({}), "plain object"); +assert.throws(TypeError, () => microsecond.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => microsecond.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/millisecond/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/millisecond/branding.js new file mode 100644 index 00000000000..82e14fc4af5 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/millisecond/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.millisecond +features: [Symbol, Temporal] +---*/ + +const millisecond = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "millisecond").get; + +assert.sameValue(typeof millisecond, "function"); + +assert.throws(TypeError, () => millisecond.call(undefined), "undefined"); +assert.throws(TypeError, () => millisecond.call(null), "null"); +assert.throws(TypeError, () => millisecond.call(true), "true"); +assert.throws(TypeError, () => millisecond.call(""), "empty string"); +assert.throws(TypeError, () => millisecond.call(Symbol()), "symbol"); +assert.throws(TypeError, () => millisecond.call(1), "1"); +assert.throws(TypeError, () => millisecond.call({}), "plain object"); +assert.throws(TypeError, () => millisecond.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => millisecond.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/minute/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/minute/branding.js new file mode 100644 index 00000000000..c6a6437e431 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/minute/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.minute +features: [Symbol, Temporal] +---*/ + +const minute = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "minute").get; + +assert.sameValue(typeof minute, "function"); + +assert.throws(TypeError, () => minute.call(undefined), "undefined"); +assert.throws(TypeError, () => minute.call(null), "null"); +assert.throws(TypeError, () => minute.call(true), "true"); +assert.throws(TypeError, () => minute.call(""), "empty string"); +assert.throws(TypeError, () => minute.call(Symbol()), "symbol"); +assert.throws(TypeError, () => minute.call(1), "1"); +assert.throws(TypeError, () => minute.call({}), "plain object"); +assert.throws(TypeError, () => minute.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => minute.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/month/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/month/branding.js new file mode 100644 index 00000000000..14379febd13 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/month/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.month +features: [Symbol, Temporal] +---*/ + +const month = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "month").get; + +assert.sameValue(typeof month, "function"); + +assert.throws(TypeError, () => month.call(undefined), "undefined"); +assert.throws(TypeError, () => month.call(null), "null"); +assert.throws(TypeError, () => month.call(true), "true"); +assert.throws(TypeError, () => month.call(""), "empty string"); +assert.throws(TypeError, () => month.call(Symbol()), "symbol"); +assert.throws(TypeError, () => month.call(1), "1"); +assert.throws(TypeError, () => month.call({}), "plain object"); +assert.throws(TypeError, () => month.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => month.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/monthCode/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/monthCode/branding.js new file mode 100644 index 00000000000..79642d714b8 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/monthCode/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.monthcode +features: [Symbol, Temporal] +---*/ + +const monthCode = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "monthCode").get; + +assert.sameValue(typeof monthCode, "function"); + +assert.throws(TypeError, () => monthCode.call(undefined), "undefined"); +assert.throws(TypeError, () => monthCode.call(null), "null"); +assert.throws(TypeError, () => monthCode.call(true), "true"); +assert.throws(TypeError, () => monthCode.call(""), "empty string"); +assert.throws(TypeError, () => monthCode.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthCode.call(1), "1"); +assert.throws(TypeError, () => monthCode.call({}), "plain object"); +assert.throws(TypeError, () => monthCode.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => monthCode.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/monthsInYear/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/monthsInYear/branding.js new file mode 100644 index 00000000000..8e24ff184c6 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/monthsInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.monthsinyear +features: [Symbol, Temporal] +---*/ + +const monthsInYear = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "monthsInYear").get; + +assert.sameValue(typeof monthsInYear, "function"); + +assert.throws(TypeError, () => monthsInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => monthsInYear.call(null), "null"); +assert.throws(TypeError, () => monthsInYear.call(true), "true"); +assert.throws(TypeError, () => monthsInYear.call(""), "empty string"); +assert.throws(TypeError, () => monthsInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthsInYear.call(1), "1"); +assert.throws(TypeError, () => monthsInYear.call({}), "plain object"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/nanosecond/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/nanosecond/branding.js new file mode 100644 index 00000000000..8bc92f08c43 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/nanosecond/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.nanosecond +features: [Symbol, Temporal] +---*/ + +const nanosecond = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "nanosecond").get; + +assert.sameValue(typeof nanosecond, "function"); + +assert.throws(TypeError, () => nanosecond.call(undefined), "undefined"); +assert.throws(TypeError, () => nanosecond.call(null), "null"); +assert.throws(TypeError, () => nanosecond.call(true), "true"); +assert.throws(TypeError, () => nanosecond.call(""), "empty string"); +assert.throws(TypeError, () => nanosecond.call(Symbol()), "symbol"); +assert.throws(TypeError, () => nanosecond.call(1), "1"); +assert.throws(TypeError, () => nanosecond.call({}), "plain object"); +assert.throws(TypeError, () => nanosecond.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => nanosecond.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/round/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/round/branding.js new file mode 100644 index 00000000000..4fb2d46ac97 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/round/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.round +features: [Symbol, Temporal] +---*/ + +const round = Temporal.PlainDateTime.prototype.round; + +assert.sameValue(typeof round, "function"); + +assert.throws(TypeError, () => round.call(undefined), "undefined"); +assert.throws(TypeError, () => round.call(null), "null"); +assert.throws(TypeError, () => round.call(true), "true"); +assert.throws(TypeError, () => round.call(""), "empty string"); +assert.throws(TypeError, () => round.call(Symbol()), "symbol"); +assert.throws(TypeError, () => round.call(1), "1"); +assert.throws(TypeError, () => round.call({}), "plain object"); +assert.throws(TypeError, () => round.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => round.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/second/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/second/branding.js new file mode 100644 index 00000000000..fef90b778ab --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/second/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.second +features: [Symbol, Temporal] +---*/ + +const second = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "second").get; + +assert.sameValue(typeof second, "function"); + +assert.throws(TypeError, () => second.call(undefined), "undefined"); +assert.throws(TypeError, () => second.call(null), "null"); +assert.throws(TypeError, () => second.call(true), "true"); +assert.throws(TypeError, () => second.call(""), "empty string"); +assert.throws(TypeError, () => second.call(Symbol()), "symbol"); +assert.throws(TypeError, () => second.call(1), "1"); +assert.throws(TypeError, () => second.call({}), "plain object"); +assert.throws(TypeError, () => second.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => second.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/since/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/since/branding.js new file mode 100644 index 00000000000..b4fe1333042 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/since/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.since +features: [Symbol, Temporal] +---*/ + +const since = Temporal.PlainDateTime.prototype.since; + +assert.sameValue(typeof since, "function"); + +assert.throws(TypeError, () => since.call(undefined), "undefined"); +assert.throws(TypeError, () => since.call(null), "null"); +assert.throws(TypeError, () => since.call(true), "true"); +assert.throws(TypeError, () => since.call(""), "empty string"); +assert.throws(TypeError, () => since.call(Symbol()), "symbol"); +assert.throws(TypeError, () => since.call(1), "1"); +assert.throws(TypeError, () => since.call({}), "plain object"); +assert.throws(TypeError, () => since.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => since.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/subtract/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/subtract/branding.js new file mode 100644 index 00000000000..13cc165b66f --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/subtract/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.subtract +features: [Symbol, Temporal] +---*/ + +const subtract = Temporal.PlainDateTime.prototype.subtract; + +assert.sameValue(typeof subtract, "function"); + +assert.throws(TypeError, () => subtract.call(undefined), "undefined"); +assert.throws(TypeError, () => subtract.call(null), "null"); +assert.throws(TypeError, () => subtract.call(true), "true"); +assert.throws(TypeError, () => subtract.call(""), "empty string"); +assert.throws(TypeError, () => subtract.call(Symbol()), "symbol"); +assert.throws(TypeError, () => subtract.call(1), "1"); +assert.throws(TypeError, () => subtract.call({}), "plain object"); +assert.throws(TypeError, () => subtract.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => subtract.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toJSON/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/toJSON/branding.js new file mode 100644 index 00000000000..f25ae767845 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toJSON/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.tojson +features: [Symbol, Temporal] +---*/ + +const toJSON = Temporal.PlainDateTime.prototype.toJSON; + +assert.sameValue(typeof toJSON, "function"); + +assert.throws(TypeError, () => toJSON.call(undefined), "undefined"); +assert.throws(TypeError, () => toJSON.call(null), "null"); +assert.throws(TypeError, () => toJSON.call(true), "true"); +assert.throws(TypeError, () => toJSON.call(""), "empty string"); +assert.throws(TypeError, () => toJSON.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toJSON.call(1), "1"); +assert.throws(TypeError, () => toJSON.call({}), "plain object"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toLocaleString/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/toLocaleString/branding.js new file mode 100644 index 00000000000..177792ec582 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toLocaleString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.tolocalestring +features: [Symbol, Temporal] +---*/ + +const toLocaleString = Temporal.PlainDateTime.prototype.toLocaleString; + +assert.sameValue(typeof toLocaleString, "function"); + +assert.throws(TypeError, () => toLocaleString.call(undefined), "undefined"); +assert.throws(TypeError, () => toLocaleString.call(null), "null"); +assert.throws(TypeError, () => toLocaleString.call(true), "true"); +assert.throws(TypeError, () => toLocaleString.call(""), "empty string"); +assert.throws(TypeError, () => toLocaleString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toLocaleString.call(1), "1"); +assert.throws(TypeError, () => toLocaleString.call({}), "plain object"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toPlainDate/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/toPlainDate/branding.js new file mode 100644 index 00000000000..d2c9c9af382 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toPlainDate/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.toplaindate +features: [Symbol, Temporal] +---*/ + +const toPlainDate = Temporal.PlainDateTime.prototype.toPlainDate; + +assert.sameValue(typeof toPlainDate, "function"); + +assert.throws(TypeError, () => toPlainDate.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainDate.call(null), "null"); +assert.throws(TypeError, () => toPlainDate.call(true), "true"); +assert.throws(TypeError, () => toPlainDate.call(""), "empty string"); +assert.throws(TypeError, () => toPlainDate.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainDate.call(1), "1"); +assert.throws(TypeError, () => toPlainDate.call({}), "plain object"); +assert.throws(TypeError, () => toPlainDate.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => toPlainDate.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toPlainMonthDay/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/toPlainMonthDay/branding.js new file mode 100644 index 00000000000..4f879b03d71 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toPlainMonthDay/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.toplainmonthday +features: [Symbol, Temporal] +---*/ + +const toPlainMonthDay = Temporal.PlainDateTime.prototype.toPlainMonthDay; + +assert.sameValue(typeof toPlainMonthDay, "function"); + +assert.throws(TypeError, () => toPlainMonthDay.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainMonthDay.call(null), "null"); +assert.throws(TypeError, () => toPlainMonthDay.call(true), "true"); +assert.throws(TypeError, () => toPlainMonthDay.call(""), "empty string"); +assert.throws(TypeError, () => toPlainMonthDay.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainMonthDay.call(1), "1"); +assert.throws(TypeError, () => toPlainMonthDay.call({}), "plain object"); +assert.throws(TypeError, () => toPlainMonthDay.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => toPlainMonthDay.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toPlainTime/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/toPlainTime/branding.js new file mode 100644 index 00000000000..ce3a33bed8b --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toPlainTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.toplaintime +features: [Symbol, Temporal] +---*/ + +const toPlainTime = Temporal.PlainDateTime.prototype.toPlainTime; + +assert.sameValue(typeof toPlainTime, "function"); + +assert.throws(TypeError, () => toPlainTime.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainTime.call(null), "null"); +assert.throws(TypeError, () => toPlainTime.call(true), "true"); +assert.throws(TypeError, () => toPlainTime.call(""), "empty string"); +assert.throws(TypeError, () => toPlainTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainTime.call(1), "1"); +assert.throws(TypeError, () => toPlainTime.call({}), "plain object"); +assert.throws(TypeError, () => toPlainTime.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => toPlainTime.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toPlainYearMonth/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/toPlainYearMonth/branding.js new file mode 100644 index 00000000000..0a6b3c81bad --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toPlainYearMonth/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.toplainyearmonth +features: [Symbol, Temporal] +---*/ + +const toPlainYearMonth = Temporal.PlainDateTime.prototype.toPlainYearMonth; + +assert.sameValue(typeof toPlainYearMonth, "function"); + +assert.throws(TypeError, () => toPlainYearMonth.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainYearMonth.call(null), "null"); +assert.throws(TypeError, () => toPlainYearMonth.call(true), "true"); +assert.throws(TypeError, () => toPlainYearMonth.call(""), "empty string"); +assert.throws(TypeError, () => toPlainYearMonth.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainYearMonth.call(1), "1"); +assert.throws(TypeError, () => toPlainYearMonth.call({}), "plain object"); +assert.throws(TypeError, () => toPlainYearMonth.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => toPlainYearMonth.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toString/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/toString/branding.js new file mode 100644 index 00000000000..30d724fdb3f --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.PlainDateTime.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => toString.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toZonedDateTime/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/toZonedDateTime/branding.js new file mode 100644 index 00000000000..5d9bb3081ff --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toZonedDateTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.tozoneddatetime +features: [Symbol, Temporal] +---*/ + +const toZonedDateTime = Temporal.PlainDateTime.prototype.toZonedDateTime; + +assert.sameValue(typeof toZonedDateTime, "function"); + +assert.throws(TypeError, () => toZonedDateTime.call(undefined), "undefined"); +assert.throws(TypeError, () => toZonedDateTime.call(null), "null"); +assert.throws(TypeError, () => toZonedDateTime.call(true), "true"); +assert.throws(TypeError, () => toZonedDateTime.call(""), "empty string"); +assert.throws(TypeError, () => toZonedDateTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toZonedDateTime.call(1), "1"); +assert.throws(TypeError, () => toZonedDateTime.call({}), "plain object"); +assert.throws(TypeError, () => toZonedDateTime.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => toZonedDateTime.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/until/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/until/branding.js new file mode 100644 index 00000000000..d88938d81c5 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/until/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.until +features: [Symbol, Temporal] +---*/ + +const until = Temporal.PlainDateTime.prototype.until; + +assert.sameValue(typeof until, "function"); + +assert.throws(TypeError, () => until.call(undefined), "undefined"); +assert.throws(TypeError, () => until.call(null), "null"); +assert.throws(TypeError, () => until.call(true), "true"); +assert.throws(TypeError, () => until.call(""), "empty string"); +assert.throws(TypeError, () => until.call(Symbol()), "symbol"); +assert.throws(TypeError, () => until.call(1), "1"); +assert.throws(TypeError, () => until.call({}), "plain object"); +assert.throws(TypeError, () => until.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => until.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/valueOf/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/valueOf/branding.js new file mode 100644 index 00000000000..508c2dfbea2 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/valueOf/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.valueof +features: [Symbol, Temporal] +---*/ + +const valueOf = Temporal.PlainDateTime.prototype.valueOf; + +assert.sameValue(typeof valueOf, "function"); + +assert.throws(TypeError, () => valueOf.call(undefined), "undefined"); +assert.throws(TypeError, () => valueOf.call(null), "null"); +assert.throws(TypeError, () => valueOf.call(true), "true"); +assert.throws(TypeError, () => valueOf.call(""), "empty string"); +assert.throws(TypeError, () => valueOf.call(Symbol()), "symbol"); +assert.throws(TypeError, () => valueOf.call(1), "1"); +assert.throws(TypeError, () => valueOf.call({}), "plain object"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/weekOfYear/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/weekOfYear/branding.js new file mode 100644 index 00000000000..b0b0733fe90 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/weekOfYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.weekofyear +features: [Symbol, Temporal] +---*/ + +const weekOfYear = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "weekOfYear").get; + +assert.sameValue(typeof weekOfYear, "function"); + +assert.throws(TypeError, () => weekOfYear.call(undefined), "undefined"); +assert.throws(TypeError, () => weekOfYear.call(null), "null"); +assert.throws(TypeError, () => weekOfYear.call(true), "true"); +assert.throws(TypeError, () => weekOfYear.call(""), "empty string"); +assert.throws(TypeError, () => weekOfYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => weekOfYear.call(1), "1"); +assert.throws(TypeError, () => weekOfYear.call({}), "plain object"); +assert.throws(TypeError, () => weekOfYear.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => weekOfYear.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/with/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/with/branding.js new file mode 100644 index 00000000000..a38b54195c5 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/with/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.with +features: [Symbol, Temporal] +---*/ + +const with_ = Temporal.PlainDateTime.prototype.with; + +assert.sameValue(typeof with_, "function"); + +assert.throws(TypeError, () => with_.call(undefined), "undefined"); +assert.throws(TypeError, () => with_.call(null), "null"); +assert.throws(TypeError, () => with_.call(true), "true"); +assert.throws(TypeError, () => with_.call(""), "empty string"); +assert.throws(TypeError, () => with_.call(Symbol()), "symbol"); +assert.throws(TypeError, () => with_.call(1), "1"); +assert.throws(TypeError, () => with_.call({}), "plain object"); +assert.throws(TypeError, () => with_.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => with_.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/withCalendar/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/withCalendar/branding.js new file mode 100644 index 00000000000..8d7dd933c35 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/withCalendar/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.withcalendar +features: [Symbol, Temporal] +---*/ + +const withCalendar = Temporal.PlainDateTime.prototype.withCalendar; + +assert.sameValue(typeof withCalendar, "function"); + +assert.throws(TypeError, () => withCalendar.call(undefined), "undefined"); +assert.throws(TypeError, () => withCalendar.call(null), "null"); +assert.throws(TypeError, () => withCalendar.call(true), "true"); +assert.throws(TypeError, () => withCalendar.call(""), "empty string"); +assert.throws(TypeError, () => withCalendar.call(Symbol()), "symbol"); +assert.throws(TypeError, () => withCalendar.call(1), "1"); +assert.throws(TypeError, () => withCalendar.call({}), "plain object"); +assert.throws(TypeError, () => withCalendar.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => withCalendar.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/branding.js new file mode 100644 index 00000000000..69186789fe8 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/withPlainDate/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.withplaindate +features: [Symbol, Temporal] +---*/ + +const withPlainDate = Temporal.PlainDateTime.prototype.withPlainDate; + +assert.sameValue(typeof withPlainDate, "function"); + +assert.throws(TypeError, () => withPlainDate.call(undefined), "undefined"); +assert.throws(TypeError, () => withPlainDate.call(null), "null"); +assert.throws(TypeError, () => withPlainDate.call(true), "true"); +assert.throws(TypeError, () => withPlainDate.call(""), "empty string"); +assert.throws(TypeError, () => withPlainDate.call(Symbol()), "symbol"); +assert.throws(TypeError, () => withPlainDate.call(1), "1"); +assert.throws(TypeError, () => withPlainDate.call({}), "plain object"); +assert.throws(TypeError, () => withPlainDate.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => withPlainDate.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/withPlainTime/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/withPlainTime/branding.js new file mode 100644 index 00000000000..3a72f8ea676 --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/withPlainTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.withplaintime +features: [Symbol, Temporal] +---*/ + +const withPlainTime = Temporal.PlainDateTime.prototype.withPlainTime; + +assert.sameValue(typeof withPlainTime, "function"); + +assert.throws(TypeError, () => withPlainTime.call(undefined), "undefined"); +assert.throws(TypeError, () => withPlainTime.call(null), "null"); +assert.throws(TypeError, () => withPlainTime.call(true), "true"); +assert.throws(TypeError, () => withPlainTime.call(""), "empty string"); +assert.throws(TypeError, () => withPlainTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => withPlainTime.call(1), "1"); +assert.throws(TypeError, () => withPlainTime.call({}), "plain object"); +assert.throws(TypeError, () => withPlainTime.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => withPlainTime.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/year/branding.js b/test/built-ins/Temporal/PlainDateTime/prototype/year/branding.js new file mode 100644 index 00000000000..743e6ca746b --- /dev/null +++ b/test/built-ins/Temporal/PlainDateTime/prototype/year/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaindatetime.prototype.year +features: [Symbol, Temporal] +---*/ + +const year = Object.getOwnPropertyDescriptor(Temporal.PlainDateTime.prototype, "year").get; + +assert.sameValue(typeof year, "function"); + +assert.throws(TypeError, () => year.call(undefined), "undefined"); +assert.throws(TypeError, () => year.call(null), "null"); +assert.throws(TypeError, () => year.call(true), "true"); +assert.throws(TypeError, () => year.call(""), "empty string"); +assert.throws(TypeError, () => year.call(Symbol()), "symbol"); +assert.throws(TypeError, () => year.call(1), "1"); +assert.throws(TypeError, () => year.call({}), "plain object"); +assert.throws(TypeError, () => year.call(Temporal.PlainDateTime), "Temporal.PlainDateTime"); +assert.throws(TypeError, () => year.call(Temporal.PlainDateTime.prototype), "Temporal.PlainDateTime.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/calendar/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/calendar/branding.js new file mode 100644 index 00000000000..bfb00732dde --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/calendar/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainmonthday.prototype.calendar +features: [Symbol, Temporal] +---*/ + +const calendar = Object.getOwnPropertyDescriptor(Temporal.PlainMonthDay.prototype, "calendar").get; + +assert.sameValue(typeof calendar, "function"); + +assert.throws(TypeError, () => calendar.call(undefined), "undefined"); +assert.throws(TypeError, () => calendar.call(null), "null"); +assert.throws(TypeError, () => calendar.call(true), "true"); +assert.throws(TypeError, () => calendar.call(""), "empty string"); +assert.throws(TypeError, () => calendar.call(Symbol()), "symbol"); +assert.throws(TypeError, () => calendar.call(1), "1"); +assert.throws(TypeError, () => calendar.call({}), "plain object"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/day/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/day/branding.js new file mode 100644 index 00000000000..8a6fe032445 --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/day/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainmonthday.prototype.day +features: [Symbol, Temporal] +---*/ + +const day = Object.getOwnPropertyDescriptor(Temporal.PlainMonthDay.prototype, "day").get; + +assert.sameValue(typeof day, "function"); + +assert.throws(TypeError, () => day.call(undefined), "undefined"); +assert.throws(TypeError, () => day.call(null), "null"); +assert.throws(TypeError, () => day.call(true), "true"); +assert.throws(TypeError, () => day.call(""), "empty string"); +assert.throws(TypeError, () => day.call(Symbol()), "symbol"); +assert.throws(TypeError, () => day.call(1), "1"); +assert.throws(TypeError, () => day.call({}), "plain object"); +assert.throws(TypeError, () => day.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => day.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/equals/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/equals/branding.js new file mode 100644 index 00000000000..a196506cd78 --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/equals/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainmonthday.prototype.equals +features: [Symbol, Temporal] +---*/ + +const equals = Temporal.PlainMonthDay.prototype.equals; + +assert.sameValue(typeof equals, "function"); + +assert.throws(TypeError, () => equals.call(undefined), "undefined"); +assert.throws(TypeError, () => equals.call(null), "null"); +assert.throws(TypeError, () => equals.call(true), "true"); +assert.throws(TypeError, () => equals.call(""), "empty string"); +assert.throws(TypeError, () => equals.call(Symbol()), "symbol"); +assert.throws(TypeError, () => equals.call(1), "1"); +assert.throws(TypeError, () => equals.call({}), "plain object"); +assert.throws(TypeError, () => equals.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => equals.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/getISOFields/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/getISOFields/branding.js new file mode 100644 index 00000000000..9f9a7a0b925 --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/getISOFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainmonthday.prototype.getisofields +features: [Symbol, Temporal] +---*/ + +const getISOFields = Temporal.PlainMonthDay.prototype.getISOFields; + +assert.sameValue(typeof getISOFields, "function"); + +assert.throws(TypeError, () => getISOFields.call(undefined), "undefined"); +assert.throws(TypeError, () => getISOFields.call(null), "null"); +assert.throws(TypeError, () => getISOFields.call(true), "true"); +assert.throws(TypeError, () => getISOFields.call(""), "empty string"); +assert.throws(TypeError, () => getISOFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getISOFields.call(1), "1"); +assert.throws(TypeError, () => getISOFields.call({}), "plain object"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/monthCode/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/monthCode/branding.js new file mode 100644 index 00000000000..2afe76cb007 --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/monthCode/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainmonthday.prototype.monthcode +features: [Symbol, Temporal] +---*/ + +const monthCode = Object.getOwnPropertyDescriptor(Temporal.PlainMonthDay.prototype, "monthCode").get; + +assert.sameValue(typeof monthCode, "function"); + +assert.throws(TypeError, () => monthCode.call(undefined), "undefined"); +assert.throws(TypeError, () => monthCode.call(null), "null"); +assert.throws(TypeError, () => monthCode.call(true), "true"); +assert.throws(TypeError, () => monthCode.call(""), "empty string"); +assert.throws(TypeError, () => monthCode.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthCode.call(1), "1"); +assert.throws(TypeError, () => monthCode.call({}), "plain object"); +assert.throws(TypeError, () => monthCode.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => monthCode.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/toJSON/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/toJSON/branding.js new file mode 100644 index 00000000000..5eefe5a2147 --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/toJSON/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainmonthday.prototype.tojson +features: [Symbol, Temporal] +---*/ + +const toJSON = Temporal.PlainMonthDay.prototype.toJSON; + +assert.sameValue(typeof toJSON, "function"); + +assert.throws(TypeError, () => toJSON.call(undefined), "undefined"); +assert.throws(TypeError, () => toJSON.call(null), "null"); +assert.throws(TypeError, () => toJSON.call(true), "true"); +assert.throws(TypeError, () => toJSON.call(""), "empty string"); +assert.throws(TypeError, () => toJSON.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toJSON.call(1), "1"); +assert.throws(TypeError, () => toJSON.call({}), "plain object"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/toLocaleString/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/toLocaleString/branding.js new file mode 100644 index 00000000000..1c0d063786d --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/toLocaleString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainmonthday.prototype.tolocalestring +features: [Symbol, Temporal] +---*/ + +const toLocaleString = Temporal.PlainMonthDay.prototype.toLocaleString; + +assert.sameValue(typeof toLocaleString, "function"); + +assert.throws(TypeError, () => toLocaleString.call(undefined), "undefined"); +assert.throws(TypeError, () => toLocaleString.call(null), "null"); +assert.throws(TypeError, () => toLocaleString.call(true), "true"); +assert.throws(TypeError, () => toLocaleString.call(""), "empty string"); +assert.throws(TypeError, () => toLocaleString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toLocaleString.call(1), "1"); +assert.throws(TypeError, () => toLocaleString.call({}), "plain object"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/branding.js new file mode 100644 index 00000000000..b6f401401fd --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainmonthday.prototype.toplaindate +features: [Symbol, Temporal] +---*/ + +const toPlainDate = Temporal.PlainMonthDay.prototype.toPlainDate; + +assert.sameValue(typeof toPlainDate, "function"); + +assert.throws(TypeError, () => toPlainDate.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainDate.call(null), "null"); +assert.throws(TypeError, () => toPlainDate.call(true), "true"); +assert.throws(TypeError, () => toPlainDate.call(""), "empty string"); +assert.throws(TypeError, () => toPlainDate.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainDate.call(1), "1"); +assert.throws(TypeError, () => toPlainDate.call({}), "plain object"); +assert.throws(TypeError, () => toPlainDate.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => toPlainDate.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/toString/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/toString/branding.js new file mode 100644 index 00000000000..57679cba0f7 --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainmonthday.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.PlainMonthDay.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => toString.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/valueOf/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/valueOf/branding.js new file mode 100644 index 00000000000..930fa168cff --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/valueOf/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainmonthday.prototype.valueof +features: [Symbol, Temporal] +---*/ + +const valueOf = Temporal.PlainMonthDay.prototype.valueOf; + +assert.sameValue(typeof valueOf, "function"); + +assert.throws(TypeError, () => valueOf.call(undefined), "undefined"); +assert.throws(TypeError, () => valueOf.call(null), "null"); +assert.throws(TypeError, () => valueOf.call(true), "true"); +assert.throws(TypeError, () => valueOf.call(""), "empty string"); +assert.throws(TypeError, () => valueOf.call(Symbol()), "symbol"); +assert.throws(TypeError, () => valueOf.call(1), "1"); +assert.throws(TypeError, () => valueOf.call({}), "plain object"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainMonthDay/prototype/with/branding.js b/test/built-ins/Temporal/PlainMonthDay/prototype/with/branding.js new file mode 100644 index 00000000000..5edb02defb0 --- /dev/null +++ b/test/built-ins/Temporal/PlainMonthDay/prototype/with/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainmonthday.prototype.with +features: [Symbol, Temporal] +---*/ + +const with_ = Temporal.PlainMonthDay.prototype.with; + +assert.sameValue(typeof with_, "function"); + +assert.throws(TypeError, () => with_.call(undefined), "undefined"); +assert.throws(TypeError, () => with_.call(null), "null"); +assert.throws(TypeError, () => with_.call(true), "true"); +assert.throws(TypeError, () => with_.call(""), "empty string"); +assert.throws(TypeError, () => with_.call(Symbol()), "symbol"); +assert.throws(TypeError, () => with_.call(1), "1"); +assert.throws(TypeError, () => with_.call({}), "plain object"); +assert.throws(TypeError, () => with_.call(Temporal.PlainMonthDay), "Temporal.PlainMonthDay"); +assert.throws(TypeError, () => with_.call(Temporal.PlainMonthDay.prototype), "Temporal.PlainMonthDay.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/add/branding.js b/test/built-ins/Temporal/PlainTime/prototype/add/branding.js new file mode 100644 index 00000000000..33acc59f886 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/add/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.add +features: [Symbol, Temporal] +---*/ + +const add = Temporal.PlainTime.prototype.add; + +assert.sameValue(typeof add, "function"); + +assert.throws(TypeError, () => add.call(undefined), "undefined"); +assert.throws(TypeError, () => add.call(null), "null"); +assert.throws(TypeError, () => add.call(true), "true"); +assert.throws(TypeError, () => add.call(""), "empty string"); +assert.throws(TypeError, () => add.call(Symbol()), "symbol"); +assert.throws(TypeError, () => add.call(1), "1"); +assert.throws(TypeError, () => add.call({}), "plain object"); +assert.throws(TypeError, () => add.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => add.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/calendar/branding.js b/test/built-ins/Temporal/PlainTime/prototype/calendar/branding.js new file mode 100644 index 00000000000..369feff8b9c --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/calendar/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaintime.prototype.calendar +features: [Symbol, Temporal] +---*/ + +const calendar = Object.getOwnPropertyDescriptor(Temporal.PlainTime.prototype, "calendar").get; + +assert.sameValue(typeof calendar, "function"); + +assert.throws(TypeError, () => calendar.call(undefined), "undefined"); +assert.throws(TypeError, () => calendar.call(null), "null"); +assert.throws(TypeError, () => calendar.call(true), "true"); +assert.throws(TypeError, () => calendar.call(""), "empty string"); +assert.throws(TypeError, () => calendar.call(Symbol()), "symbol"); +assert.throws(TypeError, () => calendar.call(1), "1"); +assert.throws(TypeError, () => calendar.call({}), "plain object"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/equals/branding.js b/test/built-ins/Temporal/PlainTime/prototype/equals/branding.js new file mode 100644 index 00000000000..c5bbc4a596e --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/equals/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.equals +features: [Symbol, Temporal] +---*/ + +const equals = Temporal.PlainTime.prototype.equals; + +assert.sameValue(typeof equals, "function"); + +assert.throws(TypeError, () => equals.call(undefined), "undefined"); +assert.throws(TypeError, () => equals.call(null), "null"); +assert.throws(TypeError, () => equals.call(true), "true"); +assert.throws(TypeError, () => equals.call(""), "empty string"); +assert.throws(TypeError, () => equals.call(Symbol()), "symbol"); +assert.throws(TypeError, () => equals.call(1), "1"); +assert.throws(TypeError, () => equals.call({}), "plain object"); +assert.throws(TypeError, () => equals.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => equals.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/getISOFields/branding.js b/test/built-ins/Temporal/PlainTime/prototype/getISOFields/branding.js new file mode 100644 index 00000000000..bee82293eba --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/getISOFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.getisofields +features: [Symbol, Temporal] +---*/ + +const getISOFields = Temporal.PlainTime.prototype.getISOFields; + +assert.sameValue(typeof getISOFields, "function"); + +assert.throws(TypeError, () => getISOFields.call(undefined), "undefined"); +assert.throws(TypeError, () => getISOFields.call(null), "null"); +assert.throws(TypeError, () => getISOFields.call(true), "true"); +assert.throws(TypeError, () => getISOFields.call(""), "empty string"); +assert.throws(TypeError, () => getISOFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getISOFields.call(1), "1"); +assert.throws(TypeError, () => getISOFields.call({}), "plain object"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/hour/branding.js b/test/built-ins/Temporal/PlainTime/prototype/hour/branding.js new file mode 100644 index 00000000000..53be4e33a6f --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/hour/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaintime.prototype.hour +features: [Symbol, Temporal] +---*/ + +const hour = Object.getOwnPropertyDescriptor(Temporal.PlainTime.prototype, "hour").get; + +assert.sameValue(typeof hour, "function"); + +assert.throws(TypeError, () => hour.call(undefined), "undefined"); +assert.throws(TypeError, () => hour.call(null), "null"); +assert.throws(TypeError, () => hour.call(true), "true"); +assert.throws(TypeError, () => hour.call(""), "empty string"); +assert.throws(TypeError, () => hour.call(Symbol()), "symbol"); +assert.throws(TypeError, () => hour.call(1), "1"); +assert.throws(TypeError, () => hour.call({}), "plain object"); +assert.throws(TypeError, () => hour.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => hour.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/microsecond/branding.js b/test/built-ins/Temporal/PlainTime/prototype/microsecond/branding.js new file mode 100644 index 00000000000..ee04e949184 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/microsecond/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaintime.prototype.microsecond +features: [Symbol, Temporal] +---*/ + +const microsecond = Object.getOwnPropertyDescriptor(Temporal.PlainTime.prototype, "microsecond").get; + +assert.sameValue(typeof microsecond, "function"); + +assert.throws(TypeError, () => microsecond.call(undefined), "undefined"); +assert.throws(TypeError, () => microsecond.call(null), "null"); +assert.throws(TypeError, () => microsecond.call(true), "true"); +assert.throws(TypeError, () => microsecond.call(""), "empty string"); +assert.throws(TypeError, () => microsecond.call(Symbol()), "symbol"); +assert.throws(TypeError, () => microsecond.call(1), "1"); +assert.throws(TypeError, () => microsecond.call({}), "plain object"); +assert.throws(TypeError, () => microsecond.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => microsecond.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/millisecond/branding.js b/test/built-ins/Temporal/PlainTime/prototype/millisecond/branding.js new file mode 100644 index 00000000000..66467f5696b --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/millisecond/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaintime.prototype.millisecond +features: [Symbol, Temporal] +---*/ + +const millisecond = Object.getOwnPropertyDescriptor(Temporal.PlainTime.prototype, "millisecond").get; + +assert.sameValue(typeof millisecond, "function"); + +assert.throws(TypeError, () => millisecond.call(undefined), "undefined"); +assert.throws(TypeError, () => millisecond.call(null), "null"); +assert.throws(TypeError, () => millisecond.call(true), "true"); +assert.throws(TypeError, () => millisecond.call(""), "empty string"); +assert.throws(TypeError, () => millisecond.call(Symbol()), "symbol"); +assert.throws(TypeError, () => millisecond.call(1), "1"); +assert.throws(TypeError, () => millisecond.call({}), "plain object"); +assert.throws(TypeError, () => millisecond.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => millisecond.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/minute/branding.js b/test/built-ins/Temporal/PlainTime/prototype/minute/branding.js new file mode 100644 index 00000000000..38d724e8e4a --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/minute/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaintime.prototype.minute +features: [Symbol, Temporal] +---*/ + +const minute = Object.getOwnPropertyDescriptor(Temporal.PlainTime.prototype, "minute").get; + +assert.sameValue(typeof minute, "function"); + +assert.throws(TypeError, () => minute.call(undefined), "undefined"); +assert.throws(TypeError, () => minute.call(null), "null"); +assert.throws(TypeError, () => minute.call(true), "true"); +assert.throws(TypeError, () => minute.call(""), "empty string"); +assert.throws(TypeError, () => minute.call(Symbol()), "symbol"); +assert.throws(TypeError, () => minute.call(1), "1"); +assert.throws(TypeError, () => minute.call({}), "plain object"); +assert.throws(TypeError, () => minute.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => minute.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/nanosecond/branding.js b/test/built-ins/Temporal/PlainTime/prototype/nanosecond/branding.js new file mode 100644 index 00000000000..3dde913989c --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/nanosecond/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaintime.prototype.nanosecond +features: [Symbol, Temporal] +---*/ + +const nanosecond = Object.getOwnPropertyDescriptor(Temporal.PlainTime.prototype, "nanosecond").get; + +assert.sameValue(typeof nanosecond, "function"); + +assert.throws(TypeError, () => nanosecond.call(undefined), "undefined"); +assert.throws(TypeError, () => nanosecond.call(null), "null"); +assert.throws(TypeError, () => nanosecond.call(true), "true"); +assert.throws(TypeError, () => nanosecond.call(""), "empty string"); +assert.throws(TypeError, () => nanosecond.call(Symbol()), "symbol"); +assert.throws(TypeError, () => nanosecond.call(1), "1"); +assert.throws(TypeError, () => nanosecond.call({}), "plain object"); +assert.throws(TypeError, () => nanosecond.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => nanosecond.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/round/branding.js b/test/built-ins/Temporal/PlainTime/prototype/round/branding.js new file mode 100644 index 00000000000..009c7a7f197 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/round/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.round +features: [Symbol, Temporal] +---*/ + +const round = Temporal.PlainTime.prototype.round; + +assert.sameValue(typeof round, "function"); + +assert.throws(TypeError, () => round.call(undefined), "undefined"); +assert.throws(TypeError, () => round.call(null), "null"); +assert.throws(TypeError, () => round.call(true), "true"); +assert.throws(TypeError, () => round.call(""), "empty string"); +assert.throws(TypeError, () => round.call(Symbol()), "symbol"); +assert.throws(TypeError, () => round.call(1), "1"); +assert.throws(TypeError, () => round.call({}), "plain object"); +assert.throws(TypeError, () => round.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => round.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/second/branding.js b/test/built-ins/Temporal/PlainTime/prototype/second/branding.js new file mode 100644 index 00000000000..1ce2adedc01 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/second/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plaintime.prototype.second +features: [Symbol, Temporal] +---*/ + +const second = Object.getOwnPropertyDescriptor(Temporal.PlainTime.prototype, "second").get; + +assert.sameValue(typeof second, "function"); + +assert.throws(TypeError, () => second.call(undefined), "undefined"); +assert.throws(TypeError, () => second.call(null), "null"); +assert.throws(TypeError, () => second.call(true), "true"); +assert.throws(TypeError, () => second.call(""), "empty string"); +assert.throws(TypeError, () => second.call(Symbol()), "symbol"); +assert.throws(TypeError, () => second.call(1), "1"); +assert.throws(TypeError, () => second.call({}), "plain object"); +assert.throws(TypeError, () => second.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => second.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/since/branding.js b/test/built-ins/Temporal/PlainTime/prototype/since/branding.js new file mode 100644 index 00000000000..5a30b9f3fab --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/since/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.since +features: [Symbol, Temporal] +---*/ + +const since = Temporal.PlainTime.prototype.since; + +assert.sameValue(typeof since, "function"); + +assert.throws(TypeError, () => since.call(undefined), "undefined"); +assert.throws(TypeError, () => since.call(null), "null"); +assert.throws(TypeError, () => since.call(true), "true"); +assert.throws(TypeError, () => since.call(""), "empty string"); +assert.throws(TypeError, () => since.call(Symbol()), "symbol"); +assert.throws(TypeError, () => since.call(1), "1"); +assert.throws(TypeError, () => since.call({}), "plain object"); +assert.throws(TypeError, () => since.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => since.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/subtract/branding.js b/test/built-ins/Temporal/PlainTime/prototype/subtract/branding.js new file mode 100644 index 00000000000..2394bb1461f --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/subtract/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.subtract +features: [Symbol, Temporal] +---*/ + +const subtract = Temporal.PlainTime.prototype.subtract; + +assert.sameValue(typeof subtract, "function"); + +assert.throws(TypeError, () => subtract.call(undefined), "undefined"); +assert.throws(TypeError, () => subtract.call(null), "null"); +assert.throws(TypeError, () => subtract.call(true), "true"); +assert.throws(TypeError, () => subtract.call(""), "empty string"); +assert.throws(TypeError, () => subtract.call(Symbol()), "symbol"); +assert.throws(TypeError, () => subtract.call(1), "1"); +assert.throws(TypeError, () => subtract.call({}), "plain object"); +assert.throws(TypeError, () => subtract.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => subtract.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/toJSON/branding.js b/test/built-ins/Temporal/PlainTime/prototype/toJSON/branding.js new file mode 100644 index 00000000000..e4c3f1407cd --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/toJSON/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.tojson +features: [Symbol, Temporal] +---*/ + +const toJSON = Temporal.PlainTime.prototype.toJSON; + +assert.sameValue(typeof toJSON, "function"); + +assert.throws(TypeError, () => toJSON.call(undefined), "undefined"); +assert.throws(TypeError, () => toJSON.call(null), "null"); +assert.throws(TypeError, () => toJSON.call(true), "true"); +assert.throws(TypeError, () => toJSON.call(""), "empty string"); +assert.throws(TypeError, () => toJSON.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toJSON.call(1), "1"); +assert.throws(TypeError, () => toJSON.call({}), "plain object"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/toLocaleString/branding.js b/test/built-ins/Temporal/PlainTime/prototype/toLocaleString/branding.js new file mode 100644 index 00000000000..6adbdc220cd --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/toLocaleString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.tolocalestring +features: [Symbol, Temporal] +---*/ + +const toLocaleString = Temporal.PlainTime.prototype.toLocaleString; + +assert.sameValue(typeof toLocaleString, "function"); + +assert.throws(TypeError, () => toLocaleString.call(undefined), "undefined"); +assert.throws(TypeError, () => toLocaleString.call(null), "null"); +assert.throws(TypeError, () => toLocaleString.call(true), "true"); +assert.throws(TypeError, () => toLocaleString.call(""), "empty string"); +assert.throws(TypeError, () => toLocaleString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toLocaleString.call(1), "1"); +assert.throws(TypeError, () => toLocaleString.call({}), "plain object"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/branding.js b/test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/branding.js new file mode 100644 index 00000000000..0cb7bd844c9 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/toPlainDateTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.toplaindatetime +features: [Symbol, Temporal] +---*/ + +const toPlainDateTime = Temporal.PlainTime.prototype.toPlainDateTime; + +assert.sameValue(typeof toPlainDateTime, "function"); + +assert.throws(TypeError, () => toPlainDateTime.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainDateTime.call(null), "null"); +assert.throws(TypeError, () => toPlainDateTime.call(true), "true"); +assert.throws(TypeError, () => toPlainDateTime.call(""), "empty string"); +assert.throws(TypeError, () => toPlainDateTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainDateTime.call(1), "1"); +assert.throws(TypeError, () => toPlainDateTime.call({}), "plain object"); +assert.throws(TypeError, () => toPlainDateTime.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => toPlainDateTime.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/toString/branding.js b/test/built-ins/Temporal/PlainTime/prototype/toString/branding.js new file mode 100644 index 00000000000..baf4f9cc3e4 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.PlainTime.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => toString.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/branding.js b/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/branding.js new file mode 100644 index 00000000000..677130e0008 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.tozoneddatetime +features: [Symbol, Temporal] +---*/ + +const toZonedDateTime = Temporal.PlainTime.prototype.toZonedDateTime; + +assert.sameValue(typeof toZonedDateTime, "function"); + +assert.throws(TypeError, () => toZonedDateTime.call(undefined), "undefined"); +assert.throws(TypeError, () => toZonedDateTime.call(null), "null"); +assert.throws(TypeError, () => toZonedDateTime.call(true), "true"); +assert.throws(TypeError, () => toZonedDateTime.call(""), "empty string"); +assert.throws(TypeError, () => toZonedDateTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toZonedDateTime.call(1), "1"); +assert.throws(TypeError, () => toZonedDateTime.call({}), "plain object"); +assert.throws(TypeError, () => toZonedDateTime.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => toZonedDateTime.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/until/branding.js b/test/built-ins/Temporal/PlainTime/prototype/until/branding.js new file mode 100644 index 00000000000..81d5c37e185 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/until/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.until +features: [Symbol, Temporal] +---*/ + +const until = Temporal.PlainTime.prototype.until; + +assert.sameValue(typeof until, "function"); + +assert.throws(TypeError, () => until.call(undefined), "undefined"); +assert.throws(TypeError, () => until.call(null), "null"); +assert.throws(TypeError, () => until.call(true), "true"); +assert.throws(TypeError, () => until.call(""), "empty string"); +assert.throws(TypeError, () => until.call(Symbol()), "symbol"); +assert.throws(TypeError, () => until.call(1), "1"); +assert.throws(TypeError, () => until.call({}), "plain object"); +assert.throws(TypeError, () => until.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => until.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/valueOf/branding.js b/test/built-ins/Temporal/PlainTime/prototype/valueOf/branding.js new file mode 100644 index 00000000000..7e558964435 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/valueOf/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.valueof +features: [Symbol, Temporal] +---*/ + +const valueOf = Temporal.PlainTime.prototype.valueOf; + +assert.sameValue(typeof valueOf, "function"); + +assert.throws(TypeError, () => valueOf.call(undefined), "undefined"); +assert.throws(TypeError, () => valueOf.call(null), "null"); +assert.throws(TypeError, () => valueOf.call(true), "true"); +assert.throws(TypeError, () => valueOf.call(""), "empty string"); +assert.throws(TypeError, () => valueOf.call(Symbol()), "symbol"); +assert.throws(TypeError, () => valueOf.call(1), "1"); +assert.throws(TypeError, () => valueOf.call({}), "plain object"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainTime/prototype/with/branding.js b/test/built-ins/Temporal/PlainTime/prototype/with/branding.js new file mode 100644 index 00000000000..e569987c2c7 --- /dev/null +++ b/test/built-ins/Temporal/PlainTime/prototype/with/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaintime.prototype.with +features: [Symbol, Temporal] +---*/ + +const with_ = Temporal.PlainTime.prototype.with; + +assert.sameValue(typeof with_, "function"); + +assert.throws(TypeError, () => with_.call(undefined), "undefined"); +assert.throws(TypeError, () => with_.call(null), "null"); +assert.throws(TypeError, () => with_.call(true), "true"); +assert.throws(TypeError, () => with_.call(""), "empty string"); +assert.throws(TypeError, () => with_.call(Symbol()), "symbol"); +assert.throws(TypeError, () => with_.call(1), "1"); +assert.throws(TypeError, () => with_.call({}), "plain object"); +assert.throws(TypeError, () => with_.call(Temporal.PlainTime), "Temporal.PlainTime"); +assert.throws(TypeError, () => with_.call(Temporal.PlainTime.prototype), "Temporal.PlainTime.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/add/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/add/branding.js new file mode 100644 index 00000000000..c9493a1fc96 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/add/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.add +features: [Symbol, Temporal] +---*/ + +const add = Temporal.PlainYearMonth.prototype.add; + +assert.sameValue(typeof add, "function"); + +assert.throws(TypeError, () => add.call(undefined), "undefined"); +assert.throws(TypeError, () => add.call(null), "null"); +assert.throws(TypeError, () => add.call(true), "true"); +assert.throws(TypeError, () => add.call(""), "empty string"); +assert.throws(TypeError, () => add.call(Symbol()), "symbol"); +assert.throws(TypeError, () => add.call(1), "1"); +assert.throws(TypeError, () => add.call({}), "plain object"); +assert.throws(TypeError, () => add.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => add.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/calendar/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/calendar/branding.js new file mode 100644 index 00000000000..ea39ffd4ac4 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/calendar/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.calendar +features: [Symbol, Temporal] +---*/ + +const calendar = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "calendar").get; + +assert.sameValue(typeof calendar, "function"); + +assert.throws(TypeError, () => calendar.call(undefined), "undefined"); +assert.throws(TypeError, () => calendar.call(null), "null"); +assert.throws(TypeError, () => calendar.call(true), "true"); +assert.throws(TypeError, () => calendar.call(""), "empty string"); +assert.throws(TypeError, () => calendar.call(Symbol()), "symbol"); +assert.throws(TypeError, () => calendar.call(1), "1"); +assert.throws(TypeError, () => calendar.call({}), "plain object"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => calendar.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/daysInMonth/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/daysInMonth/branding.js new file mode 100644 index 00000000000..ee26ee67d77 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/daysInMonth/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.daysinmonth +features: [Symbol, Temporal] +---*/ + +const daysInMonth = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "daysInMonth").get; + +assert.sameValue(typeof daysInMonth, "function"); + +assert.throws(TypeError, () => daysInMonth.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInMonth.call(null), "null"); +assert.throws(TypeError, () => daysInMonth.call(true), "true"); +assert.throws(TypeError, () => daysInMonth.call(""), "empty string"); +assert.throws(TypeError, () => daysInMonth.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInMonth.call(1), "1"); +assert.throws(TypeError, () => daysInMonth.call({}), "plain object"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/daysInYear/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/daysInYear/branding.js new file mode 100644 index 00000000000..883655502b7 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/daysInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.daysinyear +features: [Symbol, Temporal] +---*/ + +const daysInYear = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "daysInYear").get; + +assert.sameValue(typeof daysInYear, "function"); + +assert.throws(TypeError, () => daysInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInYear.call(null), "null"); +assert.throws(TypeError, () => daysInYear.call(true), "true"); +assert.throws(TypeError, () => daysInYear.call(""), "empty string"); +assert.throws(TypeError, () => daysInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInYear.call(1), "1"); +assert.throws(TypeError, () => daysInYear.call({}), "plain object"); +assert.throws(TypeError, () => daysInYear.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => daysInYear.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/equals/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/equals/branding.js new file mode 100644 index 00000000000..a8581d6607d --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/equals/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.equals +features: [Symbol, Temporal] +---*/ + +const equals = Temporal.PlainYearMonth.prototype.equals; + +assert.sameValue(typeof equals, "function"); + +assert.throws(TypeError, () => equals.call(undefined), "undefined"); +assert.throws(TypeError, () => equals.call(null), "null"); +assert.throws(TypeError, () => equals.call(true), "true"); +assert.throws(TypeError, () => equals.call(""), "empty string"); +assert.throws(TypeError, () => equals.call(Symbol()), "symbol"); +assert.throws(TypeError, () => equals.call(1), "1"); +assert.throws(TypeError, () => equals.call({}), "plain object"); +assert.throws(TypeError, () => equals.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => equals.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/era/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/era/branding.js new file mode 100644 index 00000000000..a0600b5d922 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/era/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.era +features: [Symbol, Temporal] +---*/ + +const era = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "era").get; + +assert.sameValue(typeof era, "function"); + +assert.throws(TypeError, () => era.call(undefined), "undefined"); +assert.throws(TypeError, () => era.call(null), "null"); +assert.throws(TypeError, () => era.call(true), "true"); +assert.throws(TypeError, () => era.call(""), "empty string"); +assert.throws(TypeError, () => era.call(Symbol()), "symbol"); +assert.throws(TypeError, () => era.call(1), "1"); +assert.throws(TypeError, () => era.call({}), "plain object"); +assert.throws(TypeError, () => era.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => era.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/eraYear/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/eraYear/branding.js new file mode 100644 index 00000000000..9ffd695e194 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/eraYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.erayear +features: [Symbol, Temporal] +---*/ + +const eraYear = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "eraYear").get; + +assert.sameValue(typeof eraYear, "function"); + +assert.throws(TypeError, () => eraYear.call(undefined), "undefined"); +assert.throws(TypeError, () => eraYear.call(null), "null"); +assert.throws(TypeError, () => eraYear.call(true), "true"); +assert.throws(TypeError, () => eraYear.call(""), "empty string"); +assert.throws(TypeError, () => eraYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => eraYear.call(1), "1"); +assert.throws(TypeError, () => eraYear.call({}), "plain object"); +assert.throws(TypeError, () => eraYear.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => eraYear.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/getISOFields/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/getISOFields/branding.js new file mode 100644 index 00000000000..a13ce54ed61 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/getISOFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.getisofields +features: [Symbol, Temporal] +---*/ + +const getISOFields = Temporal.PlainYearMonth.prototype.getISOFields; + +assert.sameValue(typeof getISOFields, "function"); + +assert.throws(TypeError, () => getISOFields.call(undefined), "undefined"); +assert.throws(TypeError, () => getISOFields.call(null), "null"); +assert.throws(TypeError, () => getISOFields.call(true), "true"); +assert.throws(TypeError, () => getISOFields.call(""), "empty string"); +assert.throws(TypeError, () => getISOFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getISOFields.call(1), "1"); +assert.throws(TypeError, () => getISOFields.call({}), "plain object"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => getISOFields.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/inLeapYear/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/inLeapYear/branding.js new file mode 100644 index 00000000000..e415ca53d5f --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/inLeapYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.inleapyear +features: [Symbol, Temporal] +---*/ + +const inLeapYear = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "inLeapYear").get; + +assert.sameValue(typeof inLeapYear, "function"); + +assert.throws(TypeError, () => inLeapYear.call(undefined), "undefined"); +assert.throws(TypeError, () => inLeapYear.call(null), "null"); +assert.throws(TypeError, () => inLeapYear.call(true), "true"); +assert.throws(TypeError, () => inLeapYear.call(""), "empty string"); +assert.throws(TypeError, () => inLeapYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => inLeapYear.call(1), "1"); +assert.throws(TypeError, () => inLeapYear.call({}), "plain object"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/month/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/month/branding.js new file mode 100644 index 00000000000..ed7dab8b5aa --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/month/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.month +features: [Symbol, Temporal] +---*/ + +const month = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "month").get; + +assert.sameValue(typeof month, "function"); + +assert.throws(TypeError, () => month.call(undefined), "undefined"); +assert.throws(TypeError, () => month.call(null), "null"); +assert.throws(TypeError, () => month.call(true), "true"); +assert.throws(TypeError, () => month.call(""), "empty string"); +assert.throws(TypeError, () => month.call(Symbol()), "symbol"); +assert.throws(TypeError, () => month.call(1), "1"); +assert.throws(TypeError, () => month.call({}), "plain object"); +assert.throws(TypeError, () => month.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => month.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/monthCode/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/monthCode/branding.js new file mode 100644 index 00000000000..116cd1da6a7 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/monthCode/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.monthcode +features: [Symbol, Temporal] +---*/ + +const monthCode = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "monthCode").get; + +assert.sameValue(typeof monthCode, "function"); + +assert.throws(TypeError, () => monthCode.call(undefined), "undefined"); +assert.throws(TypeError, () => monthCode.call(null), "null"); +assert.throws(TypeError, () => monthCode.call(true), "true"); +assert.throws(TypeError, () => monthCode.call(""), "empty string"); +assert.throws(TypeError, () => monthCode.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthCode.call(1), "1"); +assert.throws(TypeError, () => monthCode.call({}), "plain object"); +assert.throws(TypeError, () => monthCode.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => monthCode.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/monthsInYear/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/monthsInYear/branding.js new file mode 100644 index 00000000000..dc172721b4a --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/monthsInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.monthsinyear +features: [Symbol, Temporal] +---*/ + +const monthsInYear = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "monthsInYear").get; + +assert.sameValue(typeof monthsInYear, "function"); + +assert.throws(TypeError, () => monthsInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => monthsInYear.call(null), "null"); +assert.throws(TypeError, () => monthsInYear.call(true), "true"); +assert.throws(TypeError, () => monthsInYear.call(""), "empty string"); +assert.throws(TypeError, () => monthsInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthsInYear.call(1), "1"); +assert.throws(TypeError, () => monthsInYear.call({}), "plain object"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/since/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/since/branding.js new file mode 100644 index 00000000000..cce7a7ae264 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/since/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.since +features: [Symbol, Temporal] +---*/ + +const since = Temporal.PlainYearMonth.prototype.since; + +assert.sameValue(typeof since, "function"); + +assert.throws(TypeError, () => since.call(undefined), "undefined"); +assert.throws(TypeError, () => since.call(null), "null"); +assert.throws(TypeError, () => since.call(true), "true"); +assert.throws(TypeError, () => since.call(""), "empty string"); +assert.throws(TypeError, () => since.call(Symbol()), "symbol"); +assert.throws(TypeError, () => since.call(1), "1"); +assert.throws(TypeError, () => since.call({}), "plain object"); +assert.throws(TypeError, () => since.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => since.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/subtract/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/subtract/branding.js new file mode 100644 index 00000000000..a0cfe7e5fc5 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/subtract/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.subtract +features: [Symbol, Temporal] +---*/ + +const subtract = Temporal.PlainYearMonth.prototype.subtract; + +assert.sameValue(typeof subtract, "function"); + +assert.throws(TypeError, () => subtract.call(undefined), "undefined"); +assert.throws(TypeError, () => subtract.call(null), "null"); +assert.throws(TypeError, () => subtract.call(true), "true"); +assert.throws(TypeError, () => subtract.call(""), "empty string"); +assert.throws(TypeError, () => subtract.call(Symbol()), "symbol"); +assert.throws(TypeError, () => subtract.call(1), "1"); +assert.throws(TypeError, () => subtract.call({}), "plain object"); +assert.throws(TypeError, () => subtract.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => subtract.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/toJSON/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/toJSON/branding.js new file mode 100644 index 00000000000..15f52e71b8e --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/toJSON/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.tojson +features: [Symbol, Temporal] +---*/ + +const toJSON = Temporal.PlainYearMonth.prototype.toJSON; + +assert.sameValue(typeof toJSON, "function"); + +assert.throws(TypeError, () => toJSON.call(undefined), "undefined"); +assert.throws(TypeError, () => toJSON.call(null), "null"); +assert.throws(TypeError, () => toJSON.call(true), "true"); +assert.throws(TypeError, () => toJSON.call(""), "empty string"); +assert.throws(TypeError, () => toJSON.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toJSON.call(1), "1"); +assert.throws(TypeError, () => toJSON.call({}), "plain object"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => toJSON.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/branding.js new file mode 100644 index 00000000000..ff2d73e7451 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/toLocaleString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.tolocalestring +features: [Symbol, Temporal] +---*/ + +const toLocaleString = Temporal.PlainYearMonth.prototype.toLocaleString; + +assert.sameValue(typeof toLocaleString, "function"); + +assert.throws(TypeError, () => toLocaleString.call(undefined), "undefined"); +assert.throws(TypeError, () => toLocaleString.call(null), "null"); +assert.throws(TypeError, () => toLocaleString.call(true), "true"); +assert.throws(TypeError, () => toLocaleString.call(""), "empty string"); +assert.throws(TypeError, () => toLocaleString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toLocaleString.call(1), "1"); +assert.throws(TypeError, () => toLocaleString.call({}), "plain object"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/branding.js new file mode 100644 index 00000000000..2a50de2ff1f --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.toplaindate +features: [Symbol, Temporal] +---*/ + +const toPlainDate = Temporal.PlainYearMonth.prototype.toPlainDate; + +assert.sameValue(typeof toPlainDate, "function"); + +assert.throws(TypeError, () => toPlainDate.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainDate.call(null), "null"); +assert.throws(TypeError, () => toPlainDate.call(true), "true"); +assert.throws(TypeError, () => toPlainDate.call(""), "empty string"); +assert.throws(TypeError, () => toPlainDate.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainDate.call(1), "1"); +assert.throws(TypeError, () => toPlainDate.call({}), "plain object"); +assert.throws(TypeError, () => toPlainDate.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => toPlainDate.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/toString/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/toString/branding.js new file mode 100644 index 00000000000..19baf34f476 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.PlainYearMonth.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => toString.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/until/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/until/branding.js new file mode 100644 index 00000000000..0c0e3bcf514 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/until/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.until +features: [Symbol, Temporal] +---*/ + +const until = Temporal.PlainYearMonth.prototype.until; + +assert.sameValue(typeof until, "function"); + +assert.throws(TypeError, () => until.call(undefined), "undefined"); +assert.throws(TypeError, () => until.call(null), "null"); +assert.throws(TypeError, () => until.call(true), "true"); +assert.throws(TypeError, () => until.call(""), "empty string"); +assert.throws(TypeError, () => until.call(Symbol()), "symbol"); +assert.throws(TypeError, () => until.call(1), "1"); +assert.throws(TypeError, () => until.call({}), "plain object"); +assert.throws(TypeError, () => until.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => until.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/valueOf/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/valueOf/branding.js new file mode 100644 index 00000000000..64f9c633c43 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/valueOf/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.valueof +features: [Symbol, Temporal] +---*/ + +const valueOf = Temporal.PlainYearMonth.prototype.valueOf; + +assert.sameValue(typeof valueOf, "function"); + +assert.throws(TypeError, () => valueOf.call(undefined), "undefined"); +assert.throws(TypeError, () => valueOf.call(null), "null"); +assert.throws(TypeError, () => valueOf.call(true), "true"); +assert.throws(TypeError, () => valueOf.call(""), "empty string"); +assert.throws(TypeError, () => valueOf.call(Symbol()), "symbol"); +assert.throws(TypeError, () => valueOf.call(1), "1"); +assert.throws(TypeError, () => valueOf.call({}), "plain object"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => valueOf.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/with/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/with/branding.js new file mode 100644 index 00000000000..54c6b17d282 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/with/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plainyearmonth.prototype.with +features: [Symbol, Temporal] +---*/ + +const with_ = Temporal.PlainYearMonth.prototype.with; + +assert.sameValue(typeof with_, "function"); + +assert.throws(TypeError, () => with_.call(undefined), "undefined"); +assert.throws(TypeError, () => with_.call(null), "null"); +assert.throws(TypeError, () => with_.call(true), "true"); +assert.throws(TypeError, () => with_.call(""), "empty string"); +assert.throws(TypeError, () => with_.call(Symbol()), "symbol"); +assert.throws(TypeError, () => with_.call(1), "1"); +assert.throws(TypeError, () => with_.call({}), "plain object"); +assert.throws(TypeError, () => with_.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => with_.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/year/branding.js b/test/built-ins/Temporal/PlainYearMonth/prototype/year/branding.js new file mode 100644 index 00000000000..5581194b2c1 --- /dev/null +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/year/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.plainyearmonth.prototype.year +features: [Symbol, Temporal] +---*/ + +const year = Object.getOwnPropertyDescriptor(Temporal.PlainYearMonth.prototype, "year").get; + +assert.sameValue(typeof year, "function"); + +assert.throws(TypeError, () => year.call(undefined), "undefined"); +assert.throws(TypeError, () => year.call(null), "null"); +assert.throws(TypeError, () => year.call(true), "true"); +assert.throws(TypeError, () => year.call(""), "empty string"); +assert.throws(TypeError, () => year.call(Symbol()), "symbol"); +assert.throws(TypeError, () => year.call(1), "1"); +assert.throws(TypeError, () => year.call({}), "plain object"); +assert.throws(TypeError, () => year.call(Temporal.PlainYearMonth), "Temporal.PlainYearMonth"); +assert.throws(TypeError, () => year.call(Temporal.PlainYearMonth.prototype), "Temporal.PlainYearMonth.prototype"); diff --git a/test/built-ins/Temporal/TimeZone/prototype/getInstantFor/branding.js b/test/built-ins/Temporal/TimeZone/prototype/getInstantFor/branding.js new file mode 100644 index 00000000000..5c6e8621322 --- /dev/null +++ b/test/built-ins/Temporal/TimeZone/prototype/getInstantFor/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.timezone.prototype.getinstantfor +features: [Symbol, Temporal] +---*/ + +const getInstantFor = Temporal.TimeZone.prototype.getInstantFor; + +assert.sameValue(typeof getInstantFor, "function"); + +assert.throws(TypeError, () => getInstantFor.call(undefined), "undefined"); +assert.throws(TypeError, () => getInstantFor.call(null), "null"); +assert.throws(TypeError, () => getInstantFor.call(true), "true"); +assert.throws(TypeError, () => getInstantFor.call(""), "empty string"); +assert.throws(TypeError, () => getInstantFor.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getInstantFor.call(1), "1"); +assert.throws(TypeError, () => getInstantFor.call({}), "plain object"); +assert.throws(TypeError, () => getInstantFor.call(Temporal.TimeZone), "Temporal.TimeZone"); +assert.throws(TypeError, () => getInstantFor.call(Temporal.TimeZone.prototype), "Temporal.TimeZone.prototype"); diff --git a/test/built-ins/Temporal/TimeZone/prototype/getNextTransition/branding.js b/test/built-ins/Temporal/TimeZone/prototype/getNextTransition/branding.js new file mode 100644 index 00000000000..b65ab996686 --- /dev/null +++ b/test/built-ins/Temporal/TimeZone/prototype/getNextTransition/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.timezone.prototype.getnexttransition +features: [Symbol, Temporal] +---*/ + +const getNextTransition = Temporal.TimeZone.prototype.getNextTransition; + +assert.sameValue(typeof getNextTransition, "function"); + +assert.throws(TypeError, () => getNextTransition.call(undefined), "undefined"); +assert.throws(TypeError, () => getNextTransition.call(null), "null"); +assert.throws(TypeError, () => getNextTransition.call(true), "true"); +assert.throws(TypeError, () => getNextTransition.call(""), "empty string"); +assert.throws(TypeError, () => getNextTransition.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getNextTransition.call(1), "1"); +assert.throws(TypeError, () => getNextTransition.call({}), "plain object"); +assert.throws(TypeError, () => getNextTransition.call(Temporal.TimeZone), "Temporal.TimeZone"); +assert.throws(TypeError, () => getNextTransition.call(Temporal.TimeZone.prototype), "Temporal.TimeZone.prototype"); diff --git a/test/built-ins/Temporal/TimeZone/prototype/getOffsetNanosecondsFor/branding.js b/test/built-ins/Temporal/TimeZone/prototype/getOffsetNanosecondsFor/branding.js new file mode 100644 index 00000000000..af63e7d7305 --- /dev/null +++ b/test/built-ins/Temporal/TimeZone/prototype/getOffsetNanosecondsFor/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.timezone.prototype.getoffsetnanosecondsfor +features: [Symbol, Temporal] +---*/ + +const getOffsetNanosecondsFor = Temporal.TimeZone.prototype.getOffsetNanosecondsFor; + +assert.sameValue(typeof getOffsetNanosecondsFor, "function"); + +assert.throws(TypeError, () => getOffsetNanosecondsFor.call(undefined), "undefined"); +assert.throws(TypeError, () => getOffsetNanosecondsFor.call(null), "null"); +assert.throws(TypeError, () => getOffsetNanosecondsFor.call(true), "true"); +assert.throws(TypeError, () => getOffsetNanosecondsFor.call(""), "empty string"); +assert.throws(TypeError, () => getOffsetNanosecondsFor.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getOffsetNanosecondsFor.call(1), "1"); +assert.throws(TypeError, () => getOffsetNanosecondsFor.call({}), "plain object"); +assert.throws(TypeError, () => getOffsetNanosecondsFor.call(Temporal.TimeZone), "Temporal.TimeZone"); +assert.throws(TypeError, () => getOffsetNanosecondsFor.call(Temporal.TimeZone.prototype), "Temporal.TimeZone.prototype"); diff --git a/test/built-ins/Temporal/TimeZone/prototype/getOffsetStringFor/branding.js b/test/built-ins/Temporal/TimeZone/prototype/getOffsetStringFor/branding.js new file mode 100644 index 00000000000..c66c54daaaf --- /dev/null +++ b/test/built-ins/Temporal/TimeZone/prototype/getOffsetStringFor/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.timezone.prototype.getoffsetstringfor +features: [Symbol, Temporal] +---*/ + +const getOffsetStringFor = Temporal.TimeZone.prototype.getOffsetStringFor; + +assert.sameValue(typeof getOffsetStringFor, "function"); + +assert.throws(TypeError, () => getOffsetStringFor.call(undefined), "undefined"); +assert.throws(TypeError, () => getOffsetStringFor.call(null), "null"); +assert.throws(TypeError, () => getOffsetStringFor.call(true), "true"); +assert.throws(TypeError, () => getOffsetStringFor.call(""), "empty string"); +assert.throws(TypeError, () => getOffsetStringFor.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getOffsetStringFor.call(1), "1"); +assert.throws(TypeError, () => getOffsetStringFor.call({}), "plain object"); +assert.throws(TypeError, () => getOffsetStringFor.call(Temporal.TimeZone), "Temporal.TimeZone"); +assert.throws(TypeError, () => getOffsetStringFor.call(Temporal.TimeZone.prototype), "Temporal.TimeZone.prototype"); diff --git a/test/built-ins/Temporal/TimeZone/prototype/getPossibleInstantsFor/branding.js b/test/built-ins/Temporal/TimeZone/prototype/getPossibleInstantsFor/branding.js new file mode 100644 index 00000000000..de2494e6bce --- /dev/null +++ b/test/built-ins/Temporal/TimeZone/prototype/getPossibleInstantsFor/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.timezone.prototype.getpossibleinstantsfor +features: [Symbol, Temporal] +---*/ + +const getPossibleInstantsFor = Temporal.TimeZone.prototype.getPossibleInstantsFor; + +assert.sameValue(typeof getPossibleInstantsFor, "function"); + +assert.throws(TypeError, () => getPossibleInstantsFor.call(undefined), "undefined"); +assert.throws(TypeError, () => getPossibleInstantsFor.call(null), "null"); +assert.throws(TypeError, () => getPossibleInstantsFor.call(true), "true"); +assert.throws(TypeError, () => getPossibleInstantsFor.call(""), "empty string"); +assert.throws(TypeError, () => getPossibleInstantsFor.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getPossibleInstantsFor.call(1), "1"); +assert.throws(TypeError, () => getPossibleInstantsFor.call({}), "plain object"); +assert.throws(TypeError, () => getPossibleInstantsFor.call(Temporal.TimeZone), "Temporal.TimeZone"); +assert.throws(TypeError, () => getPossibleInstantsFor.call(Temporal.TimeZone.prototype), "Temporal.TimeZone.prototype"); diff --git a/test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/branding.js b/test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/branding.js new file mode 100644 index 00000000000..c5071927467 --- /dev/null +++ b/test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.timezone.prototype.getprevioustransition +features: [Symbol, Temporal] +---*/ + +const getPreviousTransition = Temporal.TimeZone.prototype.getPreviousTransition; + +assert.sameValue(typeof getPreviousTransition, "function"); + +assert.throws(TypeError, () => getPreviousTransition.call(undefined), "undefined"); +assert.throws(TypeError, () => getPreviousTransition.call(null), "null"); +assert.throws(TypeError, () => getPreviousTransition.call(true), "true"); +assert.throws(TypeError, () => getPreviousTransition.call(""), "empty string"); +assert.throws(TypeError, () => getPreviousTransition.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getPreviousTransition.call(1), "1"); +assert.throws(TypeError, () => getPreviousTransition.call({}), "plain object"); +assert.throws(TypeError, () => getPreviousTransition.call(Temporal.TimeZone), "Temporal.TimeZone"); +assert.throws(TypeError, () => getPreviousTransition.call(Temporal.TimeZone.prototype), "Temporal.TimeZone.prototype"); diff --git a/test/built-ins/Temporal/TimeZone/prototype/toString/branding.js b/test/built-ins/Temporal/TimeZone/prototype/toString/branding.js new file mode 100644 index 00000000000..c25086708d4 --- /dev/null +++ b/test/built-ins/Temporal/TimeZone/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.timezone.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.TimeZone.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.TimeZone), "Temporal.TimeZone"); +assert.throws(TypeError, () => toString.call(Temporal.TimeZone.prototype), "Temporal.TimeZone.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/add/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/add/branding.js new file mode 100644 index 00000000000..f5b4f19ac1e --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/add/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.add +features: [Symbol, Temporal] +---*/ + +const add = Temporal.ZonedDateTime.prototype.add; + +assert.sameValue(typeof add, "function"); + +assert.throws(TypeError, () => add.call(undefined), "undefined"); +assert.throws(TypeError, () => add.call(null), "null"); +assert.throws(TypeError, () => add.call(true), "true"); +assert.throws(TypeError, () => add.call(""), "empty string"); +assert.throws(TypeError, () => add.call(Symbol()), "symbol"); +assert.throws(TypeError, () => add.call(1), "1"); +assert.throws(TypeError, () => add.call({}), "plain object"); +assert.throws(TypeError, () => add.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => add.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/calendar/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/calendar/branding.js new file mode 100644 index 00000000000..ec36567002e --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/calendar/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.calendar +features: [Symbol, Temporal] +---*/ + +const calendar = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "calendar").get; + +assert.sameValue(typeof calendar, "function"); + +assert.throws(TypeError, () => calendar.call(undefined), "undefined"); +assert.throws(TypeError, () => calendar.call(null), "null"); +assert.throws(TypeError, () => calendar.call(true), "true"); +assert.throws(TypeError, () => calendar.call(""), "empty string"); +assert.throws(TypeError, () => calendar.call(Symbol()), "symbol"); +assert.throws(TypeError, () => calendar.call(1), "1"); +assert.throws(TypeError, () => calendar.call({}), "plain object"); +assert.throws(TypeError, () => calendar.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => calendar.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/day/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/day/branding.js new file mode 100644 index 00000000000..1f04d438e4c --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/day/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.day +features: [Symbol, Temporal] +---*/ + +const day = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "day").get; + +assert.sameValue(typeof day, "function"); + +assert.throws(TypeError, () => day.call(undefined), "undefined"); +assert.throws(TypeError, () => day.call(null), "null"); +assert.throws(TypeError, () => day.call(true), "true"); +assert.throws(TypeError, () => day.call(""), "empty string"); +assert.throws(TypeError, () => day.call(Symbol()), "symbol"); +assert.throws(TypeError, () => day.call(1), "1"); +assert.throws(TypeError, () => day.call({}), "plain object"); +assert.throws(TypeError, () => day.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => day.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/dayOfWeek/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/dayOfWeek/branding.js new file mode 100644 index 00000000000..d28e99966be --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/dayOfWeek/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.dayofweek +features: [Symbol, Temporal] +---*/ + +const dayOfWeek = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "dayOfWeek").get; + +assert.sameValue(typeof dayOfWeek, "function"); + +assert.throws(TypeError, () => dayOfWeek.call(undefined), "undefined"); +assert.throws(TypeError, () => dayOfWeek.call(null), "null"); +assert.throws(TypeError, () => dayOfWeek.call(true), "true"); +assert.throws(TypeError, () => dayOfWeek.call(""), "empty string"); +assert.throws(TypeError, () => dayOfWeek.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dayOfWeek.call(1), "1"); +assert.throws(TypeError, () => dayOfWeek.call({}), "plain object"); +assert.throws(TypeError, () => dayOfWeek.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => dayOfWeek.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/dayOfYear/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/dayOfYear/branding.js new file mode 100644 index 00000000000..290e2c7dfd4 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/dayOfYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.dayofyear +features: [Symbol, Temporal] +---*/ + +const dayOfYear = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "dayOfYear").get; + +assert.sameValue(typeof dayOfYear, "function"); + +assert.throws(TypeError, () => dayOfYear.call(undefined), "undefined"); +assert.throws(TypeError, () => dayOfYear.call(null), "null"); +assert.throws(TypeError, () => dayOfYear.call(true), "true"); +assert.throws(TypeError, () => dayOfYear.call(""), "empty string"); +assert.throws(TypeError, () => dayOfYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => dayOfYear.call(1), "1"); +assert.throws(TypeError, () => dayOfYear.call({}), "plain object"); +assert.throws(TypeError, () => dayOfYear.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => dayOfYear.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/daysInMonth/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/daysInMonth/branding.js new file mode 100644 index 00000000000..da641b4e86b --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/daysInMonth/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.daysinmonth +features: [Symbol, Temporal] +---*/ + +const daysInMonth = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "daysInMonth").get; + +assert.sameValue(typeof daysInMonth, "function"); + +assert.throws(TypeError, () => daysInMonth.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInMonth.call(null), "null"); +assert.throws(TypeError, () => daysInMonth.call(true), "true"); +assert.throws(TypeError, () => daysInMonth.call(""), "empty string"); +assert.throws(TypeError, () => daysInMonth.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInMonth.call(1), "1"); +assert.throws(TypeError, () => daysInMonth.call({}), "plain object"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => daysInMonth.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/daysInWeek/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/daysInWeek/branding.js new file mode 100644 index 00000000000..b7e590141c7 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/daysInWeek/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.daysinweek +features: [Symbol, Temporal] +---*/ + +const daysInWeek = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "daysInWeek").get; + +assert.sameValue(typeof daysInWeek, "function"); + +assert.throws(TypeError, () => daysInWeek.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInWeek.call(null), "null"); +assert.throws(TypeError, () => daysInWeek.call(true), "true"); +assert.throws(TypeError, () => daysInWeek.call(""), "empty string"); +assert.throws(TypeError, () => daysInWeek.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInWeek.call(1), "1"); +assert.throws(TypeError, () => daysInWeek.call({}), "plain object"); +assert.throws(TypeError, () => daysInWeek.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => daysInWeek.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/daysInYear/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/daysInYear/branding.js new file mode 100644 index 00000000000..af700892ad4 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/daysInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.daysinyear +features: [Symbol, Temporal] +---*/ + +const daysInYear = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "daysInYear").get; + +assert.sameValue(typeof daysInYear, "function"); + +assert.throws(TypeError, () => daysInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => daysInYear.call(null), "null"); +assert.throws(TypeError, () => daysInYear.call(true), "true"); +assert.throws(TypeError, () => daysInYear.call(""), "empty string"); +assert.throws(TypeError, () => daysInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => daysInYear.call(1), "1"); +assert.throws(TypeError, () => daysInYear.call({}), "plain object"); +assert.throws(TypeError, () => daysInYear.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => daysInYear.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/epochMicroseconds/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/epochMicroseconds/branding.js new file mode 100644 index 00000000000..967b093ebfe --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/epochMicroseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.epochmicroseconds +features: [Symbol, Temporal] +---*/ + +const epochMicroseconds = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "epochMicroseconds").get; + +assert.sameValue(typeof epochMicroseconds, "function"); + +assert.throws(TypeError, () => epochMicroseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => epochMicroseconds.call(null), "null"); +assert.throws(TypeError, () => epochMicroseconds.call(true), "true"); +assert.throws(TypeError, () => epochMicroseconds.call(""), "empty string"); +assert.throws(TypeError, () => epochMicroseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => epochMicroseconds.call(1), "1"); +assert.throws(TypeError, () => epochMicroseconds.call({}), "plain object"); +assert.throws(TypeError, () => epochMicroseconds.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => epochMicroseconds.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/epochMilliseconds/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/epochMilliseconds/branding.js new file mode 100644 index 00000000000..211bf896ff6 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/epochMilliseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.epochmilliseconds +features: [Symbol, Temporal] +---*/ + +const epochMilliseconds = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "epochMilliseconds").get; + +assert.sameValue(typeof epochMilliseconds, "function"); + +assert.throws(TypeError, () => epochMilliseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => epochMilliseconds.call(null), "null"); +assert.throws(TypeError, () => epochMilliseconds.call(true), "true"); +assert.throws(TypeError, () => epochMilliseconds.call(""), "empty string"); +assert.throws(TypeError, () => epochMilliseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => epochMilliseconds.call(1), "1"); +assert.throws(TypeError, () => epochMilliseconds.call({}), "plain object"); +assert.throws(TypeError, () => epochMilliseconds.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => epochMilliseconds.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/epochNanoseconds/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/epochNanoseconds/branding.js new file mode 100644 index 00000000000..5b341f8156e --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/epochNanoseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.epochnanoseconds +features: [Symbol, Temporal] +---*/ + +const epochNanoseconds = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "epochNanoseconds").get; + +assert.sameValue(typeof epochNanoseconds, "function"); + +assert.throws(TypeError, () => epochNanoseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => epochNanoseconds.call(null), "null"); +assert.throws(TypeError, () => epochNanoseconds.call(true), "true"); +assert.throws(TypeError, () => epochNanoseconds.call(""), "empty string"); +assert.throws(TypeError, () => epochNanoseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => epochNanoseconds.call(1), "1"); +assert.throws(TypeError, () => epochNanoseconds.call({}), "plain object"); +assert.throws(TypeError, () => epochNanoseconds.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => epochNanoseconds.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/epochSeconds/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/epochSeconds/branding.js new file mode 100644 index 00000000000..58a0367053a --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/epochSeconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.epochseconds +features: [Symbol, Temporal] +---*/ + +const epochSeconds = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "epochSeconds").get; + +assert.sameValue(typeof epochSeconds, "function"); + +assert.throws(TypeError, () => epochSeconds.call(undefined), "undefined"); +assert.throws(TypeError, () => epochSeconds.call(null), "null"); +assert.throws(TypeError, () => epochSeconds.call(true), "true"); +assert.throws(TypeError, () => epochSeconds.call(""), "empty string"); +assert.throws(TypeError, () => epochSeconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => epochSeconds.call(1), "1"); +assert.throws(TypeError, () => epochSeconds.call({}), "plain object"); +assert.throws(TypeError, () => epochSeconds.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => epochSeconds.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/equals/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/equals/branding.js new file mode 100644 index 00000000000..974378334cf --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/equals/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.equals +features: [Symbol, Temporal] +---*/ + +const equals = Temporal.ZonedDateTime.prototype.equals; + +assert.sameValue(typeof equals, "function"); + +assert.throws(TypeError, () => equals.call(undefined), "undefined"); +assert.throws(TypeError, () => equals.call(null), "null"); +assert.throws(TypeError, () => equals.call(true), "true"); +assert.throws(TypeError, () => equals.call(""), "empty string"); +assert.throws(TypeError, () => equals.call(Symbol()), "symbol"); +assert.throws(TypeError, () => equals.call(1), "1"); +assert.throws(TypeError, () => equals.call({}), "plain object"); +assert.throws(TypeError, () => equals.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => equals.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/era/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/era/branding.js new file mode 100644 index 00000000000..356b5a33521 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/era/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.era +features: [Symbol, Temporal] +---*/ + +const era = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "era").get; + +assert.sameValue(typeof era, "function"); + +assert.throws(TypeError, () => era.call(undefined), "undefined"); +assert.throws(TypeError, () => era.call(null), "null"); +assert.throws(TypeError, () => era.call(true), "true"); +assert.throws(TypeError, () => era.call(""), "empty string"); +assert.throws(TypeError, () => era.call(Symbol()), "symbol"); +assert.throws(TypeError, () => era.call(1), "1"); +assert.throws(TypeError, () => era.call({}), "plain object"); +assert.throws(TypeError, () => era.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => era.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/eraYear/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/eraYear/branding.js new file mode 100644 index 00000000000..11229a014e9 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/eraYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.erayear +features: [Symbol, Temporal] +---*/ + +const eraYear = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "eraYear").get; + +assert.sameValue(typeof eraYear, "function"); + +assert.throws(TypeError, () => eraYear.call(undefined), "undefined"); +assert.throws(TypeError, () => eraYear.call(null), "null"); +assert.throws(TypeError, () => eraYear.call(true), "true"); +assert.throws(TypeError, () => eraYear.call(""), "empty string"); +assert.throws(TypeError, () => eraYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => eraYear.call(1), "1"); +assert.throws(TypeError, () => eraYear.call({}), "plain object"); +assert.throws(TypeError, () => eraYear.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => eraYear.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/getISOFields/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/getISOFields/branding.js new file mode 100644 index 00000000000..7bdeb026499 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/getISOFields/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.getisofields +features: [Symbol, Temporal] +---*/ + +const getISOFields = Temporal.ZonedDateTime.prototype.getISOFields; + +assert.sameValue(typeof getISOFields, "function"); + +assert.throws(TypeError, () => getISOFields.call(undefined), "undefined"); +assert.throws(TypeError, () => getISOFields.call(null), "null"); +assert.throws(TypeError, () => getISOFields.call(true), "true"); +assert.throws(TypeError, () => getISOFields.call(""), "empty string"); +assert.throws(TypeError, () => getISOFields.call(Symbol()), "symbol"); +assert.throws(TypeError, () => getISOFields.call(1), "1"); +assert.throws(TypeError, () => getISOFields.call({}), "plain object"); +assert.throws(TypeError, () => getISOFields.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => getISOFields.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/hour/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/hour/branding.js new file mode 100644 index 00000000000..b4170cf1841 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/hour/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.hour +features: [Symbol, Temporal] +---*/ + +const hour = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "hour").get; + +assert.sameValue(typeof hour, "function"); + +assert.throws(TypeError, () => hour.call(undefined), "undefined"); +assert.throws(TypeError, () => hour.call(null), "null"); +assert.throws(TypeError, () => hour.call(true), "true"); +assert.throws(TypeError, () => hour.call(""), "empty string"); +assert.throws(TypeError, () => hour.call(Symbol()), "symbol"); +assert.throws(TypeError, () => hour.call(1), "1"); +assert.throws(TypeError, () => hour.call({}), "plain object"); +assert.throws(TypeError, () => hour.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => hour.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/hoursInDay/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/hoursInDay/branding.js new file mode 100644 index 00000000000..7955644da73 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/hoursInDay/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.hoursinday +features: [Symbol, Temporal] +---*/ + +const hoursInDay = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "hoursInDay").get; + +assert.sameValue(typeof hoursInDay, "function"); + +assert.throws(TypeError, () => hoursInDay.call(undefined), "undefined"); +assert.throws(TypeError, () => hoursInDay.call(null), "null"); +assert.throws(TypeError, () => hoursInDay.call(true), "true"); +assert.throws(TypeError, () => hoursInDay.call(""), "empty string"); +assert.throws(TypeError, () => hoursInDay.call(Symbol()), "symbol"); +assert.throws(TypeError, () => hoursInDay.call(1), "1"); +assert.throws(TypeError, () => hoursInDay.call({}), "plain object"); +assert.throws(TypeError, () => hoursInDay.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => hoursInDay.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/inLeapYear/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/inLeapYear/branding.js new file mode 100644 index 00000000000..9143c0c8659 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/inLeapYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.inleapyear +features: [Symbol, Temporal] +---*/ + +const inLeapYear = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "inLeapYear").get; + +assert.sameValue(typeof inLeapYear, "function"); + +assert.throws(TypeError, () => inLeapYear.call(undefined), "undefined"); +assert.throws(TypeError, () => inLeapYear.call(null), "null"); +assert.throws(TypeError, () => inLeapYear.call(true), "true"); +assert.throws(TypeError, () => inLeapYear.call(""), "empty string"); +assert.throws(TypeError, () => inLeapYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => inLeapYear.call(1), "1"); +assert.throws(TypeError, () => inLeapYear.call({}), "plain object"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => inLeapYear.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/microsecond/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/microsecond/branding.js new file mode 100644 index 00000000000..489312fadb3 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/microsecond/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.microsecond +features: [Symbol, Temporal] +---*/ + +const microsecond = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "microsecond").get; + +assert.sameValue(typeof microsecond, "function"); + +assert.throws(TypeError, () => microsecond.call(undefined), "undefined"); +assert.throws(TypeError, () => microsecond.call(null), "null"); +assert.throws(TypeError, () => microsecond.call(true), "true"); +assert.throws(TypeError, () => microsecond.call(""), "empty string"); +assert.throws(TypeError, () => microsecond.call(Symbol()), "symbol"); +assert.throws(TypeError, () => microsecond.call(1), "1"); +assert.throws(TypeError, () => microsecond.call({}), "plain object"); +assert.throws(TypeError, () => microsecond.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => microsecond.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/millisecond/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/millisecond/branding.js new file mode 100644 index 00000000000..e553e7bc002 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/millisecond/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.millisecond +features: [Symbol, Temporal] +---*/ + +const millisecond = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "millisecond").get; + +assert.sameValue(typeof millisecond, "function"); + +assert.throws(TypeError, () => millisecond.call(undefined), "undefined"); +assert.throws(TypeError, () => millisecond.call(null), "null"); +assert.throws(TypeError, () => millisecond.call(true), "true"); +assert.throws(TypeError, () => millisecond.call(""), "empty string"); +assert.throws(TypeError, () => millisecond.call(Symbol()), "symbol"); +assert.throws(TypeError, () => millisecond.call(1), "1"); +assert.throws(TypeError, () => millisecond.call({}), "plain object"); +assert.throws(TypeError, () => millisecond.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => millisecond.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/minute/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/minute/branding.js new file mode 100644 index 00000000000..53a1a5e33ff --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/minute/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.minute +features: [Symbol, Temporal] +---*/ + +const minute = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "minute").get; + +assert.sameValue(typeof minute, "function"); + +assert.throws(TypeError, () => minute.call(undefined), "undefined"); +assert.throws(TypeError, () => minute.call(null), "null"); +assert.throws(TypeError, () => minute.call(true), "true"); +assert.throws(TypeError, () => minute.call(""), "empty string"); +assert.throws(TypeError, () => minute.call(Symbol()), "symbol"); +assert.throws(TypeError, () => minute.call(1), "1"); +assert.throws(TypeError, () => minute.call({}), "plain object"); +assert.throws(TypeError, () => minute.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => minute.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/month/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/month/branding.js new file mode 100644 index 00000000000..77d6776be46 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/month/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.month +features: [Symbol, Temporal] +---*/ + +const month = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "month").get; + +assert.sameValue(typeof month, "function"); + +assert.throws(TypeError, () => month.call(undefined), "undefined"); +assert.throws(TypeError, () => month.call(null), "null"); +assert.throws(TypeError, () => month.call(true), "true"); +assert.throws(TypeError, () => month.call(""), "empty string"); +assert.throws(TypeError, () => month.call(Symbol()), "symbol"); +assert.throws(TypeError, () => month.call(1), "1"); +assert.throws(TypeError, () => month.call({}), "plain object"); +assert.throws(TypeError, () => month.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => month.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/monthCode/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/monthCode/branding.js new file mode 100644 index 00000000000..168fe92fb6d --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/monthCode/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.monthcode +features: [Symbol, Temporal] +---*/ + +const monthCode = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "monthCode").get; + +assert.sameValue(typeof monthCode, "function"); + +assert.throws(TypeError, () => monthCode.call(undefined), "undefined"); +assert.throws(TypeError, () => monthCode.call(null), "null"); +assert.throws(TypeError, () => monthCode.call(true), "true"); +assert.throws(TypeError, () => monthCode.call(""), "empty string"); +assert.throws(TypeError, () => monthCode.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthCode.call(1), "1"); +assert.throws(TypeError, () => monthCode.call({}), "plain object"); +assert.throws(TypeError, () => monthCode.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => monthCode.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/monthsInYear/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/monthsInYear/branding.js new file mode 100644 index 00000000000..5e195c24a18 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/monthsInYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.monthsinyear +features: [Symbol, Temporal] +---*/ + +const monthsInYear = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "monthsInYear").get; + +assert.sameValue(typeof monthsInYear, "function"); + +assert.throws(TypeError, () => monthsInYear.call(undefined), "undefined"); +assert.throws(TypeError, () => monthsInYear.call(null), "null"); +assert.throws(TypeError, () => monthsInYear.call(true), "true"); +assert.throws(TypeError, () => monthsInYear.call(""), "empty string"); +assert.throws(TypeError, () => monthsInYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => monthsInYear.call(1), "1"); +assert.throws(TypeError, () => monthsInYear.call({}), "plain object"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => monthsInYear.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/nanosecond/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/nanosecond/branding.js new file mode 100644 index 00000000000..1f2281df446 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/nanosecond/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.nanosecond +features: [Symbol, Temporal] +---*/ + +const nanosecond = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "nanosecond").get; + +assert.sameValue(typeof nanosecond, "function"); + +assert.throws(TypeError, () => nanosecond.call(undefined), "undefined"); +assert.throws(TypeError, () => nanosecond.call(null), "null"); +assert.throws(TypeError, () => nanosecond.call(true), "true"); +assert.throws(TypeError, () => nanosecond.call(""), "empty string"); +assert.throws(TypeError, () => nanosecond.call(Symbol()), "symbol"); +assert.throws(TypeError, () => nanosecond.call(1), "1"); +assert.throws(TypeError, () => nanosecond.call({}), "plain object"); +assert.throws(TypeError, () => nanosecond.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => nanosecond.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/offset/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/offset/branding.js new file mode 100644 index 00000000000..c3889d4e3e8 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/offset/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.offset +features: [Symbol, Temporal] +---*/ + +const offset = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "offset").get; + +assert.sameValue(typeof offset, "function"); + +assert.throws(TypeError, () => offset.call(undefined), "undefined"); +assert.throws(TypeError, () => offset.call(null), "null"); +assert.throws(TypeError, () => offset.call(true), "true"); +assert.throws(TypeError, () => offset.call(""), "empty string"); +assert.throws(TypeError, () => offset.call(Symbol()), "symbol"); +assert.throws(TypeError, () => offset.call(1), "1"); +assert.throws(TypeError, () => offset.call({}), "plain object"); +assert.throws(TypeError, () => offset.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => offset.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/offsetNanoseconds/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/offsetNanoseconds/branding.js new file mode 100644 index 00000000000..5d212aa918e --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/offsetNanoseconds/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.offsetnanoseconds +features: [Symbol, Temporal] +---*/ + +const offsetNanoseconds = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "offsetNanoseconds").get; + +assert.sameValue(typeof offsetNanoseconds, "function"); + +assert.throws(TypeError, () => offsetNanoseconds.call(undefined), "undefined"); +assert.throws(TypeError, () => offsetNanoseconds.call(null), "null"); +assert.throws(TypeError, () => offsetNanoseconds.call(true), "true"); +assert.throws(TypeError, () => offsetNanoseconds.call(""), "empty string"); +assert.throws(TypeError, () => offsetNanoseconds.call(Symbol()), "symbol"); +assert.throws(TypeError, () => offsetNanoseconds.call(1), "1"); +assert.throws(TypeError, () => offsetNanoseconds.call({}), "plain object"); +assert.throws(TypeError, () => offsetNanoseconds.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => offsetNanoseconds.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/round/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/round/branding.js new file mode 100644 index 00000000000..19cc7ec244f --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/round/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.round +features: [Symbol, Temporal] +---*/ + +const round = Temporal.ZonedDateTime.prototype.round; + +assert.sameValue(typeof round, "function"); + +assert.throws(TypeError, () => round.call(undefined), "undefined"); +assert.throws(TypeError, () => round.call(null), "null"); +assert.throws(TypeError, () => round.call(true), "true"); +assert.throws(TypeError, () => round.call(""), "empty string"); +assert.throws(TypeError, () => round.call(Symbol()), "symbol"); +assert.throws(TypeError, () => round.call(1), "1"); +assert.throws(TypeError, () => round.call({}), "plain object"); +assert.throws(TypeError, () => round.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => round.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/second/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/second/branding.js new file mode 100644 index 00000000000..da3740be35e --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/second/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.second +features: [Symbol, Temporal] +---*/ + +const second = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "second").get; + +assert.sameValue(typeof second, "function"); + +assert.throws(TypeError, () => second.call(undefined), "undefined"); +assert.throws(TypeError, () => second.call(null), "null"); +assert.throws(TypeError, () => second.call(true), "true"); +assert.throws(TypeError, () => second.call(""), "empty string"); +assert.throws(TypeError, () => second.call(Symbol()), "symbol"); +assert.throws(TypeError, () => second.call(1), "1"); +assert.throws(TypeError, () => second.call({}), "plain object"); +assert.throws(TypeError, () => second.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => second.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/since/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/since/branding.js new file mode 100644 index 00000000000..4ebb891facb --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/since/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.since +features: [Symbol, Temporal] +---*/ + +const since = Temporal.ZonedDateTime.prototype.since; + +assert.sameValue(typeof since, "function"); + +assert.throws(TypeError, () => since.call(undefined), "undefined"); +assert.throws(TypeError, () => since.call(null), "null"); +assert.throws(TypeError, () => since.call(true), "true"); +assert.throws(TypeError, () => since.call(""), "empty string"); +assert.throws(TypeError, () => since.call(Symbol()), "symbol"); +assert.throws(TypeError, () => since.call(1), "1"); +assert.throws(TypeError, () => since.call({}), "plain object"); +assert.throws(TypeError, () => since.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => since.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/startOfDay/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/startOfDay/branding.js new file mode 100644 index 00000000000..d5a80d82847 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/startOfDay/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.startofday +features: [Symbol, Temporal] +---*/ + +const startOfDay = Temporal.ZonedDateTime.prototype.startOfDay; + +assert.sameValue(typeof startOfDay, "function"); + +assert.throws(TypeError, () => startOfDay.call(undefined), "undefined"); +assert.throws(TypeError, () => startOfDay.call(null), "null"); +assert.throws(TypeError, () => startOfDay.call(true), "true"); +assert.throws(TypeError, () => startOfDay.call(""), "empty string"); +assert.throws(TypeError, () => startOfDay.call(Symbol()), "symbol"); +assert.throws(TypeError, () => startOfDay.call(1), "1"); +assert.throws(TypeError, () => startOfDay.call({}), "plain object"); +assert.throws(TypeError, () => startOfDay.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => startOfDay.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/subtract/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/subtract/branding.js new file mode 100644 index 00000000000..bae6313219d --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/subtract/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.subtract +features: [Symbol, Temporal] +---*/ + +const subtract = Temporal.ZonedDateTime.prototype.subtract; + +assert.sameValue(typeof subtract, "function"); + +assert.throws(TypeError, () => subtract.call(undefined), "undefined"); +assert.throws(TypeError, () => subtract.call(null), "null"); +assert.throws(TypeError, () => subtract.call(true), "true"); +assert.throws(TypeError, () => subtract.call(""), "empty string"); +assert.throws(TypeError, () => subtract.call(Symbol()), "symbol"); +assert.throws(TypeError, () => subtract.call(1), "1"); +assert.throws(TypeError, () => subtract.call({}), "plain object"); +assert.throws(TypeError, () => subtract.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => subtract.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/timeZone/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/timeZone/branding.js new file mode 100644 index 00000000000..33ef6aa24f5 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/timeZone/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.timezone +features: [Symbol, Temporal] +---*/ + +const timeZone = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "timeZone").get; + +assert.sameValue(typeof timeZone, "function"); + +assert.throws(TypeError, () => timeZone.call(undefined), "undefined"); +assert.throws(TypeError, () => timeZone.call(null), "null"); +assert.throws(TypeError, () => timeZone.call(true), "true"); +assert.throws(TypeError, () => timeZone.call(""), "empty string"); +assert.throws(TypeError, () => timeZone.call(Symbol()), "symbol"); +assert.throws(TypeError, () => timeZone.call(1), "1"); +assert.throws(TypeError, () => timeZone.call({}), "plain object"); +assert.throws(TypeError, () => timeZone.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => timeZone.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toInstant/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toInstant/branding.js new file mode 100644 index 00000000000..b2a45c66e47 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toInstant/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.toinstant +features: [Symbol, Temporal] +---*/ + +const toInstant = Temporal.ZonedDateTime.prototype.toInstant; + +assert.sameValue(typeof toInstant, "function"); + +assert.throws(TypeError, () => toInstant.call(undefined), "undefined"); +assert.throws(TypeError, () => toInstant.call(null), "null"); +assert.throws(TypeError, () => toInstant.call(true), "true"); +assert.throws(TypeError, () => toInstant.call(""), "empty string"); +assert.throws(TypeError, () => toInstant.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toInstant.call(1), "1"); +assert.throws(TypeError, () => toInstant.call({}), "plain object"); +assert.throws(TypeError, () => toInstant.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => toInstant.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toJSON/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toJSON/branding.js new file mode 100644 index 00000000000..9e74f7c82d1 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toJSON/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.tojson +features: [Symbol, Temporal] +---*/ + +const toJSON = Temporal.ZonedDateTime.prototype.toJSON; + +assert.sameValue(typeof toJSON, "function"); + +assert.throws(TypeError, () => toJSON.call(undefined), "undefined"); +assert.throws(TypeError, () => toJSON.call(null), "null"); +assert.throws(TypeError, () => toJSON.call(true), "true"); +assert.throws(TypeError, () => toJSON.call(""), "empty string"); +assert.throws(TypeError, () => toJSON.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toJSON.call(1), "1"); +assert.throws(TypeError, () => toJSON.call({}), "plain object"); +assert.throws(TypeError, () => toJSON.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => toJSON.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toLocaleString/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toLocaleString/branding.js new file mode 100644 index 00000000000..b6e749d832d --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toLocaleString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.tolocalestring +features: [Symbol, Temporal] +---*/ + +const toLocaleString = Temporal.ZonedDateTime.prototype.toLocaleString; + +assert.sameValue(typeof toLocaleString, "function"); + +assert.throws(TypeError, () => toLocaleString.call(undefined), "undefined"); +assert.throws(TypeError, () => toLocaleString.call(null), "null"); +assert.throws(TypeError, () => toLocaleString.call(true), "true"); +assert.throws(TypeError, () => toLocaleString.call(""), "empty string"); +assert.throws(TypeError, () => toLocaleString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toLocaleString.call(1), "1"); +assert.throws(TypeError, () => toLocaleString.call({}), "plain object"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => toLocaleString.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainDate/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainDate/branding.js new file mode 100644 index 00000000000..2d392431d12 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainDate/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.toplaindate +features: [Symbol, Temporal] +---*/ + +const toPlainDate = Temporal.ZonedDateTime.prototype.toPlainDate; + +assert.sameValue(typeof toPlainDate, "function"); + +assert.throws(TypeError, () => toPlainDate.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainDate.call(null), "null"); +assert.throws(TypeError, () => toPlainDate.call(true), "true"); +assert.throws(TypeError, () => toPlainDate.call(""), "empty string"); +assert.throws(TypeError, () => toPlainDate.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainDate.call(1), "1"); +assert.throws(TypeError, () => toPlainDate.call({}), "plain object"); +assert.throws(TypeError, () => toPlainDate.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => toPlainDate.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainDateTime/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainDateTime/branding.js new file mode 100644 index 00000000000..a54586b0097 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainDateTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.toplaindatetime +features: [Symbol, Temporal] +---*/ + +const toPlainDateTime = Temporal.ZonedDateTime.prototype.toPlainDateTime; + +assert.sameValue(typeof toPlainDateTime, "function"); + +assert.throws(TypeError, () => toPlainDateTime.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainDateTime.call(null), "null"); +assert.throws(TypeError, () => toPlainDateTime.call(true), "true"); +assert.throws(TypeError, () => toPlainDateTime.call(""), "empty string"); +assert.throws(TypeError, () => toPlainDateTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainDateTime.call(1), "1"); +assert.throws(TypeError, () => toPlainDateTime.call({}), "plain object"); +assert.throws(TypeError, () => toPlainDateTime.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => toPlainDateTime.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainMonthDay/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainMonthDay/branding.js new file mode 100644 index 00000000000..7ef4b3a907a --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainMonthDay/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.toplainmonthday +features: [Symbol, Temporal] +---*/ + +const toPlainMonthDay = Temporal.ZonedDateTime.prototype.toPlainMonthDay; + +assert.sameValue(typeof toPlainMonthDay, "function"); + +assert.throws(TypeError, () => toPlainMonthDay.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainMonthDay.call(null), "null"); +assert.throws(TypeError, () => toPlainMonthDay.call(true), "true"); +assert.throws(TypeError, () => toPlainMonthDay.call(""), "empty string"); +assert.throws(TypeError, () => toPlainMonthDay.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainMonthDay.call(1), "1"); +assert.throws(TypeError, () => toPlainMonthDay.call({}), "plain object"); +assert.throws(TypeError, () => toPlainMonthDay.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => toPlainMonthDay.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainTime/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainTime/branding.js new file mode 100644 index 00000000000..750a56e031d --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.toplaintime +features: [Symbol, Temporal] +---*/ + +const toPlainTime = Temporal.ZonedDateTime.prototype.toPlainTime; + +assert.sameValue(typeof toPlainTime, "function"); + +assert.throws(TypeError, () => toPlainTime.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainTime.call(null), "null"); +assert.throws(TypeError, () => toPlainTime.call(true), "true"); +assert.throws(TypeError, () => toPlainTime.call(""), "empty string"); +assert.throws(TypeError, () => toPlainTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainTime.call(1), "1"); +assert.throws(TypeError, () => toPlainTime.call({}), "plain object"); +assert.throws(TypeError, () => toPlainTime.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => toPlainTime.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainYearMonth/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainYearMonth/branding.js new file mode 100644 index 00000000000..abbfc5c29c3 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toPlainYearMonth/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.toplainyearmonth +features: [Symbol, Temporal] +---*/ + +const toPlainYearMonth = Temporal.ZonedDateTime.prototype.toPlainYearMonth; + +assert.sameValue(typeof toPlainYearMonth, "function"); + +assert.throws(TypeError, () => toPlainYearMonth.call(undefined), "undefined"); +assert.throws(TypeError, () => toPlainYearMonth.call(null), "null"); +assert.throws(TypeError, () => toPlainYearMonth.call(true), "true"); +assert.throws(TypeError, () => toPlainYearMonth.call(""), "empty string"); +assert.throws(TypeError, () => toPlainYearMonth.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toPlainYearMonth.call(1), "1"); +assert.throws(TypeError, () => toPlainYearMonth.call({}), "plain object"); +assert.throws(TypeError, () => toPlainYearMonth.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => toPlainYearMonth.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/toString/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/toString/branding.js new file mode 100644 index 00000000000..af5e7635de9 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/toString/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.tostring +features: [Symbol, Temporal] +---*/ + +const toString = Temporal.ZonedDateTime.prototype.toString; + +assert.sameValue(typeof toString, "function"); + +assert.throws(TypeError, () => toString.call(undefined), "undefined"); +assert.throws(TypeError, () => toString.call(null), "null"); +assert.throws(TypeError, () => toString.call(true), "true"); +assert.throws(TypeError, () => toString.call(""), "empty string"); +assert.throws(TypeError, () => toString.call(Symbol()), "symbol"); +assert.throws(TypeError, () => toString.call(1), "1"); +assert.throws(TypeError, () => toString.call({}), "plain object"); +assert.throws(TypeError, () => toString.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => toString.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/until/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/until/branding.js new file mode 100644 index 00000000000..470ca70a279 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/until/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.until +features: [Symbol, Temporal] +---*/ + +const until = Temporal.ZonedDateTime.prototype.until; + +assert.sameValue(typeof until, "function"); + +assert.throws(TypeError, () => until.call(undefined), "undefined"); +assert.throws(TypeError, () => until.call(null), "null"); +assert.throws(TypeError, () => until.call(true), "true"); +assert.throws(TypeError, () => until.call(""), "empty string"); +assert.throws(TypeError, () => until.call(Symbol()), "symbol"); +assert.throws(TypeError, () => until.call(1), "1"); +assert.throws(TypeError, () => until.call({}), "plain object"); +assert.throws(TypeError, () => until.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => until.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/valueOf/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/valueOf/branding.js new file mode 100644 index 00000000000..5996ccd310c --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/valueOf/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.valueof +features: [Symbol, Temporal] +---*/ + +const valueOf = Temporal.ZonedDateTime.prototype.valueOf; + +assert.sameValue(typeof valueOf, "function"); + +assert.throws(TypeError, () => valueOf.call(undefined), "undefined"); +assert.throws(TypeError, () => valueOf.call(null), "null"); +assert.throws(TypeError, () => valueOf.call(true), "true"); +assert.throws(TypeError, () => valueOf.call(""), "empty string"); +assert.throws(TypeError, () => valueOf.call(Symbol()), "symbol"); +assert.throws(TypeError, () => valueOf.call(1), "1"); +assert.throws(TypeError, () => valueOf.call({}), "plain object"); +assert.throws(TypeError, () => valueOf.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => valueOf.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/weekOfYear/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/weekOfYear/branding.js new file mode 100644 index 00000000000..97e30f7c70c --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/weekOfYear/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.weekofyear +features: [Symbol, Temporal] +---*/ + +const weekOfYear = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "weekOfYear").get; + +assert.sameValue(typeof weekOfYear, "function"); + +assert.throws(TypeError, () => weekOfYear.call(undefined), "undefined"); +assert.throws(TypeError, () => weekOfYear.call(null), "null"); +assert.throws(TypeError, () => weekOfYear.call(true), "true"); +assert.throws(TypeError, () => weekOfYear.call(""), "empty string"); +assert.throws(TypeError, () => weekOfYear.call(Symbol()), "symbol"); +assert.throws(TypeError, () => weekOfYear.call(1), "1"); +assert.throws(TypeError, () => weekOfYear.call({}), "plain object"); +assert.throws(TypeError, () => weekOfYear.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => weekOfYear.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/with/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/with/branding.js new file mode 100644 index 00000000000..94e8ee9cf72 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/with/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.with +features: [Symbol, Temporal] +---*/ + +const with_ = Temporal.ZonedDateTime.prototype.with; + +assert.sameValue(typeof with_, "function"); + +assert.throws(TypeError, () => with_.call(undefined), "undefined"); +assert.throws(TypeError, () => with_.call(null), "null"); +assert.throws(TypeError, () => with_.call(true), "true"); +assert.throws(TypeError, () => with_.call(""), "empty string"); +assert.throws(TypeError, () => with_.call(Symbol()), "symbol"); +assert.throws(TypeError, () => with_.call(1), "1"); +assert.throws(TypeError, () => with_.call({}), "plain object"); +assert.throws(TypeError, () => with_.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => with_.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/withCalendar/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/withCalendar/branding.js new file mode 100644 index 00000000000..b01bb4a2e50 --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/withCalendar/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.withcalendar +features: [Symbol, Temporal] +---*/ + +const withCalendar = Temporal.ZonedDateTime.prototype.withCalendar; + +assert.sameValue(typeof withCalendar, "function"); + +assert.throws(TypeError, () => withCalendar.call(undefined), "undefined"); +assert.throws(TypeError, () => withCalendar.call(null), "null"); +assert.throws(TypeError, () => withCalendar.call(true), "true"); +assert.throws(TypeError, () => withCalendar.call(""), "empty string"); +assert.throws(TypeError, () => withCalendar.call(Symbol()), "symbol"); +assert.throws(TypeError, () => withCalendar.call(1), "1"); +assert.throws(TypeError, () => withCalendar.call({}), "plain object"); +assert.throws(TypeError, () => withCalendar.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => withCalendar.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/branding.js new file mode 100644 index 00000000000..06f41fd1f3b --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.withplaindate +features: [Symbol, Temporal] +---*/ + +const withPlainDate = Temporal.ZonedDateTime.prototype.withPlainDate; + +assert.sameValue(typeof withPlainDate, "function"); + +assert.throws(TypeError, () => withPlainDate.call(undefined), "undefined"); +assert.throws(TypeError, () => withPlainDate.call(null), "null"); +assert.throws(TypeError, () => withPlainDate.call(true), "true"); +assert.throws(TypeError, () => withPlainDate.call(""), "empty string"); +assert.throws(TypeError, () => withPlainDate.call(Symbol()), "symbol"); +assert.throws(TypeError, () => withPlainDate.call(1), "1"); +assert.throws(TypeError, () => withPlainDate.call({}), "plain object"); +assert.throws(TypeError, () => withPlainDate.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => withPlainDate.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainTime/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainTime/branding.js new file mode 100644 index 00000000000..fa4a6b18add --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainTime/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.withplaintime +features: [Symbol, Temporal] +---*/ + +const withPlainTime = Temporal.ZonedDateTime.prototype.withPlainTime; + +assert.sameValue(typeof withPlainTime, "function"); + +assert.throws(TypeError, () => withPlainTime.call(undefined), "undefined"); +assert.throws(TypeError, () => withPlainTime.call(null), "null"); +assert.throws(TypeError, () => withPlainTime.call(true), "true"); +assert.throws(TypeError, () => withPlainTime.call(""), "empty string"); +assert.throws(TypeError, () => withPlainTime.call(Symbol()), "symbol"); +assert.throws(TypeError, () => withPlainTime.call(1), "1"); +assert.throws(TypeError, () => withPlainTime.call({}), "plain object"); +assert.throws(TypeError, () => withPlainTime.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => withPlainTime.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/withTimeZone/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/withTimeZone/branding.js new file mode 100644 index 00000000000..ad51e6c563f --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/withTimeZone/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.zoneddatetime.prototype.withtimezone +features: [Symbol, Temporal] +---*/ + +const withTimeZone = Temporal.ZonedDateTime.prototype.withTimeZone; + +assert.sameValue(typeof withTimeZone, "function"); + +assert.throws(TypeError, () => withTimeZone.call(undefined), "undefined"); +assert.throws(TypeError, () => withTimeZone.call(null), "null"); +assert.throws(TypeError, () => withTimeZone.call(true), "true"); +assert.throws(TypeError, () => withTimeZone.call(""), "empty string"); +assert.throws(TypeError, () => withTimeZone.call(Symbol()), "symbol"); +assert.throws(TypeError, () => withTimeZone.call(1), "1"); +assert.throws(TypeError, () => withTimeZone.call({}), "plain object"); +assert.throws(TypeError, () => withTimeZone.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => withTimeZone.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/year/branding.js b/test/built-ins/Temporal/ZonedDateTime/prototype/year/branding.js new file mode 100644 index 00000000000..56e4f49a96a --- /dev/null +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/year/branding.js @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-temporal.zoneddatetime.prototype.year +features: [Symbol, Temporal] +---*/ + +const year = Object.getOwnPropertyDescriptor(Temporal.ZonedDateTime.prototype, "year").get; + +assert.sameValue(typeof year, "function"); + +assert.throws(TypeError, () => year.call(undefined), "undefined"); +assert.throws(TypeError, () => year.call(null), "null"); +assert.throws(TypeError, () => year.call(true), "true"); +assert.throws(TypeError, () => year.call(""), "empty string"); +assert.throws(TypeError, () => year.call(Symbol()), "symbol"); +assert.throws(TypeError, () => year.call(1), "1"); +assert.throws(TypeError, () => year.call({}), "plain object"); +assert.throws(TypeError, () => year.call(Temporal.ZonedDateTime), "Temporal.ZonedDateTime"); +assert.throws(TypeError, () => year.call(Temporal.ZonedDateTime.prototype), "Temporal.ZonedDateTime.prototype");