Commit dff88c86 authored by Daniel Ehrenberg's avatar Daniel Ehrenberg Committed by Commit Bot

test262 roll

Includes a drive-by fix to a couple of superficial Intl changes

With this roll, test262 starts to look at test262 feature
flags to determine which harmony flags to turn on. There's
still more to do, including adding feature flags to existing
upstream tests and taking advantage of more flags here.


Change-Id: I9cb813e0450be9dc7769ac9c601092bd3572556f
Reviewed-on: https://chromium-review.googlesource.com/471546Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44495}
parent e86d3a2a
...@@ -34,7 +34,7 @@ deps = { ...@@ -34,7 +34,7 @@ deps = {
"v8/test/mozilla/data": "v8/test/mozilla/data":
Var("chromium_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be", Var("chromium_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be",
"v8/test/test262/data": "v8/test/test262/data":
Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "975e54de17ede3d8802dd7411181dbbc29147308", Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "230f9fc5688ce76bfaa99aba5f680a159eaac9e2",
"v8/test/test262/harness": "v8/test/test262/harness":
Var("chromium_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "0f2acdd882c84cff43b9d60df7574a1901e2cdcd", Var("chromium_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "0f2acdd882c84cff43b9d60df7574a1901e2cdcd",
"v8/tools/clang": "v8/tools/clang":
......
...@@ -1125,12 +1125,7 @@ function isWellFormedCurrencyCode(currency) { ...@@ -1125,12 +1125,7 @@ function isWellFormedCurrencyCode(currency) {
} }
/** function defaultNumberOption(value, min, max, fallback, property) {
* Returns the valid digit count for a property, or throws RangeError on
* a value out of the range.
*/
function getNumberOption(options, property, min, max, fallback) {
var value = options[property];
if (!IS_UNDEFINED(value)) { if (!IS_UNDEFINED(value)) {
value = TO_NUMBER(value); value = TO_NUMBER(value);
if (NUMBER_IS_NAN(value) || value < min || value > max) { if (NUMBER_IS_NAN(value) || value < min || value > max) {
...@@ -1142,6 +1137,16 @@ function getNumberOption(options, property, min, max, fallback) { ...@@ -1142,6 +1137,16 @@ function getNumberOption(options, property, min, max, fallback) {
return fallback; return fallback;
} }
/**
* Returns the valid digit count for a property, or throws RangeError on
* a value out of the range.
*/
function getNumberOption(options, property, min, max, fallback) {
var value = options[property];
return defaultNumberOption(value, min, max, fallback, property);
}
var patternAccessor = { var patternAccessor = {
get() { get() {
%IncrementUseCounter(kIntlPattern); %IncrementUseCounter(kIntlPattern);
...@@ -1207,10 +1212,10 @@ function CreateNumberFormat(locales, options) { ...@@ -1207,10 +1212,10 @@ function CreateNumberFormat(locales, options) {
var mnsd = options['minimumSignificantDigits']; var mnsd = options['minimumSignificantDigits'];
var mxsd = options['maximumSignificantDigits']; var mxsd = options['maximumSignificantDigits'];
if (!IS_UNDEFINED(mnsd) || !IS_UNDEFINED(mxsd)) { if (!IS_UNDEFINED(mnsd) || !IS_UNDEFINED(mxsd)) {
mnsd = getNumberOption(options, 'minimumSignificantDigits', 1, 21, 1); mnsd = defaultNumberOption(mnsd, 1, 21, 1, 'minimumSignificantDigits');
defineWEProperty(internalOptions, 'minimumSignificantDigits', mnsd); defineWEProperty(internalOptions, 'minimumSignificantDigits', mnsd);
mxsd = getNumberOption(options, 'maximumSignificantDigits', mnsd, 21, 21); mxsd = defaultNumberOption(mxsd, mnsd, 21, 21, 'maximumSignificantDigits');
defineWEProperty(internalOptions, 'maximumSignificantDigits', mxsd); defineWEProperty(internalOptions, 'maximumSignificantDigits', mxsd);
} }
...@@ -1748,8 +1753,6 @@ function FormatDateToParts(dateValue) { ...@@ -1748,8 +1753,6 @@ function FormatDateToParts(dateValue) {
return %InternalDateFormatToParts(this, new GlobalDate(dateMs)); return %InternalDateFormatToParts(this, new GlobalDate(dateMs));
} }
%FunctionSetLength(FormatDateToParts, 0);
// Length is 1 as specified in ECMA 402 v2+ // Length is 1 as specified in ECMA 402 v2+
AddBoundMethod(GlobalIntlDateTimeFormat, 'format', formatDate, 1, 'dateformat', AddBoundMethod(GlobalIntlDateTimeFormat, 'format', formatDate, 1, 'dateformat',
......
...@@ -84,6 +84,11 @@ ...@@ -84,6 +84,11 @@
'language/expressions/prefix-increment/S11.4.4_A5_*': [FAIL], 'language/expressions/prefix-increment/S11.4.4_A5_*': [FAIL],
'language/statements/variable/binding-resolution': [FAIL], 'language/statements/variable/binding-resolution': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=6216
'built-ins/TypedArrays/buffer-arg-byteoffset-to-number-detachbuffer': [FAIL],
'built-ins/TypedArrays/buffer-arg-length-to-number-detachbuffer': [FAIL],
'built-ins/TypedArrays/buffer-arg-detachedbuffer': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=4895 # https://bugs.chromium.org/p/v8/issues/detail?id=4895
'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer': [FAIL], 'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer': [FAIL],
'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer-realm': [FAIL], 'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer-realm': [FAIL],
...@@ -283,22 +288,23 @@ ...@@ -283,22 +288,23 @@
'annexB/built-ins/Object/prototype/__lookupSetter__/this-non-obj': [FAIL], 'annexB/built-ins/Object/prototype/__lookupSetter__/this-non-obj': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=4451 # https://bugs.chromium.org/p/v8/issues/detail?id=4451
'annexB/language/eval-code/direct/global-block-decl-eval-global-exsting-global-init': [FAIL], # https://github.com/tc39/ecma262/issues/753
'annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/direct/global-switch-case-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/direct/global-switch-dflt-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/indirect/global-block-decl-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/indirect/global-switch-case-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/indirect/global-switch-dflt-eval-global-exsting-global-init': [FAIL], 'annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init': [FAIL],
'annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=5135 # https://bugs.chromium.org/p/v8/issues/detail?id=5135
'annexB/language/eval-code/direct/func-block-decl-eval-func-block-scoping': [FAIL], 'annexB/language/eval-code/direct/func-block-decl-eval-func-block-scoping': [FAIL],
...@@ -419,6 +425,32 @@ ...@@ -419,6 +425,32 @@
'language/expressions/async-generators/*': ['--harmony-async-iteration'], 'language/expressions/async-generators/*': ['--harmony-async-iteration'],
'language/statements/async-generator/*': ['--harmony-async-iteration'], 'language/statements/async-generator/*': ['--harmony-async-iteration'],
# https://bugs.chromium.org/p/v8/issues/detail?id=6226
'language/expressions/async-generator/named-yield-star-async-next': [FAIL],
'language/expressions/async-generator/named-yield-star-async-return': [FAIL],
'language/expressions/async-generator/named-yield-star-async-throw': [FAIL],
'language/expressions/async-generator/yield-star-async-next': [FAIL],
'language/expressions/async-generator/yield-star-async-return': [FAIL],
'language/expressions/async-generator/yield-star-async-throw': [FAIL],
'language/expressions/class/async-gen-method-static-yield-star-async-next': [FAIL],
'language/expressions/class/async-gen-method-static-yield-star-async-return': [FAIL],
'language/expressions/class/async-gen-method-static-yield-star-async-throw': [FAIL],
'language/expressions/class/async-gen-method-yield-star-async-next': [FAIL],
'language/expressions/class/async-gen-method-yield-star-async-return': [FAIL],
'language/expressions/class/async-gen-method-yield-star-async-throw': [FAIL],
'language/expressions/object/method-definition/async-gen-yield-star-async-next': [FAIL],
'language/expressions/object/method-definition/async-gen-yield-star-async-return': [FAIL],
'language/expressions/object/method-definition/async-gen-yield-star-async-throw': [FAIL],
'language/statements/async-generator/yield-star-async-next': [FAIL],
'language/statements/async-generator/yield-star-async-return': [FAIL],
'language/statements/async-generator/yield-star-async-throw': [FAIL],
'language/statements/class/async-gen-method-static-yield-star-async-next': [FAIL],
'language/statements/class/async-gen-method-static-yield-star-async-return': [FAIL],
'language/statements/class/async-gen-method-static-yield-star-async-throw': [FAIL],
'language/statements/class/async-gen-method-yield-star-async-next': [FAIL],
'language/statements/class/async-gen-method-yield-star-async-return': [FAIL],
'language/statements/class/async-gen-method-yield-star-async-throw': [FAIL],
# SharedArrayBuffer tests that require flags # SharedArrayBuffer tests that require flags
'built-ins/SharedArrayBuffer/*': ['--harmony-sharedarraybuffer'], 'built-ins/SharedArrayBuffer/*': ['--harmony-sharedarraybuffer'],
'built-ins/Atomics/*': ['--harmony-sharedarraybuffer'], 'built-ins/Atomics/*': ['--harmony-sharedarraybuffer'],
...@@ -520,6 +552,9 @@ ...@@ -520,6 +552,9 @@
'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-caller': [FAIL_SLOPPY], 'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-caller': [FAIL_SLOPPY],
'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-arguments': [FAIL_SLOPPY], 'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-arguments': [FAIL_SLOPPY],
# https://bugs.chromium.org/p/v8/issues/detail?id=6016
'intl402/NumberFormat/dft-currency-mnfd-range-check-mxfd': [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
......
...@@ -39,6 +39,13 @@ from testrunner.local import testsuite ...@@ -39,6 +39,13 @@ from testrunner.local import testsuite
from testrunner.local import utils from testrunner.local import utils
from testrunner.objects import testcase from testrunner.objects import testcase
# TODO(littledan): move the flag mapping into the status file
FEATURE_FLAGS = {
'object-rest': '--harmony-object-rest-spread',
'object-spread': '--harmony-object-rest-spread',
'async-iteration': '--harmony-async-iteration',
}
DATA = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data") DATA = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
ARCHIVE = DATA + ".tar" ARCHIVE = DATA + ".tar"
...@@ -153,7 +160,9 @@ class Test262TestSuite(testsuite.TestSuite): ...@@ -153,7 +160,9 @@ class Test262TestSuite(testsuite.TestSuite):
if "detachArrayBuffer.js" in if "detachArrayBuffer.js" in
self.GetTestRecord(testcase).get("includes", []) self.GetTestRecord(testcase).get("includes", [])
else []) + else []) +
([flag for flag in testcase.outcomes if flag.startswith("--")])) ([flag for flag in testcase.outcomes if flag.startswith("--")]) +
([flag for (feature, flag) in FEATURE_FLAGS.items()
if feature in self.GetTestRecord(testcase).get("features", [])]))
def _VariantGeneratorFactory(self): def _VariantGeneratorFactory(self):
return Test262VariantGenerator return Test262VariantGenerator
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment