mirror of https://github.com/tc39/test262.git
Fix errors
This commit is contained in:
parent
085cb50b25
commit
6d97fa208a
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -19,5 +19,5 @@ features: [Intl.Segmenter]
|
|||
---*/
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
new Intl.DisplayNames(undefined, null);
|
||||
new Intl.Segmenter(undefined, null);
|
||||
}, 'null');
|
||||
|
|
Loading…
Reference in New Issue