summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/js/script-tests/inc-bracket-assign-subscript.js
blob: 53a5228b3d60ba92a7ddf4d176ce8ba9765a5f6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
description(
'Test for regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=95913">'
);

function testPreIncBracketAccessWithAssignSubscript()
{
    var x = { property: -1 };
    var y = { property: true };
    ++x[x = y, "property"];
    return x.property;
}

function testPostIncBracketAccessWithAssignSubscript()
{
    var x = { property: -1 };
    var y = { property: true };
    x[x = y, "property"]++;
    return x.property;
}

shouldBeTrue('testPreIncBracketAccessWithAssignSubscript()');
shouldBeTrue('testPostIncBracketAccessWithAssignSubscript()');

successfullyParsed = true;