forked from tc39/test262
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bb53ae
commit ba0d235
Showing
54 changed files
with
533 additions
and
579 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2023 Google Inc. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-Intl.Locale.prototype.getCalendars | ||
description: Verifies the branding check for the "getCalendars" function of the Locale prototype object. | ||
info: | | ||
Intl.Locale.prototype.getCalendars () | ||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]). | ||
features: [Intl.Locale,Intl.Locale-info] | ||
---*/ | ||
|
||
const getCalendars = Intl.Locale.prototype.getCalendars; | ||
|
||
assert.sameValue(typeof getCalendars, "function"); | ||
|
||
assert.throws(TypeError, () => getCalendars.call(undefined), "undefined"); | ||
assert.throws(TypeError, () => getCalendars.call(null), "null"); | ||
assert.throws(TypeError, () => getCalendars.call(true), "true"); | ||
assert.throws(TypeError, () => getCalendars.call(""), "empty string"); | ||
assert.throws(TypeError, () => getCalendars.call(Symbol()), "symbol"); | ||
assert.throws(TypeError, () => getCalendars.call(1), "1"); | ||
assert.throws(TypeError, () => getCalendars.call({}), "plain object"); | ||
assert.throws(TypeError, () => getCalendars.call(Intl.Locale), "Intl.Locale"); | ||
assert.throws(TypeError, () => getCalendars.call(Intl.Locale.prototype), "Intl.Locale.prototype"); |
14 changes: 6 additions & 8 deletions
14
...intl402/Locale/prototype/weekInfo/name.js → ...402/Locale/prototype/getCalendars/name.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2023 Google Inc. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-Intl.Locale.prototype.getCalendars | ||
description: Checks the "getCalendars" property of the Locale prototype object. | ||
info: | | ||
Intl.Locale.prototype.getCalendars () | ||
Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. | ||
Every other data property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. | ||
includes: [propertyHelper.js] | ||
features: [Intl.Locale,Intl.Locale-info] | ||
---*/ | ||
|
||
assert.sameValue( | ||
typeof Intl.Locale.prototype.getCalendars, | ||
"function", | ||
"typeof Intl.Locale.prototype.getCalendars is function" | ||
); | ||
|
||
verifyProperty(Intl.Locale.prototype, "getCalendars", { | ||
writable: true, | ||
enumerable: false, | ||
configurable: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2023 Google Inc. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-Intl.Locale.prototype.getCollations | ||
description: Verifies the branding check for the "getCollations" function of the Locale prototype object. | ||
info: | | ||
Intl.Locale.prototype.getCollations () | ||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]). | ||
features: [Intl.Locale,Intl.Locale-info] | ||
---*/ | ||
|
||
const getCollations = Intl.Locale.prototype.getCollations; | ||
|
||
assert.sameValue(typeof getCollations, "function"); | ||
|
||
assert.throws(TypeError, () => getCollations.call(undefined), "undefined"); | ||
assert.throws(TypeError, () => getCollations.call(null), "null"); | ||
assert.throws(TypeError, () => getCollations.call(true), "true"); | ||
assert.throws(TypeError, () => getCollations.call(""), "empty string"); | ||
assert.throws(TypeError, () => getCollations.call(Symbol()), "symbol"); | ||
assert.throws(TypeError, () => getCollations.call(1), "1"); | ||
assert.throws(TypeError, () => getCollations.call({}), "plain object"); | ||
assert.throws(TypeError, () => getCollations.call(Intl.Locale), "Intl.Locale"); | ||
assert.throws(TypeError, () => getCollations.call(Intl.Locale.prototype), "Intl.Locale.prototype"); |
14 changes: 6 additions & 8 deletions
14
...intl402/Locale/prototype/textInfo/name.js → ...02/Locale/prototype/getCollations/name.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2023 Google Inc. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-Intl.Locale.prototype.getCollations | ||
description: Checks the "getCollations" property of the Locale prototype object. | ||
info: | | ||
Intl.Locale.prototype.getCollations () | ||
Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. | ||
Every other data property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. | ||
includes: [propertyHelper.js] | ||
features: [Intl.Locale,Intl.Locale-info] | ||
---*/ | ||
|
||
assert.sameValue( | ||
typeof Intl.Locale.prototype.getCollations, | ||
"function", | ||
"typeof Intl.Locale.prototype.getCollations is function" | ||
); | ||
|
||
verifyProperty(Intl.Locale.prototype, "getCollations", { | ||
writable: true, | ||
enumerable: false, | ||
configurable: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2023 Google Inc. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-Intl.Locale.prototype.getHourCycles | ||
description: Verifies the branding check for the "getHourCycles" function of the Locale prototype object. | ||
info: | | ||
Intl.Locale.prototype.getHourCycles () | ||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]). | ||
features: [Intl.Locale,Intl.Locale-info] | ||
---*/ | ||
|
||
const getHourCycles = Intl.Locale.prototype.getHourCycles; | ||
|
||
assert.sameValue(typeof getHourCycles, "function"); | ||
|
||
assert.throws(TypeError, () => getHourCycles.call(undefined), "undefined"); | ||
assert.throws(TypeError, () => getHourCycles.call(null), "null"); | ||
assert.throws(TypeError, () => getHourCycles.call(true), "true"); | ||
assert.throws(TypeError, () => getHourCycles.call(""), "empty string"); | ||
assert.throws(TypeError, () => getHourCycles.call(Symbol()), "symbol"); | ||
assert.throws(TypeError, () => getHourCycles.call(1), "1"); | ||
assert.throws(TypeError, () => getHourCycles.call({}), "plain object"); | ||
assert.throws(TypeError, () => getHourCycles.call(Intl.Locale), "Intl.Locale"); | ||
assert.throws(TypeError, () => getHourCycles.call(Intl.Locale.prototype), "Intl.Locale.prototype"); |
Oops, something went wrong.