Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / regress / script-tests / array-with-double-increment.js
blobbec0dce592b90727978066fb982cc33b8fd700c5
1 function foo() {
2 var array = [];
4 for (var i = 0; i < 1000; ++i)
5 array.push(i + 0.5);
7 for (var i = 0; i < 1000; ++i) {
8 for (var j = 0; j < array.length; ++j)
9 array[j]++;
12 var result = 0;
13 for (var i = 0; i < array.length; ++i)
14 result += array[i];
16 return result;
19 var result = foo();
20 if (result != 1500000)
21 throw "Bad result: " + result;