Remove unreachable code (#3165)

* Remove unreachable code

* fixup! Remove unreachable code
This commit is contained in:
jugglinmike 2021-08-25 16:13:00 -04:00 committed by GitHub
parent 0fd4111b8b
commit 49347e0cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 56 deletions

View File

@ -8,9 +8,6 @@ description: Complex tests
includes: [decimalToHexString.js]
---*/
//CHECK
var errorCount = 0;
var count = 0;
for (var indexI = 0; indexI <= 65535; indexI++) {
if (indexI !== 0x25) {
var hex = decimalToHexString(indexI);
@ -18,16 +15,9 @@ for (var indexI = 0; indexI <= 65535; indexI++) {
var str = String.fromCharCode(indexI);
if (decodeURI(str) !== str) {
throw new Test262Error('#' + hex + ' ');
errorCount++;
}
} catch (e) {
throw new Test262Error('#' + hex + ' ');
errorCount++;
}
count++;
}
}
if (errorCount > 0) {
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
}

View File

@ -8,9 +8,6 @@ description: Complex tests
includes: [decimalToHexString.js]
---*/
//CHECK
var errorCount = 0;
var count = 0;
for (var indexI = 0; indexI <= 65535; indexI++) {
if (indexI !== 0x25) {
var hex = decimalToHexString(indexI);
@ -18,16 +15,9 @@ for (var indexI = 0; indexI <= 65535; indexI++) {
var str = String.fromCharCode(indexI);
if (decodeURIComponent(str) !== str) {
throw new Test262Error('#' + hex + ' ');
errorCount++;
}
} catch (e) {
throw new Test262Error('#' + hex + ' ');
errorCount++;
}
count++;
}
}
if (errorCount > 0) {
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
}

View File

@ -9,32 +9,17 @@ description: "StrWhiteSpaceChar :: USP"
//CHECK#
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 uspS = ["1680", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "200A", "202F", "205F", "3000"];
for (var index = 0; index < uspU.length; index++) {
var result = true;
n = false;
if (parseFloat(uspU[index] + "1.1") !== parseFloat("1.1")) {
throw new Test262Error('#1.' + uspS[index] + ' ');
result = false;
}
if (parseFloat(uspU[index] + uspU[index] + uspU[index] + "1.1") !== parseFloat("1.1")) {
throw new Test262Error('#2.' + uspS[index] + ' ');
result = false;
}
n = parseFloat(uspU[index]);
if (!(n !== n)) {
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);
}

View File

@ -11,9 +11,6 @@ description: >
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"];
for (var i1 = 0; i1 < 16; i1++) {
for (var i2 = 0; i2 < 16; i2++) {
@ -28,24 +25,16 @@ for (var i1 = 0; i1 < 16; i1++) {
if (LineTerminators !== true) {
if (yy !== 0) {
throw new Test262Error('#' + uu + ' ');
errorCount++;
}
} else {
if (yy !== -1) {
throw new Test262Error('#' + uu + ' ');
errorCount++;
}
}
} catch (e){
throw new Test262Error('#' + uu + ' ');
errorCount++;
}
count++;
}
}
}
}
if (errorCount > 0) {
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
}

View File

@ -9,9 +9,6 @@ es5id: 7.4_A6
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++) {
try {
var xx = 0;
@ -19,17 +16,10 @@ for (var indexI = 0; indexI <= 65535; indexI++) {
var hex = decimalToHexString(indexI);
if (xx !== 0) {
throw new Test262Error('#' + hex + ' ');
errorCount++;
}
} catch (e){
throw new Test262Error('#' + hex + ' ');
errorCount++;
}
count++;
}
if (errorCount > 0) {
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
}
function decimalToHexString(n) {