mirror of https://github.com/tc39/test262.git
Intl.Segmenter iterator result should have isWordLike only if type is "word" (#2717)
Update according to https://github.com/tc39/proposal-intl-segmenter/pull/128.
This commit is contained in:
parent
c619375b46
commit
80b54781b0
|
@ -1,4 +1,5 @@
|
||||||
// Copyright 2018 the V8 project authors. All rights reserved.
|
// Copyright 2018 the V8 project authors. All rights reserved.
|
||||||
|
// Copyright 2020 Apple Inc. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
|
@ -31,6 +32,7 @@ for (const text of [
|
||||||
let segments = [];
|
let segments = [];
|
||||||
for (const v of seg.segment(text)) {
|
for (const v of seg.segment(text)) {
|
||||||
assert.sameValue(undefined, v.isWordLike);
|
assert.sameValue(undefined, v.isWordLike);
|
||||||
|
assert.sameValue(false, v.hasOwnProperty("isWordLike"));
|
||||||
assert.sameValue("string", typeof v.segment);
|
assert.sameValue("string", typeof v.segment);
|
||||||
assert(v.segment.length > 0);
|
assert(v.segment.length > 0);
|
||||||
segments.push(v.segment);
|
segments.push(v.segment);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// Copyright 2018 the V8 project authors. All rights reserved.
|
// Copyright 2018 the V8 project authors. All rights reserved.
|
||||||
|
// Copyright 2020 Apple Inc. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
|
@ -31,6 +32,7 @@ for (const text of [
|
||||||
let segments = [];
|
let segments = [];
|
||||||
for (const v of seg.segment(text)) {
|
for (const v of seg.segment(text)) {
|
||||||
assert.sameValue(undefined, v.isWordLike);
|
assert.sameValue(undefined, v.isWordLike);
|
||||||
|
assert.sameValue(false, v.hasOwnProperty("isWordLike"));
|
||||||
assert.sameValue("string", typeof v.segment);
|
assert.sameValue("string", typeof v.segment);
|
||||||
assert(v.segment.length > 0);
|
assert(v.segment.length > 0);
|
||||||
segments.push(v.segment);
|
segments.push(v.segment);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// Copyright 2018 the V8 project authors. All rights reserved.
|
// Copyright 2018 the V8 project authors. All rights reserved.
|
||||||
|
// Copyright 2020 Apple Inc. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
|
@ -31,6 +32,7 @@ for (const text of [
|
||||||
let segments = [];
|
let segments = [];
|
||||||
for (const v of seg.segment(text)) {
|
for (const v of seg.segment(text)) {
|
||||||
assert.sameValue("boolean", typeof v.isWordLike);
|
assert.sameValue("boolean", typeof v.isWordLike);
|
||||||
|
assert.sameValue(true, v.hasOwnProperty("isWordLike"));
|
||||||
assert.sameValue("string", typeof v.segment);
|
assert.sameValue("string", typeof v.segment);
|
||||||
assert(v.segment.length > 0);
|
assert(v.segment.length > 0);
|
||||||
segments.push(v.segment);
|
segments.push(v.segment);
|
||||||
|
|
Loading…
Reference in New Issue