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

View File

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

View File

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