Skip to content
Snippets Groups Projects
Commit cb4bc713 authored by test262-automation's avatar test262-automation Committed by Rick Waldron
Browse files

[v8-test262-automation] Updated curation log with latest revision sha's from...

[v8-test262-automation] Updated curation log with latest revision sha's from export and changed files.
    sourceRevisionAtLastExport: d34cbcd7 targetRevisionAtLastExport: 225cb28a69
parent 82955482
No related branches found
No related tags found
No related merge requests found
Showing
with 742 additions and 954 deletions
{ {
"sourceRevisionAtLastExport": "d34cbcd7", "sourceRevisionAtLastExport": "30729e82",
"targetRevisionAtLastExport": "225cb28a69", "targetRevisionAtLastExport": "39246db80e",
"curatedFiles": {} "curatedFiles": {}
} }
\ No newline at end of file
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-intl-segmenter
const seg = new Intl.Segmenter([], {granularity: "word"})
for (const text of [
"Hello world!", // English
" Hello world! ", // English with space before/after
" Hello world? Foo bar!", // English
"Jedovatou mambu objevila žena v zahrádkářské kolonii.", // Czech
"Việt Nam: Nhất thể hóa sẽ khác Trung Quốc?", // Vietnamese
"Σοβαρές ενστάσεις Κομισιόν για τον προϋπολογισμό της Ιταλίας", // Greek
"Решение Индии о покупке российских С-400 расценили как вызов США", // Russian
"הרופא שהציל נשים והנערה ששועבדה ע", // Hebrew,
"ترامب للملك سلمان: أنا جاد للغاية.. عليك دفع المزيد", // Arabic
"भारत की एस 400 मिसाइल के मुकाबले पाक की थाड, जानें कौन कितना ताकतवर", // Hindi
"ரெட் அலர்ட் எச்சரிக்கை; புதுச்சேரியில் நாளை அரசு விடுமுறை!", // Tamil
"'ఉత్తర్వులు అందే వరకు ఓటర్ల తుది జాబితాను వెబ్‌సైట్లో పెట్టవద్దు'", // Telugu
"台北》抹黑柯P失敗?朱學恒酸:姚文智氣pupu嗆大老闆", // Chinese
"วัดไทรตีระฆังเบาลงช่วงเข้าพรรษา เจ้าอาวาสเผยคนร้องเรียนรับผลกรรมแล้ว", // Thai
"九州北部の一部が暴風域に入りました(日直予報士 2018年10月06日) - 日本気象協会 tenki.jp", // Japanese
"법원 “다스 지분 처분권·수익권 모두 MB가 보유”", // Korean
]) {
const iter = seg.segment(text);
assertTrue(["word", "none"].includes(iter.breakType), iter.breakType);
assertEquals(0, iter.position);
}
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-intl-segmenter
// Test subclassing of Segmenter
class CustomSegmenter extends Intl.Segmenter {
constructor(locales, options) {
super(locales, options);
this.isCustom = true;
}
}
const seg = new CustomSegmenter("zh");
assertEquals(true, seg.isCustom, "Custom property");
assertEquals(Object.getPrototypeOf(seg), CustomSegmenter.prototype, "Prototype");
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function ArrayPrototypeChanged() {
const el = {
toString() {
Array.prototype[1] = '2';
return '1';
}
};
const a = [el, ,3];
assertSame("123", a.join(''));
})();
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
const MIN_DICTIONARY_INDEX = 8192;
function ArrayTests() {
(function ToStringThrows() {
function TestError() {}
let callCount = 0;
const toStringThrows = {
toString() {
callCount++;
throw new TestError;
}
};
const a = [toStringThrows];
assertThrows(() => a.join(), TestError);
assertSame(1, callCount);
// Verifies cycle detection still works properly after thrown error.
a[0] = 1;
a[1] = 2;
assertSame('1,2', a.join());
})();
(function ArrayLengthIncreased() {
let callCount = 0;
const a = [
{
toString() {
callCount++;
a.push(2);
return '1';
}
}
];
assertSame('1', a.join());
assertSame(1, callCount);
assertSame('1,2', a.join());
})();
(function ArrayLengthDecreased() {
let callCount = 0;
const a = [
{
toString() {
callCount++;
a.pop();
return '1';
}
},
'2'
];
assertSame('1,', a.join());
assertSame(1, callCount);
assertSame('1', a.join());
})();
(function ElementsKindChangedToHoley() {
let callCount = 0;
const a = [
{
toString() {
callCount++;
a.length = 4;
a[1] = 777;
a[2] = 7.7;
return '1';
}
},
2,
3
];
assertSame('1,777,7.7', a.join());
assertSame(1, callCount);
assertSame('1,777,7.7,', a.join());
})();
(function ElementsKindChangedToHoleyThroughDeletion() {
let callCount = 0;
const a = [
{
toString() {
callCount++;
delete a[1];
a[2] = 7.7;
return '1';
}
},
2,
3
];
assertSame('1,,7.7', a.join());
assertSame(1, callCount);
assertSame('1,,7.7', a.join());
})();
(function NumberDictionaryChanged() {
let callCount = 0;
const a = [];
a[MIN_DICTIONARY_INDEX - 1] = {
toString() {
callCount++;
a[MIN_DICTIONARY_INDEX] = '2';
return '1';
}
};
a[MIN_DICTIONARY_INDEX] = 'NOPE';
assertTrue(%HasDictionaryElements(a));
assertSame('12', a.join(''));
assertSame(1, callCount);
assertSame('12', a.join(''));
})();
(function NumberDictionaryLengthChange() {
let callCount = 0;
const a = [];
a[MIN_DICTIONARY_INDEX - 1] = {
toString() {
callCount++;
a.length = MIN_DICTIONARY_INDEX;
return '1';
}
};
a[MIN_DICTIONARY_INDEX] = '2';
assertTrue(%HasDictionaryElements(a));
assertSame('1', a.join(''));
assertSame(1, callCount);
assertSame('1', a.join(''));
})();
}
(function NonArrayCycleDetection() {
const a = {
length: 3,
toString() { return Array.prototype.join.call(this); }
};
a[0] = '1';
a[1] = a;
a[2] = '3';
assertSame("1,,3", Array.prototype.join.call(a));
});
ArrayTests();
%SetForceSlowPath(true);
ArrayTests();
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
(function Throws() {
function TestError() {}
let callCount = 0;
const a = [0, 1];
Object.defineProperty(a, '0', {
configurable: true,
get() {
callCount++;
throw new TestError();
}
});
assertTrue(%HasDictionaryElements(a));
assertThrows(() => a.join(), TestError);
assertSame(1, callCount);
// Verifies cycle detection still works properly after thrown error.
Object.defineProperty(a, '0', {
configurable: true,
get() {
callCount++;
return 777;
}
});
assertSame('777,1', a.join());
assertSame(2, callCount);
})();
(function ArrayLengthIncreased() {
let callCount = 0;
const a = [1];
Object.defineProperty(a, '0', {
configurable: true,
get() {
callCount++;
a.push(2);
return 9;
}
});
assertSame('9', a.join());
assertSame(1, callCount);
// Verifies cycle detection still works properly after continuation.
assertSame('9,2', a.join());
})();
(function ArrayLengthDecreased() {
let callCount = 0;
const a = [0, 1];
Object.defineProperty(a, '0', {
configurable: true,
get() {
callCount++;
a.length = 1;
return 9;
}
});
assertSame('9,', a.join());
assertSame(1, callCount);
// Verifies cycle detection still works properly after continuation.
assertSame('9', a.join());
})();
(function ElementsKindChangedToHoley() {
let callCount = 0;
const a = [0, 1];
Object.defineProperty(a, '0', {
configurable: true,
get() {
callCount++;
a.length = 3;
return 9;
}
});
assertSame('9,1', a.join());
assertSame(1, callCount);
// Verifies cycle detection still works properly after continuation.
assertSame('9,1,', a.join());
})();
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const DEPTH = 128;
function makeNestedArray(depth, value) {
return depth > 0 ? [value, makeNestedArray(depth - 1, value)] : [value];
}
const array = makeNestedArray(DEPTH, 'a');
const expected = 'a' + ',a'.repeat(DEPTH);
assertSame(expected, array.join());
// Verify cycle detection is still working.
assertSame(expected, array.join());
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function Throws() {
function TestError() {}
let callCount = 0;
const a = {
0: 1,
1: 2,
get length() {
callCount++;
throw new TestError();
}
};
assertThrows(() => Array.prototype.join.call(a), TestError);
assertSame(1, callCount);
// Verifies cycle detection still works properly after thrown error.
Object.defineProperty(a, 'length', {
get() {
callCount++;
return 2;
}
});
assertSame('1,2', Array.prototype.join.call(a));
assertSame(2, callCount);
})();
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
const MIN_DICTIONARY_INDEX = 8192;
(function ToStringThrows() {
function TestError() {}
let callCount = 0;
const a = [1, 2];
assertThrows(() => a.join({
toString() {
callCount++;
throw new TestError;
}
}), TestError);
assertSame(1, callCount);
// Verifies cycle detection still works properly after thrown error.
assertSame('1,2', a.join());
})();
(function RecursiveJoinCall() {
const a = [1,2,3];
let callCount = 0;
const sep = {
toString() {
callCount++;
return a.join('-');
}
};
assertSame('11-2-321-2-33', a.join(sep));
assertSame(1, callCount);
// Verify cycle detection works properly after nested call
assertSame('1,2,3', a.join());
})();
(function ArrayLengthIncreased() {
const a = [1,2,3];
let callCount = 0;
assertSame('1,2,3', a.join({
toString() {
callCount++;
a.push(4);
return ',';
}
}));
assertSame(1, callCount);
assertSame('1,2,3,4', a.join());
})();
(function ArrayLengthDecreased() {
const a = [1,2,3];
let callCount = 0;
assertSame('1,2,', a.join({
toString() {
callCount++;
a.pop();
return ',';
}
}));
assertSame(1, callCount);
assertSame('1,2', a.join());
})();
(function ArrayEmptied() {
const a = [1,2,3];
let callCount = 0;
assertSame(',,', a.join({
toString() {
callCount++;
a.length = 0;
return ',';
}
}));
assertSame(1, callCount);
})();
(function NumberDictionaryEmptied() {
const a = [];
a[0] = 1;
a[MIN_DICTIONARY_INDEX] = 2;
assertTrue(%HasDictionaryElements(a));
let callCount = 0;
assertSame('-'.repeat(MIN_DICTIONARY_INDEX), a.join({
toString() {
callCount++;
a.length = 0;
return '-';
}
}));
assertSame(1, callCount);
})();
(function NumberDictionaryEmptiedEmptySeparator() {
const a = [];
a[0] = 1;
a[MIN_DICTIONARY_INDEX] = 2;
assertTrue(%HasDictionaryElements(a));
let callCount = 0;
assertSame(''.repeat(MIN_DICTIONARY_INDEX), a.join({
toString() {
callCount++;
a.length = 0;
return '';
}
}));
assertSame(1, callCount);
})();
(function ElementsKindSmiToDoubles() {
const a = [1,2,3];
let callCount = 0;
assertTrue(%HasSmiElements(a));
assertSame('1.5,2,3', a.join({
toString() {
callCount++;
a[0] = 1.5;
assertTrue(%HasDoubleElements(a));
return ',';
}
}));
assertSame(1, callCount);
assertSame('1.5,2,3', a.join());
})();
(function ElementsKindDoublesToObjects() {
const a = [1.5, 2.5, 3.5];
let callCount = 0;
assertTrue(%HasDoubleElements(a));
assertSame('one,2.5,3.5', a.join({
toString() {
callCount++;
a[0] = 'one';
assertTrue(%HasObjectElements(a));
return ',';
}
}));
assertSame(1, callCount);
assertSame('one,2.5,3.5', a.join());
})();
(function ArrayIsNoLongerFast() {
const a = [1,2,3];
let callCount = 0;
assertSame('666,2,3', a.join({
toString() {
callCount++;
Object.defineProperty(a, '0', {
get(){ return 666; }
});
return ',';
}
}));
assertSame(1, callCount);
assertSame('666,2,3', a.join());
})();
(function ArrayPrototypeUnset() {
const a = [1,2];
a.length = 3;
let callCount = 0;
assertSame('1,2,4', a.join({
toString() {
callCount++;
a.__proto__ = { '2': 4 };
return ',';
}
}));
assertSame(1, callCount);
a.__proto__ = Array.prototype;
assertSame('1,2,', a.join());
})();
(function ArrayPrototypeIsNoLongerFast() {
const a = [1,2,3];
let callCount = 0;
assertSame('1,2,777', a.join({
toString() {
callCount++;
a.pop();
Object.defineProperty(Array.prototype, '2', {
get(){ return 777; }
});
return ',';
}
}));
assertSame(1, callCount);
assertSame('1,2', a.join());
})();
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function CycleDetection() {
const arr = [
{
toLocaleString() {
return [1, arr];
}
}
];
assertSame('1,', arr.toLocaleString());
assertSame('1,', arr.toLocaleString());
})();
(function ThrowsError(){
function TestError() {}
const arr = [];
const obj = {
toLocaleString(){
throw new TestError();
}
};
arr[0] = obj;
assertThrows(() => arr.toLocaleString(), TestError);
// Verifies cycle detection still works properly after thrown error.
arr[0] = {
toLocaleString() {
return 1;
}
};
assertSame('1', arr.toLocaleString());
})();
(function AccessThrowsError(){
function TestError() {}
const arr = [];
const obj = {
get toLocaleString(){
throw new TestError();
}
};
arr[0] = obj;
assertThrows(() => arr.toLocaleString(), TestError);
// Verifies cycle detection still works properly after thrown error.
arr[0] = {
toLocaleString() {
return 1;
}
};
assertSame('1', arr.toLocaleString());
})();
(function NotCallable(){
const arr = [];
const obj = {
toLocaleString: 7
}
arr[0] = obj;
assertThrows(() => arr.toLocaleString(), TypeError, '7 is not a function');
// Verifies cycle detection still works properly after thrown error.
arr[0] = {
toLocaleString() {
return 1;
}
};
assertSame('1', arr.toLocaleString());
})();
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
class C extends Object {
constructor() {
try { super(); } catch (e) { };
return 1;
}
}
class A extends C {
constructor() {
super();
throw new Error();
return { get: () => this };
}
}
var D = new Proxy(A, { get() { %DeoptimizeFunction(A); } });
try { Reflect.construct(A, [], D); } catch(e) {}
%OptimizeFunctionOnNextCall(A);
try { Reflect.construct(A, [], D); } catch(e) {}
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var map = new Map([[1,2], [2,3], [3,4]]);
var iterator = map.keys();
assertEquals([1,2,3], [...map.keys()]);
assertEquals([1,2,3], [...iterator]);
assertEquals([], [...iterator]);
iterator = map.values();
assertEquals([2,3,4], [...iterator]);
assertEquals([], [...iterator]);
iterator = map.keys();
iterator.next();
assertEquals([2,3], [...iterator]);
assertEquals([], [...iterator]);
iterator = map.values();
var iterator2 = map.values();
map.delete(1);
assertEquals([3,4], [...iterator]);
assertEquals([], [...iterator]);
map.set(1,5);
assertEquals([3,4,5], [...iterator2]);
assertEquals([], [...iterator2]);
iterator = map.keys();
map.set(4,6);
assertEquals([2,3,1,4], [...iterator]);
assertEquals([], [...iterator]);
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var set = new Set([1,2,3]);
var iterator = set.keys();
assertEquals([1,2,3], [...set.keys()]);
assertEquals([1,2,3], [...iterator]);
assertEquals([], [...iterator]);
iterator = set.values();
assertEquals([1,2,3], [...iterator]);
assertEquals([], [...iterator]);
iterator = set.keys();
iterator.next();
assertEquals([2,3], [...iterator]);
assertEquals([], [...iterator]);
iterator = set.values();
var iterator2 = set.values();
set.delete(1);
assertEquals([2,3], [...iterator]);
set.add(4);
assertEquals([2,3,4], [...iterator2]);
iterator = set.keys();
set.add(1);
assertEquals([2,3,4,1], [...iterator]);
This diff is collapsed.
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
const n = 2**32;
const x = new Float32Array();
function f() {
for (var i = 96; i < 100; i += 4) {
x[i] = i + n;
}
}
f();
%OptimizeFunctionOnNextCall(f);
f();
...@@ -550,9 +550,6 @@ ...@@ -550,9 +550,6 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=7669 # https://bugs.chromium.org/p/v8/issues/detail?id=7669
'intl402/Intl/getCanonicalLocales/canonicalized-tags': [FAIL], 'intl402/Intl/getCanonicalLocales/canonicalized-tags': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=8051
'intl402/Collator/unicode-ext-seq-in-private-tag': [FAIL],
# Tests assume that the sort order of "same elements" (comparator returns 0) # Tests assume that the sort order of "same elements" (comparator returns 0)
# is deterministic. # is deterministic.
# https://crbug.com/v8/7808 # https://crbug.com/v8/7808
...@@ -616,6 +613,15 @@ ...@@ -616,6 +613,15 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=7871 # https://bugs.chromium.org/p/v8/issues/detail?id=7871
'intl402/ListFormat/prototype/formatToParts/en-us-disjunction': [FAIL], 'intl402/ListFormat/prototype/formatToParts/en-us-disjunction': [FAIL],
# The following is due to spec changes in
# https://github.com/tc39/proposal-intl-list-format/pull/27
# and will be addressed after pulling new test262 which include the tests fixes in
# https://github.com/tc39/test262/pull/1860
# see https://bugs.chromium.org/p/v8/issues/detail?id=8302
'intl402/ListFormat/constructor/constructor/options-style-valid': [FAIL],
'intl402/ListFormat/prototype/format/en-us-narrow': [FAIL],
'intl402/ListFormat/prototype/formatToParts/en-us-narrow': [FAIL],
######################## NEEDS INVESTIGATION ########################### ######################## NEEDS INVESTIGATION ###########################
# These test failures are specific to the intl402 suite and need investigation # These test failures are specific to the intl402 suite and need investigation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment