mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 22:15:24 +02:00
Fix errors
This commit is contained in:
parent
085cb50b25
commit
6d97fa208a
@ -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);
|
||||||
});
|
});
|
||||||
|
@ -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);
|
||||||
|
@ -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');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user