diff --git a/test/intl402/Locale/prototype/baseName/branding.js b/test/intl402/Locale/prototype/baseName/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..dc464a228fafe3bdd9360edfd495d3e09260c001 --- /dev/null +++ b/test/intl402/Locale/prototype/baseName/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.baseName +description: > + Verifies the branding check for the "baseName" property of the Locale prototype object. +info: | + Intl.Locale.prototype.baseName + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "baseName"); +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/calendar/branding.js b/test/intl402/Locale/prototype/calendar/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..ee26b0bfdc56149cf3c04f5b2eb7f9a21e89a5f7 --- /dev/null +++ b/test/intl402/Locale/prototype/calendar/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.calendar +description: > + Verifies the branding check for the "calendar" property of the Locale prototype object. +info: | + Intl.Locale.prototype.calendar + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "calendar"); +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/caseFirst/branding.js b/test/intl402/Locale/prototype/caseFirst/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..52f8cf651b0b214fd8a418b55cb516be079dd02b --- /dev/null +++ b/test/intl402/Locale/prototype/caseFirst/branding.js @@ -0,0 +1,32 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.caseFirst +description: > + Verifies the branding check for the "caseFirst" property of the Locale prototype object. +info: | + Intl.Locale.prototype.caseFirst + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "caseFirst"); +if (propdesc !== undefined) { + const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, + ]; + + for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); + } +} diff --git a/test/intl402/Locale/prototype/collation/branding.js b/test/intl402/Locale/prototype/collation/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..b9cabcc028382b8651c99aaf35bcd1008f46b56d --- /dev/null +++ b/test/intl402/Locale/prototype/collation/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.collation +description: > + Verifies the branding check for the "collation" property of the Locale prototype object. +info: | + Intl.Locale.prototype.collation + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "collation"); +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/hourCycle/branding.js b/test/intl402/Locale/prototype/hourCycle/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..b159d30c5cc2a6b32d5bc8e9742c4190b29982bb --- /dev/null +++ b/test/intl402/Locale/prototype/hourCycle/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.hourCycle +description: > + Verifies the branding check for the "hourCycle" property of the Locale prototype object. +info: | + Intl.Locale.prototype.hourCycle + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "hourCycle"); +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/language/branding.js b/test/intl402/Locale/prototype/language/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..47589a9aa11459eaa0674798516750bd323c4c44 --- /dev/null +++ b/test/intl402/Locale/prototype/language/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.language +description: > + Verifies the branding check for the "language" property of the Locale prototype object. +info: | + Intl.Locale.prototype.language + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "language"); +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/maximize/branding.js b/test/intl402/Locale/prototype/maximize/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..83c6e28c31116017c0eb65a77baa9e55d8e22560 --- /dev/null +++ b/test/intl402/Locale/prototype/maximize/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.maximize +description: > + Verifies the branding check for the "maximize" function of the Locale prototype object. +info: | + Intl.Locale.prototype.maximize + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const fn = Intl.Locale.prototype.maximize; +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => fn.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/minimize/branding.js b/test/intl402/Locale/prototype/minimize/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..41f42e692a6e672dfde1e9f18e6d3a4ed1af5eae --- /dev/null +++ b/test/intl402/Locale/prototype/minimize/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.minimize +description: > + Verifies the branding check for the "minimize" function of the Locale prototype object. +info: | + Intl.Locale.prototype.minimize + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const fn = Intl.Locale.prototype.minimize; +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => fn.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/numberingSystem/branding.js b/test/intl402/Locale/prototype/numberingSystem/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..9d07a48138a1fb575d7c4c876ad0f9c90897d72b --- /dev/null +++ b/test/intl402/Locale/prototype/numberingSystem/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.numberingSystem +description: > + Verifies the branding check for the "numberingSystem" property of the Locale prototype object. +info: | + Intl.Locale.prototype.numberingSystem + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numberingSystem"); +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/numeric/branding.js b/test/intl402/Locale/prototype/numeric/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..eb5e2f0cd6c1832c5479d7fad94fa57b742f93e5 --- /dev/null +++ b/test/intl402/Locale/prototype/numeric/branding.js @@ -0,0 +1,32 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.numeric +description: > + Verifies the branding check for the "numeric" property of the Locale prototype object. +info: | + Intl.Locale.prototype.numeric + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numeric"); +if (propdesc !== undefined) { + const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, + ]; + + for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); + } +} diff --git a/test/intl402/Locale/prototype/region/branding.js b/test/intl402/Locale/prototype/region/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..90350560f0154754100c82929a38decb14b90311 --- /dev/null +++ b/test/intl402/Locale/prototype/region/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.region +description: > + Verifies the branding check for the "region" property of the Locale prototype object. +info: | + Intl.Locale.prototype.region + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "region"); +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/script/branding.js b/test/intl402/Locale/prototype/script/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..d74f2e11ab3d90699b7249b3187324e95827a60e --- /dev/null +++ b/test/intl402/Locale/prototype/script/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.script +description: > + Verifies the branding check for the "script" property of the Locale prototype object. +info: | + Intl.Locale.prototype.script + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "script"); +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => propdesc.get.call(invalidValue)); +} diff --git a/test/intl402/Locale/prototype/toString/branding.js b/test/intl402/Locale/prototype/toString/branding.js new file mode 100644 index 0000000000000000000000000000000000000000..25d85a5758803ce84522193e6644c1c38060d7db --- /dev/null +++ b/test/intl402/Locale/prototype/toString/branding.js @@ -0,0 +1,30 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-Intl.Locale.prototype.toString +description: > + Verifies the branding check for the "toString" function of the Locale prototype object. +info: | + Intl.Locale.prototype.toString + + 2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then + a. Throw a TypeError exception. +features: [Intl.Locale] +---*/ + +const fn = Intl.Locale.prototype.toString; +const invalidValues = [ + undefined, + null, + true, + "", + Symbol(), + 1, + {}, + Intl.Locale.prototype, +]; + +for (const invalidValue of invalidValues) { + assert.throws(TypeError, () => fn.call(invalidValue)); +}