js/src/tests/ecma_5/strict/15.4.4.6.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 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     3 /*
     4  * Any copyright is dedicated to the Public Domain.
     5  * http://creativecommons.org/licenses/publicdomain/
     6  */
     8 function arr() {
     9   return Object.defineProperty([1, 2, 3], 2, {configurable: false});
    10 }
    12 function obj() {
    13   var o = {0: 1, 1: 2, 2: 3, length: 3};
    14   Object.defineProperty(o, 2, {configurable: false});
    15   return o;
    16 }
    18 assertEq(testLenientAndStrict('var a = arr(); [a.pop(), a]',
    19                               raisesException(TypeError),
    20                               raisesException(TypeError)),
    21          true);
    23 assertEq(testLenientAndStrict('var o = obj(); [Array.prototype.pop.call(o), o]',
    24                               raisesException(TypeError),
    25                               raisesException(TypeError)),
    26          true);
    28 reportCompare(true, true);

mercurial