diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2018-02-15 17:40:02 -0500 |
---|---|---|
committer | Leo Balter <leonardo.balter@gmail.com> | 2018-02-15 17:40:02 -0500 |
commit | afa24856b4b9bc00315b3e47745187d33c471406 (patch) | |
tree | 67cd06d1c673f9eecaa54abb6ee6a4248c40256c /test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js | |
parent | 0bf08dff3d83f97143580c50072bd413c46ef23c (diff) | |
download | qtdeclarative-testsuites-afa24856b4b9bc00315b3e47745187d33c471406.tar.gz |
built-ins/Array/*: make all indentation consistent (depth & character) (#1415)
Diffstat (limited to 'test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js')
-rw-r--r-- | test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js index bfac0f468..5b80ddcde 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js @@ -9,21 +9,21 @@ description: > and not prior to starting the loop ---*/ - var kIndex = []; +var kIndex = []; - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - return true; - } - kIndex[idx] = 1; - return false; - } else { - return true; - } - } +//By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(val, idx, obj) { + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + return true; + } + kIndex[idx] = 1; + return false; + } else { + return true; + } +} assert.sameValue([11, 12, 13, 14].some(callbackfn, undefined), false, '[11, 12, 13, 14].some(callbackfn, undefined)'); |