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 f72bd94a21..dd4ec06a95 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 @@ -12,7 +12,8 @@ info: | 13. Let granularity be ? GetOption(options, "granularity", "string", « "grapheme", "word", "sentence" », "grapheme"). GetOption ( options, property, type, values, fallback ) - 1. Let value be ? Get(options, property). + 6. If type is "string", then + a. Let value be ? ToString(value). features: [Intl.Segmenter, Symbol] ---*/ diff --git a/test/intl402/Segmenter/constructor/constructor/options-localeMatcher-toString-abrupt-throws.js b/test/intl402/Segmenter/constructor/constructor/options-localeMatcher-toString-abrupt-throws.js index 9ad85341e3..bde281d7ef 100644 --- a/test/intl402/Segmenter/constructor/constructor/options-localeMatcher-toString-abrupt-throws.js +++ b/test/intl402/Segmenter/constructor/constructor/options-localeMatcher-toString-abrupt-throws.js @@ -19,8 +19,8 @@ info: | 8. Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit"). GetOption ( options, property, type, values, fallback ) - - 1. Let value be ? Get(options, property). + 6. If type is "string", then + a. Let value be ? ToString(value). ... features: [Intl.Segmenter, Symbol] ---*/ diff --git a/test/intl402/Segmenter/constructor/constructor/options-localeMatcher-valid.js b/test/intl402/Segmenter/constructor/constructor/options-localeMatcher-valid.js index acc3a650f7..650ecd3f06 100644 --- a/test/intl402/Segmenter/constructor/constructor/options-localeMatcher-valid.js +++ b/test/intl402/Segmenter/constructor/constructor/options-localeMatcher-valid.js @@ -31,7 +31,7 @@ const localeMatchers = [ ]; localeMatchers.forEach(localeMatcher => { - const obj = new Intl.Segmenter(); + const obj = new Intl.Segmenter(undefined, { localeMatcher }); assert(obj instanceof Intl.Segmenter, `instanceof check - ${localeMatcher}`); assert.sameValue(Object.getPrototypeOf(obj), Intl.Segmenter.prototype, `proto check - ${localeMatcher}`); diff --git a/test/intl402/Segmenter/ctor-custom-get-prototype-poison-throws.js b/test/intl402/Segmenter/ctor-custom-get-prototype-poison-throws.js index 94fd1871f3..75db21c858 100644 --- a/test/intl402/Segmenter/ctor-custom-get-prototype-poison-throws.js +++ b/test/intl402/Segmenter/ctor-custom-get-prototype-poison-throws.js @@ -16,10 +16,6 @@ info: | ... GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto ) 3. Let proto be ? Get(constructor, "prototype"). - 4. If Type(proto) is not Object, then - a. Let realm be ? GetFunctionRealm(constructor). - b. Set proto to realm's intrinsic object named intrinsicDefaultProto. - 5. Return proto. features: [Intl.Segmenter, Reflect, Proxy] ---*/ diff --git a/test/intl402/Segmenter/proto-from-ctor-realm.js b/test/intl402/Segmenter/proto-from-ctor-realm.js index 09c750a052..13a3c50b27 100644 --- a/test/intl402/Segmenter/proto-from-ctor-realm.js +++ b/test/intl402/Segmenter/proto-from-ctor-realm.js @@ -24,9 +24,9 @@ info: | features: [cross-realm, Reflect, Symbol, Intl.Segmenter] ---*/ -var other = $262.createRealm().global; -var newTarget = new other.Function(); -var sgm; +const other = $262.createRealm().global; +const newTarget = new other.Function(); +let sgm; newTarget.prototype = undefined; sgm = Reflect.construct(Intl.Segmenter, [], newTarget); diff --git a/test/intl402/Segmenter/prototype/segment/containing/branding.js b/test/intl402/Segmenter/prototype/segment/containing/branding.js index 2f1ddf4c9f..fa406a93f2 100644 --- a/test/intl402/Segmenter/prototype/segment/containing/branding.js +++ b/test/intl402/Segmenter/prototype/segment/containing/branding.js @@ -5,9 +5,8 @@ esid: sec-%segmentsprototype%.containing description: Verifies the branding check for the "segment" function of the %Segments.prototype%.containing. info: | %Segments.prototype%.containing ( index ) - Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2020 Language Specification, 11th edition, clause 17, or successor. - Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. - Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. + 1. Let segments be the this value. + 2. Perform ? RequireInternalSlot(segments, [[SegmentsSegmenter]]). features: [Intl.Segmenter] ---*/ diff --git a/test/intl402/Segmenter/prototype/segment/containing/breakable-input.js b/test/intl402/Segmenter/prototype/segment/containing/breakable-input.js index 9cac0dd2de..6b52bca63c 100644 --- a/test/intl402/Segmenter/prototype/segment/containing/breakable-input.js +++ b/test/intl402/Segmenter/prototype/segment/containing/breakable-input.js @@ -37,19 +37,17 @@ granularities.forEach( const segmenter = new Intl.Segmenter(undefined, {granularity}); inputs.forEach(function(input) { const segment = segmenter.segment(input); - let msg = "granularity: " + granularity + " input: " + input; + let msg = `granularity: ${granularity} input: ${input}`; const first = segment.containing(0); - assert.sameValue(0, first.index, - msg + " containing(0) index"); - assert.sameValue(input, first.input, - msg + " containing(0) input"); + assert.sameValue(0, first.index, `${msg} containing(0) index`); + assert.sameValue(input, first.input, `${msg} containing(0) input`); assert.sameValue(false, first.segment == input, - msg + " containing(0) segment"); + `${msg} containing(0) segment`); const last = segment.containing(input.length - 1); - msg += " containing(" + input.length - 1 + ") " - assert.sameValue(true, last.index > 0, msg + " index > 0"); - assert.sameValue(true, last.index < input.length, msg + " index"); - assert.sameValue(input, last.input, msg + " input"); - assert.sameValue(false, last.segment == input, msg + " segment"); + msg += ` containing(${input.length - 1}) ` + assert.sameValue(true, last.index > 0, `${msg} index > 0`); + assert.sameValue(true, last.index < input.length, `${msg} index`); + assert.sameValue(input, last.input, `${msg} input`); + assert.sameValue(false, last.segment == input, `${msg} segment`); }); }); diff --git a/test/intl402/Segmenter/prototype/segment/containing/iswordlike.js b/test/intl402/Segmenter/prototype/segment/containing/iswordlike.js index a0b2627bb6..8d07eab402 100644 --- a/test/intl402/Segmenter/prototype/segment/containing/iswordlike.js +++ b/test/intl402/Segmenter/prototype/segment/containing/iswordlike.js @@ -42,14 +42,13 @@ other_granularities.forEach( const segment = segmenter.segment(input); for (let index = 0; index < input.length; index++) { const result = segment.containing(index); - const msg = "granularity: " + granularity + " input: " + input + - " containing(" + index + ") "; - assert.sameValue(true, result.index >= 0, msg + "index >= 0"); - assert.sameValue(true, result.index < input.length, - msg + "index < " + input.length); - assert.sameValue("string", typeof result.input, msg + "input"); + const msg = + `granularity: ${granularity} input: ${input} containing(${index})`; + assert.sameValue(true, result.index >= 0, `${msg} index >= 0`); + assert.sameValue(true, result.index < input.length, `${msg} index`); + assert.sameValue("string", typeof result.input, `${msg} input`); assert.sameValue(undefined, result.isWordLike, - msg + "isWordLike should be undefined"); + `${msg} isWordLike should be undefined`); } }); });