js/src/jit-test/tests/for-of/array-iterator-empty.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 // Array.keys() and .entries() on an empty array produce empty iterators
     3 var arr = [];
     4 var ki = arr.keys(), ei = arr.entries();
     5 var p = Object.getPrototypeOf(ki);
     6 assertEq(Object.getPrototypeOf(ei), p);
     8 for (let k of ki)
     9   throw "FAIL";
    10 for (let [k, v] of ei)
    11   throw "FAIL";

mercurial