Commit 1358917e authored by Tamer Tas's avatar Tamer Tas Committed by Commit Bot

[test] remove duplicated test262 tests

Test262 has a couple of duplicated test files with the identical inside both
"test262/data/test" and "test262/local-tests/test".

Testrunner used to deduplicate the tests, which masked this issue.

This CL removes the obsolete copies in the local-tests.

R=adamk@chromium.org,yangguo@chromium.org,machenbach@chromium.org

Bug: v8:8174,v8:8728
Change-Id: Iecdc40b417f237feb916f1c3a24f8def7ea11fad
Reviewed-on: https://chromium-review.googlesource.com/c/1452436Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59354}
parent b4eba5a2
// 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");
});
// 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");
});
// 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);
// Copyright (C) 2017 Josh Wolfe. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: #sec-intl.numberformat.prototype.formattoparts
description: Intl.NumberFormat.prototype.formatToParts called with no parameters
info: >
Intl.NumberFormat.prototype.formatToParts ([ value ])
3. If value is not provided, let value be undefined.
---*/
var nf = new Intl.NumberFormat();
// Example value: [{"type":"nan","value":"NaN"}]
var implicit = nf.formatToParts();
var explicit = nf.formatToParts(undefined);
assert(partsEquals(implicit, explicit),
"formatToParts() should be equivalent to formatToParts(undefined)");
function partsEquals(parts1, parts2) {
if (parts1.length !== parts2.length) return false;
for (var i = 0; i < parts1.length; i++) {
var part1 = parts1[i];
var part2 = parts2[i];
if (part1.type !== part2.type) return false;
if (part1.value !== part2.value) return false;
}
return true;
}
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