michael@0: actual = ''; michael@0: expected = 'g 0 0,g 1 2,g 2 4,g 3 6,g 4 8,'; michael@0: michael@0: function g(x, y) { michael@0: appendToActual('g ' + x + ' ' + y); michael@0: //appendToActual('g ' + x + ' ' + y); michael@0: //appendToActual('g ' + y); michael@0: } michael@0: michael@0: function f() { michael@0: g.apply(this, arguments); michael@0: } michael@0: michael@0: for (var i = 0; i < 5; ++i) { michael@0: f(i, i*2); michael@0: } michael@0: michael@0: michael@0: assertEq(actual, expected)