mirror of
https://github.com/tc39/test262.git
synced 2025-07-24 22:45:10 +02:00
parent
65afdfbff6
commit
6e4d442cc6
@ -22,7 +22,6 @@ features: [TypedArray]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
|
|
||||||
var ta;
|
var ta;
|
||||||
var array = [];
|
var array = [];
|
||||||
|
|
||||||
@ -36,7 +35,6 @@ testWithTypedArrayConstructors(function(TA) {
|
|||||||
array.fill(7, 0);
|
array.fill(7, 0);
|
||||||
ta = new TA(array);
|
ta = new TA(array);
|
||||||
assert.throws(TypeError, function(){
|
assert.throws(TypeError, function(){
|
||||||
ta.copyWithin(0, 100, {valueOf : detachAndReturnIndex}); },
|
ta.copyWithin(0, 100, {valueOf : detachAndReturnIndex});
|
||||||
"should throw TypeError as array is detached");
|
}, "should throw TypeError as array is detached");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,6 @@ features: [TypedArray]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
|
|
||||||
var ta;
|
var ta;
|
||||||
function detachAndReturnIndex(){
|
function detachAndReturnIndex(){
|
||||||
$DETACHBUFFER(ta.buffer);
|
$DETACHBUFFER(ta.buffer);
|
||||||
@ -35,5 +34,5 @@ testWithTypedArrayConstructors(function(TA) {
|
|||||||
ta = new TA(array);
|
ta = new TA(array);
|
||||||
assert.throws(TypeError, function(){
|
assert.throws(TypeError, function(){
|
||||||
ta.copyWithin(0, 100, {valueOf : detachAndReturnIndex});
|
ta.copyWithin(0, 100, {valueOf : detachAndReturnIndex});
|
||||||
"should throw TypeError as array is detached");
|
}, "should throw TypeError as array is detached");
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,6 @@ features: [TypedArray]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
testWithTypedArrayConstructors(function(TA) {
|
testWithTypedArrayConstructors(function(TA) {
|
||||||
|
|
||||||
var ta;
|
var ta;
|
||||||
function detachAndReturnIndex(){
|
function detachAndReturnIndex(){
|
||||||
$DETACHBUFFER(ta.buffer);
|
$DETACHBUFFER(ta.buffer);
|
||||||
@ -35,7 +34,5 @@ testWithTypedArrayConstructors(function(TA) {
|
|||||||
ta = new TA(array);
|
ta = new TA(array);
|
||||||
assert.throws(TypeError, function(){
|
assert.throws(TypeError, function(){
|
||||||
ta.copyWithin(0, {valueOf : detachAndReturnIndex}, 1000);
|
ta.copyWithin(0, {valueOf : detachAndReturnIndex}, 1000);
|
||||||
"should throw TypeError as array is detached");
|
}, "should throw TypeError as array is detached");
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user