js/src/tests/js1_8_5/regress/regress-810525.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 /*
     2  * Any copyright is dedicated to the Public Domain.
     3  * http://creativecommons.org/licenses/publicdomain/
     4  */
     5 var expect = '';
     6 var actual = '';
     8 function test(s) {
     9     var threw = false;
    10     try {
    11         eval(s);
    12     } catch (e) {
    13         assertEq(e.message.indexOf('(intermediate value)'), -1);
    14         threw = true;
    15     } finally {
    16         assertEq(threw, true);
    17     }
    18 }
    20 test("({p:1, q:2}).m()");
    21 test("[].m()");
    22 test("[1,2,3].m()");
    23 test("/hi/.m()");
    25 reportCompare(0, 0, "ok");

mercurial