Commit 475124b6 authored by Ben L. Titzer's avatar Ben L. Titzer Committed by Commit Bot

[arraybuffer] Uncomment test/mjsunit/harmony/sharedarraybuffer.js

R=binji@chromium.org

Change-Id: I936d906be90c0c6d3b84b5ad4e8cb574ab8cd970
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585851
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: 's avatarBen Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61135}
parent 813d149e
...@@ -26,11 +26,9 @@ function TestArrayBufferCreation() { ...@@ -26,11 +26,9 @@ function TestArrayBufferCreation() {
assertThrows(function() { new ArrayBuffer(-10); }, RangeError); assertThrows(function() { new ArrayBuffer(-10); }, RangeError);
assertThrows(function() { new ArrayBuffer(-2.567); }, RangeError); assertThrows(function() { new ArrayBuffer(-2.567); }, RangeError);
/* TODO[dslomov]: Reenable the test
assertThrows(function() { assertThrows(function() {
var ab1 = new ArrayBuffer(0xFFFFFFFFFFFF) var ab1 = new ArrayBuffer(0xFFFFFFFFFFFF)
}, RangeError); }, RangeError);
*/
var ab = new ArrayBuffer(); var ab = new ArrayBuffer();
assertSame(0, ab.byteLength); assertSame(0, ab.byteLength);
...@@ -612,10 +610,9 @@ function TestTypedArraysWithIllegalIndicesStrict() { ...@@ -612,10 +610,9 @@ function TestTypedArraysWithIllegalIndicesStrict() {
assertEquals(255, a[s2]); assertEquals(255, a[s2]);
assertEquals(0, a[-0]); assertEquals(0, a[-0]);
/* Chromium bug: 424619 a[-Infinity] = 50;
* a[-Infinity] = 50; assertEquals(undefined, a[-Infinity]);
* assertEquals(undefined, a[-Infinity]);
*/
a[1.5] = 10; a[1.5] = 10;
assertEquals(undefined, a[1.5]); assertEquals(undefined, a[1.5]);
var nan = Math.sqrt(-1); var nan = Math.sqrt(-1);
......
...@@ -71,10 +71,8 @@ for (var constructor of typedArrayConstructors) { ...@@ -71,10 +71,8 @@ for (var constructor of typedArrayConstructors) {
assertEquals("1,2,3", o1.join()); assertEquals("1,2,3", o1.join());
assertEquals("1,2,3", o1.toString()); assertEquals("1,2,3", o1.toString());
assertThrows(function() { o1.toLocaleString() }, TypeError); assertThrows(function() { o1.toLocaleString() }, TypeError);
// TODO(littledan): Use the same function for TypedArray as for
// Array, as the spec says (but Firefox doesn't do either). assertEquals(o1.toString, Array.prototype.toString);
// Currently, using the same method leads to a bootstrap failure.
// assertEquals(o1.toString, Array.prototype.toString);
// Redefining length does not change result // Redefining length does not change result
var a5 = new constructor([1, 2, 3]) var a5 = new constructor([1, 2, 3])
......
...@@ -46,11 +46,9 @@ function TestArrayBufferCreation() { ...@@ -46,11 +46,9 @@ function TestArrayBufferCreation() {
assertThrows(function() { new ArrayBuffer(-10); }, RangeError); assertThrows(function() { new ArrayBuffer(-10); }, RangeError);
assertThrows(function() { new ArrayBuffer(-2.567); }, RangeError); assertThrows(function() { new ArrayBuffer(-2.567); }, RangeError);
/* TODO[dslomov]: Reenable the test
assertThrows(function() { assertThrows(function() {
var ab1 = new ArrayBuffer(0xFFFFFFFFFFFF) var ab1 = new ArrayBuffer(0xFFFFFFFFFFFF)
}, RangeError); }, RangeError);
*/
var ab = new ArrayBuffer(); var ab = new ArrayBuffer();
assertSame(0, ab.byteLength); assertSame(0, ab.byteLength);
...@@ -815,10 +813,10 @@ function TestTypedArraysWithIllegalIndicesStrict() { ...@@ -815,10 +813,10 @@ function TestTypedArraysWithIllegalIndicesStrict() {
assertEquals(255, a[s2]); assertEquals(255, a[s2]);
assertEquals(0, a[-0]); assertEquals(0, a[-0]);
/* Chromium bug: 424619
* a[-Infinity] = 50; a[-Infinity] = 50;
* assertEquals(undefined, a[-Infinity]); assertEquals(undefined, a[-Infinity]);
*/
a[1.5] = 10; a[1.5] = 10;
assertEquals(undefined, a[1.5]); assertEquals(undefined, a[1.5]);
var nan = Math.sqrt(-1); var nan = Math.sqrt(-1);
......
...@@ -47,11 +47,9 @@ function TestArrayBufferCreation() { ...@@ -47,11 +47,9 @@ function TestArrayBufferCreation() {
assertThrows(function() { new SharedArrayBuffer(-10); }, RangeError); assertThrows(function() { new SharedArrayBuffer(-10); }, RangeError);
assertThrows(function() { new SharedArrayBuffer(-2.567); }, RangeError); assertThrows(function() { new SharedArrayBuffer(-2.567); }, RangeError);
/* TODO[dslomov]: Reenable the test
assertThrows(function() { assertThrows(function() {
var ab1 = new SharedArrayBuffer(0xFFFFFFFFFFFF) var ab1 = new SharedArrayBuffer(0xFFFFFFFFFFFF)
}, RangeError); }, RangeError);
*/
var sab = new SharedArrayBuffer(); var sab = new SharedArrayBuffer();
assertSame(0, sab.byteLength); assertSame(0, sab.byteLength);
...@@ -450,10 +448,10 @@ function TestTypedArraysWithIllegalIndices() { ...@@ -450,10 +448,10 @@ function TestTypedArraysWithIllegalIndices() {
assertEquals(255, a[s2]); assertEquals(255, a[s2]);
assertEquals(0, a[-0]); assertEquals(0, a[-0]);
/* Chromium bug: 424619
* a[-Infinity] = 50; a[-Infinity] = 50;
* assertEquals(undefined, a[-Infinity]); assertEquals(undefined, a[-Infinity]);
*/
a[1.5] = 10; a[1.5] = 10;
assertEquals(undefined, a[1.5]); assertEquals(undefined, a[1.5]);
var nan = Math.sqrt(-1); var nan = Math.sqrt(-1);
...@@ -499,10 +497,9 @@ function TestTypedArraysWithIllegalIndicesStrict() { ...@@ -499,10 +497,9 @@ function TestTypedArraysWithIllegalIndicesStrict() {
assertEquals(255, a[s2]); assertEquals(255, a[s2]);
assertEquals(0, a[-0]); assertEquals(0, a[-0]);
/* Chromium bug: 424619 a[-Infinity] = 50;
* a[-Infinity] = 50; assertEquals(undefined, a[-Infinity]);
* assertEquals(undefined, a[-Infinity]);
*/
a[1.5] = 10; a[1.5] = 10;
assertEquals(undefined, a[1.5]); assertEquals(undefined, a[1.5]);
var nan = Math.sqrt(-1); var nan = Math.sqrt(-1);
......
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