From 6d97fa208ac4d0683f4e36f87ba84d5b840c5c2e Mon Sep 17 00:00:00 2001 From: Frank Tang Date: Wed, 12 Aug 2020 14:31:03 -0700 Subject: [PATCH] Fix errors --- .../constructor/options-granularity-abrupt-throws.js | 6 +++--- .../options-granularity-toString-abrupt-throws.js | 10 +++++----- .../Segmenter/constructor/constructor/options-null.js | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/intl402/Segmenter/constructor/constructor/options-granularity-abrupt-throws.js b/test/intl402/Segmenter/constructor/constructor/options-granularity-abrupt-throws.js index 9a2a562f87..ceebbfe70a 100644 --- a/test/intl402/Segmenter/constructor/constructor/options-granularity-abrupt-throws.js +++ b/test/intl402/Segmenter/constructor/constructor/options-granularity-abrupt-throws.js @@ -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); }); diff --git a/test/intl402/Segmenter/constructor/constructor/options-granularity-toString-abrupt-throws.js b/test/intl402/Segmenter/constructor/constructor/options-granularity-toString-abrupt-throws.js index 02bd67f304..f72bd94a21 100644 --- a/test/intl402/Segmenter/constructor/constructor/options-granularity-toString-abrupt-throws.js +++ b/test/intl402/Segmenter/constructor/constructor/options-granularity-toString-abrupt-throws.js @@ -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); diff --git a/test/intl402/Segmenter/constructor/constructor/options-null.js b/test/intl402/Segmenter/constructor/constructor/options-null.js index ee6495bf8d..cf796fb189 100644 --- a/test/intl402/Segmenter/constructor/constructor/options-null.js +++ b/test/intl402/Segmenter/constructor/constructor/options-null.js @@ -19,5 +19,5 @@ features: [Intl.Segmenter] ---*/ assert.throws(TypeError, () => { - new Intl.DisplayNames(undefined, null); + new Intl.Segmenter(undefined, null); }, 'null');