mirror of https://github.com/tc39/test262.git
Fix range check tests for DataView#set methods
Fixes gh-685
This commit is contained in:
parent
9370371ac5
commit
9ff1cbb50c
|
@ -35,3 +35,7 @@ assert.throws(RangeError, function() {
|
|||
assert.throws(RangeError, function() {
|
||||
dataView.setFloat32(-Infinity, poisoned);
|
||||
}, "setFloat32(-Infinity, poisoned)");
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
dataView.setFloat32(Infinity, poisoned);
|
||||
}, "setFloat32(Infinity, poisoned)");
|
||||
|
|
|
@ -30,18 +30,10 @@ var poisoned = {
|
|||
}
|
||||
};
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setFloat32(Infinity, poisoned);
|
||||
}, "setFloat32(Infinity, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setFloat32(100, poisoned);
|
||||
}, "setFloat32(100, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setFloat32('Infinity', poisoned);
|
||||
}, "setFloat32('Infinity', poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setFloat32('100', poisoned);
|
||||
}, "setFloat32('100', poisoned)");
|
||||
|
|
|
@ -36,3 +36,7 @@ assert.throws(RangeError, function() {
|
|||
assert.throws(RangeError, function() {
|
||||
dataView.setFloat64(-Infinity, poisoned);
|
||||
}, "setFloat64(-Infinity, poisoned)");
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
dataView.setFloat64(Infinity, poisoned);
|
||||
}, "setFloat64(Infinity, poisoned)");
|
||||
|
|
|
@ -30,18 +30,10 @@ var poisoned = {
|
|||
}
|
||||
};
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setFloat64(Infinity, poisoned);
|
||||
}, "setFloat64(Infinity, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setFloat64(100, poisoned);
|
||||
}, "setFloat64(100, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setFloat64('Infinity', poisoned);
|
||||
}, "setFloat64('Infinity', poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setFloat64('100', poisoned);
|
||||
}, "setFloat64('100', poisoned)");
|
||||
|
|
|
@ -36,3 +36,7 @@ assert.throws(RangeError, function() {
|
|||
assert.throws(RangeError, function() {
|
||||
dataView.setInt16(-Infinity, poisoned);
|
||||
}, "setInt16(-Infinity, poisoned)");
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
dataView.setInt16(Infinity, poisoned);
|
||||
}, "setInt16(Infinity, poisoned)");
|
||||
|
|
|
@ -30,18 +30,10 @@ var poisoned = {
|
|||
}
|
||||
};
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt16(Infinity, poisoned);
|
||||
}, "setInt16(Infinity, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt16(100, poisoned);
|
||||
}, "setInt16(100, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt16('Infinity', poisoned);
|
||||
}, "setInt16('Infinity', poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt16('100', poisoned);
|
||||
}, "setInt16('100', poisoned)");
|
||||
|
|
|
@ -36,3 +36,7 @@ assert.throws(RangeError, function() {
|
|||
assert.throws(RangeError, function() {
|
||||
dataView.setInt32(-Infinity, poisoned);
|
||||
}, "setInt32(-Infinity, poisoned)");
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
dataView.setInt32(Infinity, poisoned);
|
||||
}, "setInt32(Infinity, poisoned)");
|
||||
|
|
|
@ -30,18 +30,10 @@ var poisoned = {
|
|||
}
|
||||
};
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt32(Infinity, poisoned);
|
||||
}, "setInt32(Infinity, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt32(100, poisoned);
|
||||
}, "setInt32(100, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt32('Infinity', poisoned);
|
||||
}, "setInt32('Infinity', poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt32('100', poisoned);
|
||||
}, "setInt32('100', poisoned)");
|
||||
|
|
|
@ -36,3 +36,7 @@ assert.throws(RangeError, function() {
|
|||
assert.throws(RangeError, function() {
|
||||
dataView.setInt8(-Infinity, poisoned);
|
||||
}, "setInt8(-Infinity, poisoned)");
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
dataView.setInt8(Infinity, poisoned);
|
||||
}, "setInt8(Infinity, poisoned)");
|
||||
|
|
|
@ -30,18 +30,10 @@ var poisoned = {
|
|||
}
|
||||
};
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt8(Infinity, poisoned);
|
||||
}, "setInt8(Infinity, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt8(100, poisoned);
|
||||
}, "setInt8(100, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt8('Infinity', poisoned);
|
||||
}, "setInt8('Infinity', poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setInt8('100', poisoned);
|
||||
}, "setInt8('100', poisoned)");
|
||||
|
|
|
@ -36,3 +36,7 @@ assert.throws(RangeError, function() {
|
|||
assert.throws(RangeError, function() {
|
||||
dataView.setUint16(-Infinity, poisoned);
|
||||
}, "setUint16(-Infinity, poisoned)");
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
dataView.setUint16(Infinity, poisoned);
|
||||
}, "setUint16(Infinity, poisoned)");
|
||||
|
|
|
@ -30,18 +30,10 @@ var poisoned = {
|
|||
}
|
||||
};
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint16(Infinity, poisoned);
|
||||
}, "setUint16(Infinity, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint16(100, poisoned);
|
||||
}, "setUint16(100, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint16('Infinity', poisoned);
|
||||
}, "setUint16('Infinity', poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint16('100', poisoned);
|
||||
}, "setUint16('100', poisoned)");
|
||||
|
|
|
@ -36,3 +36,7 @@ assert.throws(RangeError, function() {
|
|||
assert.throws(RangeError, function() {
|
||||
dataView.setUint32(-Infinity, poisoned);
|
||||
}, "setUint32(-Infinity, poisoned)");
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
dataView.setUint32(Infinity, poisoned);
|
||||
}, "setUint32(Infinity, poisoned)");
|
||||
|
|
|
@ -30,18 +30,10 @@ var poisoned = {
|
|||
}
|
||||
};
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint32(Infinity, poisoned);
|
||||
}, "setUint32(Infinity, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint32(100, poisoned);
|
||||
}, "setUint32(100, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint32('Infinity', poisoned);
|
||||
}, "setUint32('Infinity', poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint32('100', poisoned);
|
||||
}, "setUint32('100', poisoned)");
|
||||
|
|
|
@ -36,3 +36,7 @@ assert.throws(RangeError, function() {
|
|||
assert.throws(RangeError, function() {
|
||||
dataView.setUint8(-Infinity, poisoned);
|
||||
}, "setUint8(-Infinity, poisoned)");
|
||||
|
||||
assert.throws(RangeError, function() {
|
||||
dataView.setUint8(Infinity, poisoned);
|
||||
}, "setUint8(Infinity, poisoned)");
|
||||
|
|
|
@ -30,18 +30,10 @@ var poisoned = {
|
|||
}
|
||||
};
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint8(Infinity, poisoned);
|
||||
}, "setUint8(Infinity, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint8(100, poisoned);
|
||||
}, "setUint8(100, poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint8('Infinity', poisoned);
|
||||
}, "setUint8('Infinity', poisoned)");
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
dataView.setUint8('100', poisoned);
|
||||
}, "setUint8('100', poisoned)");
|
||||
|
|
Loading…
Reference in New Issue