Correct test assertion (Fixes issue#61)

Changed Number.isNaN_Boolean.js, String.prototype.endsWith_Fail.js and String.prototype.endsWith_Fail_2.js to test for the correct result. Also removed implicit coercion in a couple of other test files.
This commit is contained in:
André Bargull 2014-08-04 19:10:41 +02:00
parent 64756c252e
commit 28649e8772
12 changed files with 12 additions and 12 deletions

View File

@ -13,6 +13,6 @@ includes: [runTestCase.js]
---*/
function testcase() {
return Number.isNaN(true);
return Number.isNaN(true) === false;
}
runTestCase(testcase);

View File

@ -13,6 +13,6 @@ includes: [runTestCase.js]
---*/
function testcase() {
return Number.isNaN(NaN);
return Number.isNaN(NaN) === true;
}
runTestCase(testcase);

View File

@ -15,6 +15,6 @@ includes: [runTestCase.js]
---*/
function testcase() {
return !Number.isNaN(new Object());
return Number.isNaN(new Object()) === false;
}
runTestCase(testcase);

View File

@ -13,6 +13,6 @@ includes: [runTestCase.js]
---*/
function testcase() {
return !Number.isNaN('string');
return Number.isNaN('string') === false;
}
runTestCase(testcase);

View File

@ -15,7 +15,7 @@ includes: [runTestCase.js]
---*/
function testcase() {
if('word'.contains('w', 0)) {
if('word'.contains('w', 0) === true) {
return true;
}
}

View File

@ -15,7 +15,7 @@ includes: [runTestCase.js]
---*/
function testcase() {
if('word'.contains('w')) {
if('word'.contains('w') === true) {
return true;
}
}

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/
function testcase() {
if('word'.endsWith('r')) {
if('word'.endsWith('r') === false) {
return true;
}
}

View File

@ -15,7 +15,7 @@ includes: [runTestCase.js]
---*/
function testcase() {
if('word'.endsWith('d',3)) {
if('word'.endsWith('d', 3) === false) {
return true;
}
}

View File

@ -15,7 +15,7 @@ includes: [runTestCase.js]
---*/
function testcase() {
if('word'.endsWith('d')) {
if('word'.endsWith('d') === true) {
return true;
}
}

View File

@ -15,7 +15,7 @@ includes: [runTestCase.js]
---*/
function testcase() {
if('word'.endsWith('d', 4)) {
if('word'.endsWith('d', 4) === true) {
return true;
}
}

View File

@ -15,7 +15,7 @@ includes: [runTestCase.js]
---*/
function testcase() {
if('word'.endsWith('d', 25)) {
if('word'.endsWith('d', 25) === true) {
return true;
}
}

View File

@ -15,7 +15,7 @@ includes: [runTestCase.js]
---*/
function testcase() {
if('word'.endsWith('r',3)) {
if('word'.endsWith('r', 3) === true) {
return true;
}
}