js/src/jit-test/tests/basic/testGroupAssignment.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 assertEq(
michael@0 2 (function () {
michael@0 3 var arr = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
michael@0 4 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 ];
michael@0 5
michael@0 6 for (var i = 0; i < 4; ++i) {
michael@0 7 var src = i * 8;
michael@0 8 var dst = i * 8 + 7;
michael@0 9 for (var j = 0; j < 4; ++j) {
michael@0 10 [arr[dst--], arr[src++]] = [arr[src], arr[dst]];
michael@0 11 }
michael@0 12 }
michael@0 13 return arr;
michael@0 14 })().toSource(),
michael@0 15 "[7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 23, 22, 21, 20, 19, 18, 17, 16, 31, 30, 29, 28, 27, 26, 25, 24, 32]");

mercurial