Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / jit-test / tests / closures / t026.js
1 actual = '';
2 expected = '101,nocrash,';
3
4 function looper(f) {
5   for (var i = 0; i < 10; ++i) {
6     for (var j = 0; j < 10; ++j) {
7       f();
8     }
9   }
10 }
11
12 function tester() {
13   var x = 1;
14   looper(function() { ++x; });
15   return x;
16 }
17
18 appendToActual(tester());
19 appendToActual("nocrash");
20
21
22 assertEq(actual, expected)