Fix errors

This commit is contained in:
Frank Tang 2020-08-12 14:31:03 -07:00 committed by Rick Waldron
parent 085cb50b25
commit 6d97fa208a
3 changed files with 9 additions and 9 deletions

View File

@ -4,7 +4,7 @@
/*--- /*---
esid: sec-intl.segmenter esid: sec-intl.segmenter
description: description:
Return abrupt completion from GetOption localeMatcher Return abrupt completion from GetOption granularity
info: | info: |
Intl.Segmenter ([ locales [ , options ]]) Intl.Segmenter ([ locales [ , options ]])
@ -17,10 +17,10 @@ features: [Intl.Segmenter]
var options = {}; var options = {};
Object.defineProperty(options, 'localeMatcher', { Object.defineProperty(options, 'granularity', {
get() { throw new Test262Error(); }, get() { throw new Test262Error(); },
}); });
assert.throws(Test262Error, () => { assert.throws(Test262Error, () => {
new Intl.DisplayNames(undefined, options); new Intl.Segmenter(undefined, options);
}); });

View File

@ -4,7 +4,7 @@
/*--- /*---
esid: sec-intl.segmenter esid: sec-intl.segmenter
description: description:
Return abrupt completion from GetOption localeMatcher Return abrupt completion from GetOption granularity
info: | info: |
Intl.Segmenter ([ locales [ , options ]]) Intl.Segmenter ([ locales [ , options ]])
@ -17,7 +17,7 @@ features: [Intl.Segmenter, Symbol]
---*/ ---*/
var options = { var options = {
localeMatcher: { granularity: {
toString() { toString() {
throw new Test262Error(); throw new Test262Error();
} }
@ -28,7 +28,7 @@ assert.throws(Test262Error, () => {
new Intl.Segmenter(undefined, options); new Intl.Segmenter(undefined, options);
}, 'from toString'); }, 'from toString');
options.localeMatcher = { options.granularity = {
toString: undefined, toString: undefined,
valueOf() { valueOf() {
throw new Test262Error(); throw new Test262Error();
@ -39,7 +39,7 @@ assert.throws(Test262Error, () => {
new Intl.Segmenter(undefined, options); new Intl.Segmenter(undefined, options);
}, 'from valueOf'); }, 'from valueOf');
options.localeMatcher = { options.granularity = {
[Symbol.toPrimitive]() { [Symbol.toPrimitive]() {
throw new Test262Error(); throw new Test262Error();
} }
@ -49,7 +49,7 @@ assert.throws(Test262Error, () => {
new Intl.Segmenter(undefined, options); new Intl.Segmenter(undefined, options);
}, 'from ToPrimitive'); }, 'from ToPrimitive');
options.localeMatcher = Symbol(); options.granularity = Symbol();
assert.throws(TypeError, () => { assert.throws(TypeError, () => {
new Intl.Segmenter(undefined, options); new Intl.Segmenter(undefined, options);

View File

@ -19,5 +19,5 @@ features: [Intl.Segmenter]
---*/ ---*/
assert.throws(TypeError, () => { assert.throws(TypeError, () => {
new Intl.DisplayNames(undefined, null); new Intl.Segmenter(undefined, null);
}, 'null'); }, 'null');