blob: b7b636e5d83e22510bc2c53bf2f5492f3e8216d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
var log;
function b(x) { log += 'b'; return 'B'; }
function g() {
log = '';
var a = {toString: function () { log += 'a'; return 'A'; }};
assertEq("[" + a + b() + "]", "[AB]");
assertEq(log, "ab");
}
for (var i = 0; i < 1000; ++i)
g();
|