Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / regress / script-tests / int-or-other-neg-then-get-by-val.js
blobc606d3e8435edd43490394271369b78e33c9206e
1 var p = {f:true};
3 function foo(b, d) {
4 var c;
5 if (p.f)
6 c = b;
7 return d[-c];
10 var result = 0;
11 var array = [42, 43, 44, 45];
12 for (var i = 0; i < 500000; ++i)
13 result += foo(-((i % 3) + 1), array);
15 if (result != 21999999)
16 throw "Bad result: " + result;