| Index: test/mjsunit/harmony/typedarrays.js
|
| diff --git a/test/mjsunit/harmony/typedarrays.js b/test/mjsunit/harmony/typedarrays.js
|
| index 99364c8101757a2b3b178807e3a88e22664adbd4..4465aafbba78127110b2191519b1e492f7bf87ad 100644
|
| --- a/test/mjsunit/harmony/typedarrays.js
|
| +++ b/test/mjsunit/harmony/typedarrays.js
|
| @@ -453,10 +453,18 @@ function TestTypedArraySet() {
|
|
|
| // Invalid source
|
| var a = new Uint16Array(50);
|
| - assertThrows(function() { a.set(0) }, TypeError);
|
| - assertThrows(function() { a.set({}) }, TypeError);
|
| + var expected = [];
|
| + for (i = 0; i < 50; i++) {
|
| + a[i] = i;
|
| + expected.push(i);
|
| + }
|
| + a.set({});
|
| + assertArrayPrefix(expected, a);
|
| assertThrows(function() { a.set.call({}) }, TypeError);
|
| assertThrows(function() { a.set.call([]) }, TypeError);
|
| +
|
| + assertThrows(function() { a.set(0); }, TypeError);
|
| + assertThrows(function() { a.set(0, 1); }, TypeError);
|
| }
|
|
|
| TestTypedArraySet();
|
|
|