diff --git a/test/built-ins/encodeURI/S15.1.3.3_A1.1_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A1.1_T1.js index b2e05262c2..05ce2adf38 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A1.1_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A1.1_T1.js @@ -16,31 +16,31 @@ var indexP; var indexO = 0; for (var index = 0xDC00; index <= 0xDFFF; index++) { - count++; + count++; var hex = decimalToHexString(index); try { encodeURI(String.fromCharCode(index)); - } catch (e) { - if ((e instanceof URIError) === true) continue; + } catch (e) { + if ((e instanceof URIError) === true) continue; } - if (indexO === 0) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; + errorCount++; } if (errorCount > 0) { @@ -51,6 +51,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A1.1_T2.js b/test/built-ins/encodeURI/S15.1.3.3_A1.1_T2.js index 26fff594e9..4e99844b9f 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A1.1_T2.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A1.1_T2.js @@ -16,31 +16,31 @@ var indexP; var indexO = 0; for (var index = 0xDC00; index <= 0xDFFF; index++) { - count++; + count++; var hex = decimalToHexString(index); try { encodeURI(String.fromCharCode(index, 0x0041)); - } catch (e) { - if ((e instanceof URIError) === true) continue; + } catch (e) { + if ((e instanceof URIError) === true) continue; } - if (indexO === 0) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; + errorCount++; } if (errorCount > 0) { @@ -51,6 +51,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A1.2_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A1.2_T1.js index 2697ba1e3a..73eebfbbc4 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A1.2_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A1.2_T1.js @@ -18,31 +18,31 @@ var indexP; var indexO = 0; for (var index = 0xD800; index <= 0xDBFF; index++) { - count++; + count++; var hex = decimalToHexString(index); try { encodeURI(String.fromCharCode(index)); - } catch (e) { - if ((e instanceof URIError) === true) continue; + } catch (e) { + if ((e instanceof URIError) === true) continue; } - if (indexO === 0) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; + errorCount++; } if (errorCount > 0) { @@ -53,6 +53,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A1.2_T2.js b/test/built-ins/encodeURI/S15.1.3.3_A1.2_T2.js index 1eb56e73ef..7604aa7ff7 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A1.2_T2.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A1.2_T2.js @@ -18,31 +18,31 @@ var indexP; var indexO = 0; for (var index = 0xD800; index <= 0xDBFF; index++) { - count++; + count++; var hex = decimalToHexString(index); try { encodeURI(String.fromCharCode(0x0041, index)); - } catch (e) { - if ((e instanceof URIError) === true) continue; + } catch (e) { + if ((e instanceof URIError) === true) continue; } - if (indexO === 0) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; + errorCount++; } if (errorCount > 0) { @@ -53,6 +53,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A1.3_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A1.3_T1.js index 314b8f9dca..88bd38452e 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A1.3_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A1.3_T1.js @@ -21,37 +21,37 @@ var indexP; var indexO = 0; for (var index = 0xD800; index <= 0xDBFF; index++) { - count++; + count++; var res = true; for (var indexC = 0; indexC < chars.length; indexC++) { var hex = decimalToHexString(index); try { - encodeURI(String.fromCharCode(index, chars[indexC])); - } catch (e) { + encodeURI(String.fromCharCode(index, chars[indexC])); + } catch (e) { if ((e instanceof URIError) === true) continue; } res = false; } if (res !== true) { - if (indexO === 0) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; - } + errorCount++; + } } if (errorCount > 0) { @@ -62,6 +62,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A2.1_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A2.1_T1.js index a5b05515f1..df06b39721 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A2.1_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A2.1_T1.js @@ -19,7 +19,7 @@ var count = 0; var indexP; var indexO = 0; -l : +l : for (var index = 0x0000; index <= 0x007F; index++) { count++; var str = String.fromCharCode(index); @@ -28,28 +28,28 @@ for (var index = 0x0000; index <= 0x007F; index++) { } for (indexC = 0; indexC < uriUnescaped.length; indexC++) { if (uriUnescaped[indexC] === str) continue l; - } - if ("#" === str) continue l; + } + if ("#" === str) continue l; if (encodeURI(str).toUpperCase() === decimalToPercentHexString(index)) continue l; - if (indexO === 0) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; + errorCount++; } if (errorCount > 0) { @@ -60,6 +60,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A2.2_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A2.2_T1.js index 98a99b61c2..1272569b5b 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A2.2_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A2.2_T1.js @@ -15,33 +15,33 @@ includes: [decimalToHexString.js] var errorCount = 0; var count = 0; var indexP; -var indexO = 0; +var indexO = 0; l: for (var index = 0x0080; index <= 0x07FF; index++) { - count++; + count++; var hex1 = decimalToPercentHexString(0x0080 + (index & 0x003F)); var hex2 = decimalToPercentHexString(0x00C0 + (index & 0x07C0) / 0x0040); var str = String.fromCharCode(index); if (encodeURI(str).toUpperCase() === hex2 + hex1) continue; - if (indexO === 0) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; + errorCount++; } if (errorCount > 0) { @@ -52,6 +52,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A2.3_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A2.3_T1.js index b9a392ec8c..100357c818 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A2.3_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A2.3_T1.js @@ -15,34 +15,34 @@ includes: [decimalToHexString.js] var errorCount = 0; var count = 0; var indexP; -var indexO = 0; +var indexO = 0; for (var index = 0x0800; index <= 0xD7FF; index++) { - count++; + count++; var hex1 = decimalToPercentHexString(0x0080 + (index & 0x003F)); var hex2 = decimalToPercentHexString(0x0080 + (index & 0x0FC0) / 0x0040); var hex3 = decimalToPercentHexString(0x00E0 + (index & 0xF000) / 0x1000); var str = String.fromCharCode(index); if (encodeURI(str).toUpperCase() === hex3 + hex2 + hex1) continue; - if (indexO === 0) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; -} + errorCount++; +} if (errorCount > 0) { if ((indexP - indexO) !== 0) { @@ -52,6 +52,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A2.4_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A2.4_T1.js index a6d04077be..f3d625a0bf 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A2.4_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A2.4_T1.js @@ -19,7 +19,7 @@ var chars = [0xDC00, 0xDDFF, 0xDFFF]; var errorCount = 0; var count = 0; var indexP; -var indexO = 0; +var indexO = 0; for (var index = 0xD800; index <= 0xDBFF; index++) { var res = true; for (var indexC = 0; indexC < chars.length; indexC++) { @@ -33,27 +33,27 @@ for (var index = 0xD800; index <= 0xDBFF; index++) { res = false; } - if (res !== true) { - if (indexO === 0) { + if (res !== true) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; + errorCount++; } - count++; + count++; } if (errorCount > 0) { @@ -64,6 +64,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A2.4_T2.js b/test/built-ins/encodeURI/S15.1.3.3_A2.4_T2.js index 8620e68f4f..8116845a9f 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A2.4_T2.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A2.4_T2.js @@ -19,7 +19,7 @@ var chars = [0xD800, 0xDBFF, 0xD9FF]; var errorCount = 0; var count = 0; var indexP; -var indexO = 0; +var indexO = 0; for (var index = 0xDC00; index <= 0xDFFF; index++) { var res = true; for (var indexC = 0; indexC < chars.length; indexC++) { @@ -33,27 +33,27 @@ for (var index = 0xDC00; index <= 0xDFFF; index++) { res = false; } - if (res !== true) { - if (indexO === 0) { + if (res !== true) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; + errorCount++; } - count++; + count++; } if (errorCount > 0) { @@ -64,6 +64,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A2.5_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A2.5_T1.js index 58d7f2ff79..4092e238e3 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A2.5_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A2.5_T1.js @@ -15,33 +15,33 @@ includes: [decimalToHexString.js] var errorCount = 0; var count = 0; var indexP; -var indexO = 0; +var indexO = 0; for (var index = 0xE000; index <= 0xFFFF; index++) { - count++; + count++; var hex1 = decimalToPercentHexString(0x0080 + (index & 0x003F)); var hex2 = decimalToPercentHexString(0x0080 + (index & 0x0FC0) / 0x0040); var hex3 = decimalToPercentHexString(0x00E0 + (index & 0xF000) / 0x1000); var str = String.fromCharCode(index); if (encodeURI(str).toUpperCase() === hex3 + hex2 + hex1) continue; - if (indexO === 0) { + if (indexO === 0) { indexO = index; } else { - if ((index - indexP) !== 1) { + if ((index - indexP) !== 1) { if ((indexP - indexO) !== 0) { var hexP = decimalToHexString(indexP); var hexO = decimalToHexString(indexO); $ERROR('#' + hexO + '-' + hexP + ' '); - } + } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } indexO = index; - } + } } indexP = index; - errorCount++; + errorCount++; } if (errorCount > 0) { @@ -52,6 +52,6 @@ if (errorCount > 0) { } else { var hexP = decimalToHexString(indexP); $ERROR('#' + hexP + ' '); - } + } $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' '); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A3.1_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A3.1_T1.js index 016dac7943..b7d0748e3e 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A3.1_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A3.1_T1.js @@ -13,8 +13,8 @@ description: Complex tests var uriReserved = [";", "/", "?", ":", "@", "&", "=", "+", "$", ","]; for (var indexC = 0; indexC < uriReserved.length; indexC++) { - var str = uriReserved[indexC]; + var str = uriReserved[indexC]; if (encodeURI(str) !== str) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str); - } + } } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A3.2_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A3.2_T1.js index 574a32585e..bb7478c688 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A3.2_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A3.2_T1.js @@ -13,8 +13,8 @@ description: "Complex tests, uriUnescaped :: uriAlpha" var uriAlpha = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; for (var indexC = 0; indexC < uriAlpha.length; indexC++) { - var str = uriAlpha[indexC]; + var str = uriAlpha[indexC]; if (encodeURI(str) !== str) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing ' + str); - } + } } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A3.2_T2.js b/test/built-ins/encodeURI/S15.1.3.3_A3.2_T2.js index 24e25ea2b4..6685161fd6 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A3.2_T2.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A3.2_T2.js @@ -13,8 +13,8 @@ description: "Complex tests, uriUnescaped :: DecimalDigit" var DecimalDigit = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; for (var indexC = 0; indexC < DecimalDigit.length; indexC++) { - var str = DecimalDigit[indexC]; + var str = DecimalDigit[indexC]; if (encodeURI(str) !== str) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str); - } + } } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A3.2_T3.js b/test/built-ins/encodeURI/S15.1.3.3_A3.2_T3.js index 980df7b900..eec63433f5 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A3.2_T3.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A3.2_T3.js @@ -13,8 +13,8 @@ description: "Complex tests, uriUnescaped :: uriMark" var uriMark = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; for (var indexC = 0; indexC < uriMark.length; indexC++) { - var str = uriMark[indexC]; + var str = uriMark[indexC]; if (encodeURI(str) !== str) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str); - } + } } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A4_T4.js b/test/built-ins/encodeURI/S15.1.3.3_A4_T4.js index 9807d73362..f02b1a9033 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A4_T4.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A4_T4.js @@ -22,7 +22,7 @@ if (encodeURI("http://unipro.ru") !== "http://unipro.ru") { //CHECK#3 if (encodeURI("http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork") !== "http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork") { $ERROR('#3: http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork"'); -} +} //CHECK#4 if (encodeURI("http://en.wikipedia.org/wiki/UTF-8#Description") !== "http://en.wikipedia.org/wiki/UTF-8#Description") { diff --git a/test/built-ins/encodeURI/S15.1.3.3_A5.1.js b/test/built-ins/encodeURI/S15.1.3.3_A5.1.js index 1cf1e2f068..5dad9e2d76 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A5.1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A5.1.js @@ -19,7 +19,7 @@ var result = true; for (var p in encodeURI){ if (p === "length") { result = false; - } + } } if (result !== true) { diff --git a/test/built-ins/encodeURI/S15.1.3.3_A5.5.js b/test/built-ins/encodeURI/S15.1.3.3_A5.5.js index 182a5bbe89..6a99e83374 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A5.5.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A5.5.js @@ -19,7 +19,7 @@ var result = true; for (var p in this){ if (p === "encodeURI") { result = false; - } + } } if (result !== true) { diff --git a/test/built-ins/encodeURI/S15.1.3.3_A6_T1.js b/test/built-ins/encodeURI/S15.1.3.3_A6_T1.js index c9c4877d92..955a4038bd 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A6_T1.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A6_T1.js @@ -19,7 +19,7 @@ if (encodeURI(object) !== "%5Bobject%20Object%5D") { var object = {valueOf: function() {return ""}, toString: function() {return "^"}}; if (encodeURI(object) !== "%5E") { $ERROR('#2: var object = {valueOf: function() {return ""}, toString: function() {return "^"}}; encodeURI(object) === "%5E". Actual: ' + (encodeURI(object))); -} +} //CHECK#3 var object = {valueOf: function() {return "^"}, toString: function() {return {}}}; @@ -59,11 +59,11 @@ try { var object = {valueOf: function() {return "^"}, toString: function() {throw "error"}}; encodeURI(object); $ERROR('#7.1: var object = {valueOf: function() {return "^"}, toString: function() {throw "error"}}; encodeURI(object) throw "error". Actual: ' + (encodeURI(object))); -} +} catch (e) { if (e !== "error") { $ERROR('#7.2: var object = {valueOf: function() {return "^"}, toString: function() {throw "error"}}; encodeURI(object) throw "error". Actual: ' + (e)); - } + } } //CHECK#8 @@ -71,9 +71,9 @@ try { var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURI(object); $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURI(object) throw TypeError. Actual: ' + (encodeURI(object))); -} +} catch (e) { if ((e instanceof TypeError) !== true) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURI(object) throw TypeError. Actual: ' + (e)); - } + } }