mirror of https://github.com/tc39/test262.git
remove redundant throw from assert.throws() test functions (#3167)
This commit is contained in:
parent
07caa4a2df
commit
836111dc3c
|
@ -90,5 +90,4 @@ assert.throws(TypeError, () => {
|
|||
}
|
||||
};
|
||||
obj.join();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -11,5 +11,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.join();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -11,5 +11,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.pop();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -11,5 +11,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.push();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -11,5 +11,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.reverse();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -11,5 +11,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.shift();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -14,6 +14,4 @@ assert.throws(RangeError, () => {
|
|||
obj[4294967295] = "y";
|
||||
obj.length = 4294967296;
|
||||
obj.slice(0, 4294967296);
|
||||
new Array.prototype.toLocaleString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -14,5 +14,4 @@ assert.throws(RangeError, () => {
|
|||
obj[4294967296] = "y";
|
||||
obj.length = 4294967297;
|
||||
obj.slice(0, 4294967297);
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -11,5 +11,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.slice();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -11,5 +11,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.sort();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -11,5 +11,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.splice();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -12,5 +12,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.toLocaleString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -95,5 +95,4 @@ assert.throws(TypeError, () => {
|
|||
};
|
||||
var x = new Array(object);
|
||||
x.toString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -12,5 +12,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.toString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -11,5 +11,4 @@ description: >
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.unshift();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -15,12 +15,10 @@ assert.throws(TypeError, () => {
|
|||
var s1 = new String();
|
||||
s1.toString = Boolean.prototype.toString;
|
||||
var v1 = s1.toString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
var s2 = new String();
|
||||
s2.myToString = Boolean.prototype.toString;
|
||||
var v2 = s2.myToString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -15,12 +15,10 @@ assert.throws(TypeError, () => {
|
|||
var s1 = new Number();
|
||||
s1.toString = Boolean.prototype.toString;
|
||||
s1.toString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
var s2 = new Number();
|
||||
s2.myToString = Boolean.prototype.toString;
|
||||
s2.myToString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -15,12 +15,10 @@ assert.throws(TypeError, () => {
|
|||
var s1 = new Date();
|
||||
s1.toString = Boolean.prototype.toString;
|
||||
s1.toString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
var s2 = new Date();
|
||||
s2.myToString = Boolean.prototype.toString;
|
||||
s2.myToString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -16,12 +16,10 @@ assert.throws(TypeError, () => {
|
|||
var s1 = new Object();
|
||||
s1.toString = Boolean.prototype.toString;
|
||||
s1.toString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
var s2 = new Object();
|
||||
s2.myToString = Boolean.prototype.toString;
|
||||
s2.myToString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -17,7 +17,6 @@ assert.throws(TypeError, () => {
|
|||
};
|
||||
s1.toString = Boolean.prototype.toString;
|
||||
s1.toString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
|
@ -26,5 +25,4 @@ assert.throws(TypeError, () => {
|
|||
};
|
||||
s2.myToString = Boolean.prototype.toString;
|
||||
s2.myToString();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -14,12 +14,10 @@ assert.throws(TypeError, () => {
|
|||
var s1 = new String();
|
||||
s1.valueOf = Boolean.prototype.valueOf;
|
||||
s1.valueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
var s2 = new String();
|
||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||
s2.myvalueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -14,12 +14,10 @@ assert.throws(TypeError, () => {
|
|||
var s1 = new Number();
|
||||
s1.valueOf = Boolean.prototype.valueOf;
|
||||
s1.valueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
var s2 = new Number();
|
||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||
s2.myvalueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -14,12 +14,10 @@ assert.throws(TypeError, () => {
|
|||
var s1 = new Date();
|
||||
s1.valueOf = Boolean.prototype.valueOf;
|
||||
s1.valueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
var s2 = new Date();
|
||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||
s2.myvalueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -14,12 +14,10 @@ assert.throws(TypeError, () => {
|
|||
var s1 = new Object();
|
||||
s1.valueOf = Boolean.prototype.valueOf;
|
||||
s1.valueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
var s2 = new Object();
|
||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||
s2.myvalueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
|
@ -16,7 +16,6 @@ assert.throws(TypeError, () => {
|
|||
};
|
||||
s1.valueOf = Boolean.prototype.valueOf;
|
||||
s1.valueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
|
@ -25,5 +24,4 @@ assert.throws(TypeError, () => {
|
|||
};
|
||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||
s2.myvalueOf();
|
||||
throw new Test262Error();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue