From 705cb10d6ad9de80bde1ea47a9134bc62b7453be Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 19 Oct 2018 10:23:53 -0400 Subject: [PATCH 1/5] Curation: remove v8/test262/local-tests/test/built-ins/TypedArray/ duplicates Identical files already exist --- .../typedarray-arg-src-byteoffset-internal.js | 45 ------------------- ...pedarray-arg-target-byteoffset-internal.js | 44 ------------------ 2 files changed, 89 deletions(-) delete mode 100644 implementation-contributed/v8/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js delete mode 100644 implementation-contributed/v8/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js diff --git a/implementation-contributed/v8/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js b/implementation-contributed/v8/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js deleted file mode 100644 index 430dbdf369..0000000000 --- a/implementation-contributed/v8/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2017 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. -/*--- -esid: sec-%typedarray%.prototype.set-typedarray-offset -description: > - Uses typedArray's internal [[ByteOffset]] -info: > - 22.2.3.23.2 %TypedArray%.prototype.set(typedArray [ , offset ] ) - 1. Assert: typedArray has a [[TypedArrayName]] internal slot. If it does not, - the definition in 22.2.3.23.1 applies. - ... - 21. Let srcByteOffset be typedArray.[[ByteOffset]]. - ... -includes: [testTypedArray.js] ----*/ - -var getCalls = 0; -var desc = { - get: function getLen() { - getCalls++; - return 0; - } -}; - -Object.defineProperty(TypedArray.prototype, "byteOffset", desc); - -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42, 43]); - var differentTA = TA === Uint8Array ? Int8Array : Uint8Array; - var src2 = new differentTA([42, 43]); - var src3 = new differentTA(sample.buffer, 0, 2); - - Object.defineProperty(TA.prototype, "byteOffset", desc); - Object.defineProperty(src, "byteOffset", desc); - Object.defineProperty(src2, "byteOffset", desc); - Object.defineProperty(src3, "byteOffset", desc); - - sample.set(src); - sample.set(src2); - sample.set(src3); - - assert.sameValue(getCalls, 0, "ignores byteOffset properties"); -}); diff --git a/implementation-contributed/v8/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js b/implementation-contributed/v8/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js deleted file mode 100644 index ab49f66a98..0000000000 --- a/implementation-contributed/v8/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 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. -/*--- -esid: sec-%typedarray%.prototype.set-typedarray-offset -description: > - Uses target's internal [[ArrayLength]] -info: > - 22.2.3.23.2 %TypedArray%.prototype.set(typedArray [ , offset ] ) - 1. Assert: typedArray has a [[TypedArrayName]] internal slot. If it does not, - the definition in 22.2.3.23.1 applies. - 2. Let target be the this value. - ... - 16. Let targetByteOffset be target.[[ByteOffset]]. - ... -includes: [testTypedArray.js] ----*/ - -var getCalls = 0; -var desc = { - get: function() { - getCalls++; - return 0; - } -}; - -Object.defineProperty(TypedArray.prototype, "byteOffset", desc); - -testWithTypedArrayConstructors(function(TA) { - var sample = new TA(2); - var src = new TA([42, 43]); - var differentTA = TA === Uint8Array ? Int8Array : Uint8Array; - var src2 = new differentTA([42, 43]); - var src3 = new differentTA(sample.buffer, 0, 2); - - Object.defineProperty(TA.prototype, "byteOffset", desc); - Object.defineProperty(sample, "byteOffset", desc); - - sample.set(src); - sample.set(src2); - sample.set(src3); - - assert.sameValue(getCalls, 0, "ignores byteoffset properties"); -}); From 26fb624d4bd36275073a7d31201d6cc063e678f0 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 19 Oct 2018 10:26:34 -0400 Subject: [PATCH 2/5] Curation: remove v8/test262/local-tests/test/built-ins/Map/ duplicates A version of the same file, containing the same test with a more complete set of meta data, exists --- ...terator-close-failure-after-set-failure.js | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 implementation-contributed/v8/test262/local-tests/test/built-ins/Map/iterator-close-failure-after-set-failure.js diff --git a/implementation-contributed/v8/test262/local-tests/test/built-ins/Map/iterator-close-failure-after-set-failure.js b/implementation-contributed/v8/test262/local-tests/test/built-ins/Map/iterator-close-failure-after-set-failure.js deleted file mode 100644 index e695600ddf..0000000000 --- a/implementation-contributed/v8/test262/local-tests/test/built-ins/Map/iterator-close-failure-after-set-failure.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2017 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 23.1.1.1 -description: > - The correct error is thrown `Map.prototype.set` throws an error and - the IteratorClose throws an error. -features: [Symbol.iterator] ----*/ - -var count = 0; -var iterable = {}; -iterable[Symbol.iterator] = function() { - return { - next: function() { - return { value: [], done: false }; - }, - return: function() { - throw new TypeError('ignore'); - } - }; -}; -Map.prototype.set = function() { throw new Test262Error(); } - -assert.throws(Test262Error, function() { - new Map(iterable); -}); From 8fc7cdaa0596ec30081f4964bd05201aff69ef68 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 19 Oct 2018 10:31:47 -0400 Subject: [PATCH 3/5] Curation: remove v8/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js A version of the same file, containing the same test with a more complete set of meta data, exists (this-value-ignored.js) --- .../test/intl402/NumberFormat/11.1.1_1.js | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js diff --git a/implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js b/implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js deleted file mode 100644 index b492a41183..0000000000 --- a/implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/11.1.1_1.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2012 Mozilla Corporation. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 11.1.1_1 -description: Tests that the this-value is ignored in NumberFormat. -author: Norbert Lindenberg -includes: [testIntl.js] ----*/ - -testWithIntlConstructors(function (Constructor) { - var obj, newObj; - - if (Constructor === Intl.NumberFormat) { - obj = new Constructor(); - newObj = Intl.NumberFormat.call(obj); - if (obj !== newObj) { - $ERROR("Should have modified existing object."); - } - var key = Object.getOwnPropertySymbols(newObj)[0]; - if (!(newObj[key] instanceof Intl.NumberFormat)) { - $ERROR("Should have installed a NumberFormat instance."); - } - return true; - } - - // variant 1: use constructor in a "new" expression - obj = new Constructor(); - newObj = Intl.NumberFormat.call(obj); - if (obj === newObj) { - $ERROR("NumberFormat object created with \"new\" was not ignored as this-value."); - } - - return true; -}); From e557560f7178fec3e5addf81db1b5c9e8057a7d0 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 19 Oct 2018 10:34:02 -0400 Subject: [PATCH 4/5] Curation: remove v8/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js A version of the same file, containing the same test with more coverage and a more complete set of meta data exists, dft-currency-mnfd-range-check-mxfd.js --- .../default-currency-maximum-fraction-digits.js | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js diff --git a/implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js b/implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js deleted file mode 100644 index 9ca6ffe2b9..0000000000 --- a/implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2017 the V8 project authors. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -esid: ECMA-402 #sec-setnfdigitoptions -description: > - When a currency is used in Intl.NumberFormat and minimumFractionDigits is - not provided, maximumFractionDigits should be range-checked against it. -include: [assert.js] ----*/ - -assert.throws(RangeError, - () => new Intl.NumberFormat('en', { - style: 'currency', - currency: 'USD', - maximumFractionDigits: 1 - })); From 4d7eef14fb6dc4b20cb1d5a19f4493fea61f6ec1 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Mon, 22 Oct 2018 14:10:17 -0400 Subject: [PATCH 5/5] Curation: remove v8/test262/local-tests/test/intl402/NumberFormat/fraction-digit-options-read-once.js A version of the same file, containing the same test with more coverage and a more complete set of meta data exists --- .../fraction-digit-options-read-once.js | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/fraction-digit-options-read-once.js diff --git a/implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/fraction-digit-options-read-once.js b/implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/fraction-digit-options-read-once.js deleted file mode 100644 index e7e37b8735..0000000000 --- a/implementation-contributed/v8/test262/local-tests/test/intl402/NumberFormat/fraction-digit-options-read-once.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2017 the V8 project authors. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -esid: ECMA-402 #sec-setnfdigitoptions -description: > - The maximum and minimum fraction digits properties should be read from - the options bag exactly once from the NumberFormat constructor. - Regression test for https://bugs.chromium.org/p/v8/issues/detail?id=6015 -include: [assert.js] ----*/ - -var minCounter = 0; -var maxCounter = 0; -new Intl.NumberFormat("en", { get minimumFractionDigits() { minCounter++ }, - get maximumFractionDigits() { maxCounter++ } }); -assert.sameValue(1, minCounter); -assert.sameValue(1, maxCounter);