diff options
author | André Bargull <andre.bargull@gmail.com> | 2015-08-13 17:42:21 +0200 |
---|---|---|
committer | André Bargull <andre.bargull@gmail.com> | 2015-08-13 17:42:40 +0200 |
commit | 52a706c0223d446394256a748b384f70cc72afc0 (patch) | |
tree | c84bf3162aee14a0e5b2e6726b96983ed730a349 /test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js | |
parent | 6b48d9f1b29452db77403410d6d15c0de4a8ea21 (diff) | |
download | qtdeclarative-testsuites-52a706c0223d446394256a748b384f70cc72afc0.tar.gz |
Replace runTestCase with assert, try-finally, [test/built-ins/Array]
Diffstat (limited to 'test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js')
-rw-r--r-- | test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js index 2248f3079..853dc236c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-13.js @@ -4,19 +4,11 @@ /*--- es5id: 15.4.4.15-1-13 description: Array.prototype.lastIndexOf applied to the JSON object -includes: [runTestCase.js] ---*/ -function testcase() { - var targetObj = {}; - try { + JSON[3] = targetObj; JSON.length = 5; - return 3 === Array.prototype.lastIndexOf.call(JSON, targetObj); - } finally { - delete JSON[3]; - delete JSON.length; - } - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.lastIndexOf.call(JSON, targetObj), 3, 'Array.prototype.lastIndexOf.call(JSON, targetObj)'); |