Index: test/mjsunit/harmony/typedarray-fill.js |
diff --git a/test/mjsunit/harmony/typedarray-fill.js b/test/mjsunit/harmony/typedarray-fill.js |
index 40605bbd515ea553bcaf9d6c45124020047def1a..4452bf64cdecf7ae3b4da70a2baaa14c18bb12c3 100644 |
--- a/test/mjsunit/harmony/typedarray-fill.js |
+++ b/test/mjsunit/harmony/typedarray-fill.js |
@@ -36,4 +36,12 @@ for (var constructor of typedArrayConstructors) { |
assertThrows('constructor.prototype.fill.call(null)', TypeError); |
assertThrows('constructor.prototype.fill.call(undefined)', TypeError); |
assertThrows('constructor.prototype.fill.call([])', TypeError); |
+ |
+ // Shadowing length doesn't affect fill, unlike Array.prototype.fill |
+ var a = new constructor([2, 2]); |
+ Object.defineProperty(a, 'length', {value: 1}); |
arv (Not doing code reviews)
2015/05/15 00:25:47
or
get: function() { assertUnreachable(); }
dehrenberg
2015/05/15 01:40:41
well, later down I validate the test by making it
|
+ a.fill(3); |
+ assertArrayEquals([a[0], a[1]], [3, 3]); |
+ Array.prototype.fill.call(a, 4); |
+ assertArrayEquals([a[0], a[1]], [4, 3]); |
} |