js/src/jit-test/tests/basic/bug943126.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 // Test fast-path for String.split("").
     3 load(libdir + 'eqArrayHelper.js');
     5 assertEqArray("".split(""), []);
     6 assertEqArray("a".split(""), ["a"]);
     7 assertEqArray("abc".split(""), ["a", "b", "c"]);
     9 assertEqArray("abcd".split("", 2), ["a", "b"]);
    10 assertEqArray("abcd".split("", 0), []);
    11 assertEqArray("abcd".split("", -1), ["a", "b", "c", "d"]);
    13 // Note: V8 disagrees about this one, but we are correct by ecma-262 15.5.4.14 part 9.
    14 assertEqArray("abcd".split(undefined, 0), []);
    16 assertEqArray("abcd".split(undefined, 1), ["abcd"]);

mercurial