mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 15:04:43 +02:00
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();
|
obj.join();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -11,5 +11,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.join();
|
new Array.prototype.join();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -11,5 +11,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.pop();
|
new Array.prototype.pop();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -11,5 +11,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.push();
|
new Array.prototype.push();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -11,5 +11,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.reverse();
|
new Array.prototype.reverse();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -11,5 +11,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.shift();
|
new Array.prototype.shift();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -14,6 +14,4 @@ assert.throws(RangeError, () => {
|
|||||||
obj[4294967295] = "y";
|
obj[4294967295] = "y";
|
||||||
obj.length = 4294967296;
|
obj.length = 4294967296;
|
||||||
obj.slice(0, 4294967296);
|
obj.slice(0, 4294967296);
|
||||||
new Array.prototype.toLocaleString();
|
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -14,5 +14,4 @@ assert.throws(RangeError, () => {
|
|||||||
obj[4294967296] = "y";
|
obj[4294967296] = "y";
|
||||||
obj.length = 4294967297;
|
obj.length = 4294967297;
|
||||||
obj.slice(0, 4294967297);
|
obj.slice(0, 4294967297);
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -11,5 +11,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.slice();
|
new Array.prototype.slice();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -11,5 +11,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.sort();
|
new Array.prototype.sort();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -11,5 +11,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.splice();
|
new Array.prototype.splice();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -12,5 +12,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.toLocaleString();
|
new Array.prototype.toLocaleString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -95,5 +95,4 @@ assert.throws(TypeError, () => {
|
|||||||
};
|
};
|
||||||
var x = new Array(object);
|
var x = new Array(object);
|
||||||
x.toString();
|
x.toString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -12,5 +12,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.toString();
|
new Array.prototype.toString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -11,5 +11,4 @@ description: >
|
|||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
new Array.prototype.unshift();
|
new Array.prototype.unshift();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -15,12 +15,10 @@ assert.throws(TypeError, () => {
|
|||||||
var s1 = new String();
|
var s1 = new String();
|
||||||
s1.toString = Boolean.prototype.toString;
|
s1.toString = Boolean.prototype.toString;
|
||||||
var v1 = s1.toString();
|
var v1 = s1.toString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
var s2 = new String();
|
var s2 = new String();
|
||||||
s2.myToString = Boolean.prototype.toString;
|
s2.myToString = Boolean.prototype.toString;
|
||||||
var v2 = s2.myToString();
|
var v2 = s2.myToString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -15,12 +15,10 @@ assert.throws(TypeError, () => {
|
|||||||
var s1 = new Number();
|
var s1 = new Number();
|
||||||
s1.toString = Boolean.prototype.toString;
|
s1.toString = Boolean.prototype.toString;
|
||||||
s1.toString();
|
s1.toString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
var s2 = new Number();
|
var s2 = new Number();
|
||||||
s2.myToString = Boolean.prototype.toString;
|
s2.myToString = Boolean.prototype.toString;
|
||||||
s2.myToString();
|
s2.myToString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -15,12 +15,10 @@ assert.throws(TypeError, () => {
|
|||||||
var s1 = new Date();
|
var s1 = new Date();
|
||||||
s1.toString = Boolean.prototype.toString;
|
s1.toString = Boolean.prototype.toString;
|
||||||
s1.toString();
|
s1.toString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
var s2 = new Date();
|
var s2 = new Date();
|
||||||
s2.myToString = Boolean.prototype.toString;
|
s2.myToString = Boolean.prototype.toString;
|
||||||
s2.myToString();
|
s2.myToString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -16,12 +16,10 @@ assert.throws(TypeError, () => {
|
|||||||
var s1 = new Object();
|
var s1 = new Object();
|
||||||
s1.toString = Boolean.prototype.toString;
|
s1.toString = Boolean.prototype.toString;
|
||||||
s1.toString();
|
s1.toString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
var s2 = new Object();
|
var s2 = new Object();
|
||||||
s2.myToString = Boolean.prototype.toString;
|
s2.myToString = Boolean.prototype.toString;
|
||||||
s2.myToString();
|
s2.myToString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -17,7 +17,6 @@ assert.throws(TypeError, () => {
|
|||||||
};
|
};
|
||||||
s1.toString = Boolean.prototype.toString;
|
s1.toString = Boolean.prototype.toString;
|
||||||
s1.toString();
|
s1.toString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
@ -26,5 +25,4 @@ assert.throws(TypeError, () => {
|
|||||||
};
|
};
|
||||||
s2.myToString = Boolean.prototype.toString;
|
s2.myToString = Boolean.prototype.toString;
|
||||||
s2.myToString();
|
s2.myToString();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -14,12 +14,10 @@ assert.throws(TypeError, () => {
|
|||||||
var s1 = new String();
|
var s1 = new String();
|
||||||
s1.valueOf = Boolean.prototype.valueOf;
|
s1.valueOf = Boolean.prototype.valueOf;
|
||||||
s1.valueOf();
|
s1.valueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
var s2 = new String();
|
var s2 = new String();
|
||||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||||
s2.myvalueOf();
|
s2.myvalueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -14,12 +14,10 @@ assert.throws(TypeError, () => {
|
|||||||
var s1 = new Number();
|
var s1 = new Number();
|
||||||
s1.valueOf = Boolean.prototype.valueOf;
|
s1.valueOf = Boolean.prototype.valueOf;
|
||||||
s1.valueOf();
|
s1.valueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
var s2 = new Number();
|
var s2 = new Number();
|
||||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||||
s2.myvalueOf();
|
s2.myvalueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -14,12 +14,10 @@ assert.throws(TypeError, () => {
|
|||||||
var s1 = new Date();
|
var s1 = new Date();
|
||||||
s1.valueOf = Boolean.prototype.valueOf;
|
s1.valueOf = Boolean.prototype.valueOf;
|
||||||
s1.valueOf();
|
s1.valueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
var s2 = new Date();
|
var s2 = new Date();
|
||||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||||
s2.myvalueOf();
|
s2.myvalueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -14,12 +14,10 @@ assert.throws(TypeError, () => {
|
|||||||
var s1 = new Object();
|
var s1 = new Object();
|
||||||
s1.valueOf = Boolean.prototype.valueOf;
|
s1.valueOf = Boolean.prototype.valueOf;
|
||||||
s1.valueOf();
|
s1.valueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
var s2 = new Object();
|
var s2 = new Object();
|
||||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||||
s2.myvalueOf();
|
s2.myvalueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
@ -16,7 +16,6 @@ assert.throws(TypeError, () => {
|
|||||||
};
|
};
|
||||||
s1.valueOf = Boolean.prototype.valueOf;
|
s1.valueOf = Boolean.prototype.valueOf;
|
||||||
s1.valueOf();
|
s1.valueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.throws(TypeError, () => {
|
assert.throws(TypeError, () => {
|
||||||
@ -25,5 +24,4 @@ assert.throws(TypeError, () => {
|
|||||||
};
|
};
|
||||||
s2.myvalueOf = Boolean.prototype.valueOf;
|
s2.myvalueOf = Boolean.prototype.valueOf;
|
||||||
s2.myvalueOf();
|
s2.myvalueOf();
|
||||||
throw new Test262Error();
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user