summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2015-08-07 18:40:21 +0200
committerAndré Bargull <andre.bargull@gmail.com>2015-08-13 17:50:58 +0200
commit1b14708467b4cab8055effad884071123637e475 (patch)
treeabf158b9b4b7f97ffd98a4c419c0f00b7d7d5f62 /test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js
parent39b5b7272c0cedb9d55c243dd75e98c263056451 (diff)
downloadqtdeclarative-testsuites-1b14708467b4cab8055effad884071123637e475.tar.gz
Replace runTestCase with assert helpers [test/built-ins]
Diffstat (limited to 'test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js')
-rw-r--r--test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js
index 32b9e429c..7e08f9923 100644
--- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js
+++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js
@@ -6,14 +6,10 @@ es5id: 15.4.4.15-5-14
description: >
Array.prototype.lastIndexOf - value of 'fromIndex' is a number
(value is NaN)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
- return [0, true].lastIndexOf(true, NaN) === -1 && // from Index will be convert to +0
- [true, 0].lastIndexOf(true, NaN) === 0 &&
- [0, true].lastIndexOf(true, -NaN) === -1 &&
- [true, 0].lastIndexOf(true, -NaN) === 0;
- }
-runTestCase(testcase);
+// from Index will be convert to +0
+assert.sameValue([0, true].lastIndexOf(true, NaN), -1, '[0, true].lastIndexOf(true, NaN)');
+assert.sameValue([true, 0].lastIndexOf(true, NaN), 0, '[true, 0].lastIndexOf(true, NaN)');
+assert.sameValue([0, true].lastIndexOf(true, -NaN), -1, '[0, true].lastIndexOf(true, -NaN)');
+assert.sameValue([true, 0].lastIndexOf(true, -NaN), 0, '[true, 0].lastIndexOf(true, -NaN)');