blob: 34177ab8f7978bfe77d3fd5aa1cc4f8778b94fdd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function testMethodInitSafety() {
function f() { return 'fail'; }
function g() { return 'ok'; }
var s;
var arr = [f, f, f, f, g];
//assertEq(arr.length > 9, true);
for (var i = 0; i < arr.length; i++) {
var x = {m: arr[i]};
s = x.m();
}
return s;
}
assertEq(testMethodInitSafety(), "ok");
|