]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/assignment-in-function-call-bracket-node.js
1 function shouldBe(actual
, expected
) {
2 if (actual
!== expected
)
3 throw new Error('bad value: ' + actual
);
6 // Simple assignment (not FunctionCallBracketNode).
13 return object
[object
= null];
16 shouldBe(function (value
) {
20 return object
[object
= value
];
23 shouldBe(function () {
28 return object
['null'];
31 shouldBe(function (value
) {
35 return object
['null'];
38 shouldBe(function () {
47 return object
[fill()];
50 shouldBe(function (value
) {
55 return object
= value
;
58 return object
[fill()];
61 // FunctionCallBracketNode.
63 shouldBe(function () {
70 return object
[object
= null]();
73 shouldBe(function (value
) {
75 object
.null = function () {
79 return object
[object
= value
]();
82 shouldBe(function () {
89 return object
['null']();
92 shouldBe(function (value
) {
94 object
.null = function () {
98 return object
['null']();
101 shouldBe(function () {
109 return object
= null;
112 return object
[fill()]();
115 shouldBe(function (value
) {
117 object
.null = function () {
122 return object
= value
;
125 return object
[fill()]();