mirror of
https://github.com/tc39/test262.git
synced 2025-07-24 22:45:10 +02:00
Remove unreachable code (#3165)
* Remove unreachable code * fixup! Remove unreachable code
This commit is contained in:
parent
0fd4111b8b
commit
49347e0cf9
@ -8,9 +8,6 @@ description: Complex tests
|
|||||||
includes: [decimalToHexString.js]
|
includes: [decimalToHexString.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK
|
|
||||||
var errorCount = 0;
|
|
||||||
var count = 0;
|
|
||||||
for (var indexI = 0; indexI <= 65535; indexI++) {
|
for (var indexI = 0; indexI <= 65535; indexI++) {
|
||||||
if (indexI !== 0x25) {
|
if (indexI !== 0x25) {
|
||||||
var hex = decimalToHexString(indexI);
|
var hex = decimalToHexString(indexI);
|
||||||
@ -18,16 +15,9 @@ for (var indexI = 0; indexI <= 65535; indexI++) {
|
|||||||
var str = String.fromCharCode(indexI);
|
var str = String.fromCharCode(indexI);
|
||||||
if (decodeURI(str) !== str) {
|
if (decodeURI(str) !== str) {
|
||||||
throw new Test262Error('#' + hex + ' ');
|
throw new Test262Error('#' + hex + ' ');
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Test262Error('#' + hex + ' ');
|
throw new Test262Error('#' + hex + ' ');
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorCount > 0) {
|
|
||||||
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
|
|
||||||
}
|
|
||||||
|
@ -8,9 +8,6 @@ description: Complex tests
|
|||||||
includes: [decimalToHexString.js]
|
includes: [decimalToHexString.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK
|
|
||||||
var errorCount = 0;
|
|
||||||
var count = 0;
|
|
||||||
for (var indexI = 0; indexI <= 65535; indexI++) {
|
for (var indexI = 0; indexI <= 65535; indexI++) {
|
||||||
if (indexI !== 0x25) {
|
if (indexI !== 0x25) {
|
||||||
var hex = decimalToHexString(indexI);
|
var hex = decimalToHexString(indexI);
|
||||||
@ -18,16 +15,9 @@ for (var indexI = 0; indexI <= 65535; indexI++) {
|
|||||||
var str = String.fromCharCode(indexI);
|
var str = String.fromCharCode(indexI);
|
||||||
if (decodeURIComponent(str) !== str) {
|
if (decodeURIComponent(str) !== str) {
|
||||||
throw new Test262Error('#' + hex + ' ');
|
throw new Test262Error('#' + hex + ' ');
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Test262Error('#' + hex + ' ');
|
throw new Test262Error('#' + hex + ' ');
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorCount > 0) {
|
|
||||||
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
|
|
||||||
}
|
|
||||||
|
@ -9,32 +9,17 @@ description: "StrWhiteSpaceChar :: USP"
|
|||||||
|
|
||||||
//CHECK#
|
//CHECK#
|
||||||
var n;
|
var n;
|
||||||
var count = 0;
|
|
||||||
var errorCount = 0;
|
|
||||||
var uspU = ["\u1680", "\u2000", "\u2001", "\u2002", "\u2003", "\u2004", "\u2005", "\u2006", "\u2007", "\u2008", "\u2009", "\u200A", "\u202F", "\u205F", "\u3000"];
|
var uspU = ["\u1680", "\u2000", "\u2001", "\u2002", "\u2003", "\u2004", "\u2005", "\u2006", "\u2007", "\u2008", "\u2009", "\u200A", "\u202F", "\u205F", "\u3000"];
|
||||||
var uspS = ["1680", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "200A", "202F", "205F", "3000"];
|
var uspS = ["1680", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "200A", "202F", "205F", "3000"];
|
||||||
for (var index = 0; index < uspU.length; index++) {
|
for (var index = 0; index < uspU.length; index++) {
|
||||||
var result = true;
|
|
||||||
n = false;
|
|
||||||
if (parseFloat(uspU[index] + "1.1") !== parseFloat("1.1")) {
|
if (parseFloat(uspU[index] + "1.1") !== parseFloat("1.1")) {
|
||||||
throw new Test262Error('#1.' + uspS[index] + ' ');
|
throw new Test262Error('#1.' + uspS[index] + ' ');
|
||||||
result = false;
|
|
||||||
}
|
}
|
||||||
if (parseFloat(uspU[index] + uspU[index] + uspU[index] + "1.1") !== parseFloat("1.1")) {
|
if (parseFloat(uspU[index] + uspU[index] + uspU[index] + "1.1") !== parseFloat("1.1")) {
|
||||||
throw new Test262Error('#2.' + uspS[index] + ' ');
|
throw new Test262Error('#2.' + uspS[index] + ' ');
|
||||||
result = false;
|
|
||||||
}
|
}
|
||||||
n = parseFloat(uspU[index]);
|
n = parseFloat(uspU[index]);
|
||||||
if (!(n !== n)) {
|
if (!(n !== n)) {
|
||||||
throw new Test262Error('#3.' + uspS[index] + ' ');
|
throw new Test262Error('#3.' + uspS[index] + ' ');
|
||||||
result = false;
|
|
||||||
}
|
}
|
||||||
if (result !== true) {
|
|
||||||
errorCount++;
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (errorCount > 0) {
|
|
||||||
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
|
|
||||||
}
|
}
|
||||||
|
@ -11,9 +11,6 @@ description: >
|
|||||||
characters
|
characters
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK
|
|
||||||
var errorCount = 0;
|
|
||||||
var count = 0;
|
|
||||||
var hex = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
|
var hex = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
|
||||||
for (var i1 = 0; i1 < 16; i1++) {
|
for (var i1 = 0; i1 < 16; i1++) {
|
||||||
for (var i2 = 0; i2 < 16; i2++) {
|
for (var i2 = 0; i2 < 16; i2++) {
|
||||||
@ -28,24 +25,16 @@ for (var i1 = 0; i1 < 16; i1++) {
|
|||||||
if (LineTerminators !== true) {
|
if (LineTerminators !== true) {
|
||||||
if (yy !== 0) {
|
if (yy !== 0) {
|
||||||
throw new Test262Error('#' + uu + ' ');
|
throw new Test262Error('#' + uu + ' ');
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (yy !== -1) {
|
if (yy !== -1) {
|
||||||
throw new Test262Error('#' + uu + ' ');
|
throw new Test262Error('#' + uu + ' ');
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e){
|
} catch (e){
|
||||||
throw new Test262Error('#' + uu + ' ');
|
throw new Test262Error('#' + uu + ' ');
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorCount > 0) {
|
|
||||||
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
|
|
||||||
}
|
|
||||||
|
@ -9,9 +9,6 @@ es5id: 7.4_A6
|
|||||||
description: "\"var\"+ yy+ \"xx = 1\", insert instead of yy all Unicode characters"
|
description: "\"var\"+ yy+ \"xx = 1\", insert instead of yy all Unicode characters"
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK
|
|
||||||
var errorCount = 0;
|
|
||||||
var count = 0;
|
|
||||||
for (var indexI = 0; indexI <= 65535; indexI++) {
|
for (var indexI = 0; indexI <= 65535; indexI++) {
|
||||||
try {
|
try {
|
||||||
var xx = 0;
|
var xx = 0;
|
||||||
@ -19,17 +16,10 @@ for (var indexI = 0; indexI <= 65535; indexI++) {
|
|||||||
var hex = decimalToHexString(indexI);
|
var hex = decimalToHexString(indexI);
|
||||||
if (xx !== 0) {
|
if (xx !== 0) {
|
||||||
throw new Test262Error('#' + hex + ' ');
|
throw new Test262Error('#' + hex + ' ');
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
} catch (e){
|
} catch (e){
|
||||||
throw new Test262Error('#' + hex + ' ');
|
throw new Test262Error('#' + hex + ' ');
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (errorCount > 0) {
|
|
||||||
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function decimalToHexString(n) {
|
function decimalToHexString(n) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user