From 83225372c1700ab4f0516acab2b033ee3af89340 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Wed, 29 Sep 2021 13:27:22 -0700 Subject: [PATCH] Remove duplicate tests While working on adding the Temporal tests from tc39/proposal-temporal I noticed that these tests tested the same thing as each of the branding.js tests in the same directory. This removes the duplicate tests. --- ...throw-type-error-from-RequireInternalSlot.js | 17 ----------------- ...throw-type-error-from-RequireInternalSlot.js | 15 --------------- .../throws-type-error-RequireInternalSlot.js | 16 ---------------- .../day/throw-type-error-RequireInternalSlot.js | 15 --------------- .../throw-type-error-RequireInternalSlot.js | 16 ---------------- .../throw-type-error-RequireInternalSlot.js | 16 ---------------- .../throw-type-error-RequireInternalSlot.js | 16 ---------------- .../throw-type-error-RequireInternalSlot.js | 16 ---------------- .../throw-type-error-RequireInternalSlot.js | 16 ---------------- .../throw-type-error-RequireInternalSlot.js | 15 --------------- .../throw-type-error-RequireInternalSlot.js | 15 --------------- .../throw-type-error-RequireInternalSlot.js | 17 ----------------- 12 files changed, 190 deletions(-) delete mode 100644 test/built-ins/Temporal/Calendar/prototype/dateAdd/throw-type-error-from-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/dateFromFields/throw-type-error-from-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/dateUntil/throws-type-error-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/day/throw-type-error-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/dayOfWeek/throw-type-error-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/dayOfYear/throw-type-error-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/daysInMonth/throw-type-error-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/daysInWeek/throw-type-error-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/daysInYear/throw-type-error-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/month/throw-type-error-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/monthCode/throw-type-error-RequireInternalSlot.js delete mode 100644 test/built-ins/Temporal/Calendar/prototype/year/throw-type-error-RequireInternalSlot.js diff --git a/test/built-ins/Temporal/Calendar/prototype/dateAdd/throw-type-error-from-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/dateAdd/throw-type-error-from-RequireInternalSlot.js deleted file mode 100644 index d136a12e776..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/dateAdd/throw-type-error-from-RequireInternalSlot.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-temporal.calendar.prototype.dateadd -description: Temporal.Calendar.prototype.dateAdd should throw if calendar does not have required internal slot -info: | - 1. Let calendar be the this value. - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { dateAdd: cal.dateAdd }; -assert.throws(TypeError, - () => badCal.dateAdd("2020-02-29", new Temporal.Duration(1)), - 'badCal.dateAdd("2020-02-29", new Temporal.Duration(1)) throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/dateFromFields/throw-type-error-from-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/dateFromFields/throw-type-error-from-RequireInternalSlot.js deleted file mode 100644 index deeb41d5eb9..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/dateFromFields/throw-type-error-from-RequireInternalSlot.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-temporal.calendar.prototype.datefromfields -description: Temporal.Calendar.prototype.dateFromFields should throw TypeError while calendar has no [[InitializedTemporalCalendar]] -info: | - 1. Let calendar be the this value. - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601") -let badCal = {dateFromFields: cal.dateFromFields}; - -assert.throws(TypeError, () => badCal.dateFromFields({}), - 'badCal.dateFromFields({}) throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/dateUntil/throws-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/dateUntil/throws-type-error-RequireInternalSlot.js deleted file mode 100644 index 11cec1895ac..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/dateUntil/throws-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-temporal.calendar.prototype.dateuntil -description: Temporal.Calendar.prototype.dateUntil throw TypeError on RequireInternalSlot -info: | - 1. Let calendar be the this value. - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); -let badCal = { dateUntil: cal.dateUntil }; - -assert.throws(TypeError, () => badCal.dateUntil("2021-07-16", "2021-07-17"), - 'badCal.dateUntil("2021-07-16", "2021-07-17") throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/day/throw-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/day/throw-type-error-RequireInternalSlot.js deleted file mode 100644 index 6e20d92532a..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/day/throw-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-temporal.calendar.prototype.day -description: Temporal.Calendar.prototype.day throws TypeError on RequireInternalSlot if object has no internal slot. -info: | - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { day: cal.day } -assert.throws(TypeError, () => badCal.day("2021-03-04"), - 'badCal.day("2021-03-04") throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/throw-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/throw-type-error-RequireInternalSlot.js deleted file mode 100644 index 4789506a234..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/dayOfWeek/throw-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-temporal.calendar.prototype.dayOfWeek -description: > - Temporal.Calendar.prototype.dayOfWeek throws TypeError - when the internal lot is not presented. -info: | - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { dayOfWeek: cal.dayOfWeek } -assert.throws(TypeError, () => badCal.dayOfWeek("2021-03-04"), - 'badCal.dayOfWeek("2021-03-04") throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/dayOfYear/throw-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/dayOfYear/throw-type-error-RequireInternalSlot.js deleted file mode 100644 index 5a20fc24550..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/dayOfYear/throw-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-temporal.calendar.prototype.dayOfYear -description: > - Temporal.Calendar.prototype.dayOfYear throws TypeError - when the internal lot is not presented. -info: | - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { dayOfYear: cal.dayOfYear } -assert.throws(TypeError, () => badCal.dayOfYear("2021-03-04"), - 'badCal.dayOfYear("2021-03-04") throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInMonth/throw-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/daysInMonth/throw-type-error-RequireInternalSlot.js deleted file mode 100644 index 687183a66b5..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/daysInMonth/throw-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-temporal.calendar.prototype.daysInMonth -description: > - Temporal.Calendar.prototype.daysInMonth throws TypeError - when the internal lot is not presented. -info: | - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { daysInMonth: cal.daysInMonth } -assert.throws(TypeError, () => badCal.daysInMonth("2021-03-04"), - 'badCal.daysInMonth("2021-03-04") throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInWeek/throw-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/daysInWeek/throw-type-error-RequireInternalSlot.js deleted file mode 100644 index 13809d09128..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/daysInWeek/throw-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-temporal.calendar.prototype.daysInWeek -description: > - Temporal.Calendar.prototype.daysInWeek throws TypeError - when the internal lot is not presented. -info: | - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { daysInWeek: cal.daysInWeek } -assert.throws(TypeError, () => badCal.daysInWeek("2021-03-04"), - 'badCal.daysInWeek("2021-03-04") throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/daysInYear/throw-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/daysInYear/throw-type-error-RequireInternalSlot.js deleted file mode 100644 index 0a474d52f54..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/daysInYear/throw-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-temporal.calendar.prototype.daysInYear -description: > - Temporal.Calendar.prototype.daysInYear throws TypeError - when the internal lot is not presented. -info: | - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { daysInYear: cal.daysInYear } -assert.throws(TypeError, () => badCal.daysInYear("2021-03-04"), - 'badCal.daysInYear("2021-03-04") throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/month/throw-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/month/throw-type-error-RequireInternalSlot.js deleted file mode 100644 index 3cc23ad3d3f..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/month/throw-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-temporal.calendar.prototype.month -description: Temporal.Calendar.prototype.month throws TypeError on RequireInternalSlot if object has no internal slot. -info: | - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { month: cal.month } -assert.throws(TypeError, () => badCal.month("2021-03-04"), - 'badCal.month("2021-03-04") throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/monthCode/throw-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/monthCode/throw-type-error-RequireInternalSlot.js deleted file mode 100644 index 8fdfbe2114b..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/monthCode/throw-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-temporal.calendar.prototype.monthCode -description: Temporal.Calendar.prototype.monthCode throws TypeError on RequireInternalSlot if object has no internal slot. -info: | - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { monthCode: cal.monthCode} -assert.throws(TypeError, () => badCal.monthCode("2021-03-04"), - 'badCal.monthCode("2021-03-04") throws a TypeError exception'); diff --git a/test/built-ins/Temporal/Calendar/prototype/year/throw-type-error-RequireInternalSlot.js b/test/built-ins/Temporal/Calendar/prototype/year/throw-type-error-RequireInternalSlot.js deleted file mode 100644 index cd8dd681fb8..00000000000 --- a/test/built-ins/Temporal/Calendar/prototype/year/throw-type-error-RequireInternalSlot.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2021 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-temporal.calendar.prototype.year -description: > - Temporal.Calendar.prototype.year throws TypeError on - RequireInternalSlot if object has no internal slot. -info: | - 2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]). -features: [Temporal, arrow-function] ----*/ -let cal = new Temporal.Calendar("iso8601"); - -let badCal = { year: cal.year } -assert.throws(TypeError, () => badCal.year("2021-03-04"), - 'badCal.year("2021-03-04") throws a TypeError exception');