Merge pull request #76 from anba/issue-61/wrong-test-assertions

Correct test assertion (Fixes issue#61)
This commit is contained in:
Brian Terlson 2014-08-05 23:52:06 -07:00
commit a794e0eb54
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;
}
}