diff options
Diffstat (limited to 'test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js')
-rw-r--r-- | test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js index 68ba3657c..aba55fc82 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-2.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.15-5-2 description: Array.prototype.lastIndexOf when fromIndex is floating point number -includes: [runTestCase.js] ---*/ -function testcase() { var a = new Array(1,2,1); - if (a.lastIndexOf(2,1.49) === 1 && // 1.49 resolves to 1 - a.lastIndexOf(2,0.51) === -1 && // 0.51 resolves to 0 - a.lastIndexOf(1,0.51) === 0){ // 0.51 resolves to 0 - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.lastIndexOf(2,1.49), 1, '1.49 resolves to 1'); +assert.sameValue(a.lastIndexOf(2,0.51), -1, '0.51 resolves to 0'); +assert.sameValue(a.lastIndexOf(1,0.51), 0, '0.51 resolves to 0'); |