js/src/jit-test/tests/collections/Set-constructor-generator-2.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     1 // The argument to Set can be a generator-expression.
     3 var s = Set(k * k for (k of [1, 2, 3, 4]));
     4 assertEq(s.size, 4);
     5 assertEq(s.has(1), true);
     6 assertEq(s.has(4), true);
     7 assertEq(s.has(9), true);
     8 assertEq(s.has(16), true);

mercurial