summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Comprehensions/toSource.js
blob: 5ce1db172738f3c2688ff1e68116bc9e9381c0e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

assertEq(  function () { g = (for (d of [0]) d); g.next(); }.toSource(),
         '(function () { g = (for (d of [0]) d); g.next(); })');
         

assertEq(  function () { return [for (d of [0]) d]; }.toSource(),
         '(function () { return [for (d of [0]) d]; })');

if (typeof reportCompare === "function")
  reportCompare(true, true);