5 public Foo (T t
) { this.t = t; }
8 /*This is a WB-stress based test */
10 public class Driver
<T
> {
11 public static void Fill (int cycles
, Func
<int, T
> mk_entry
) {
12 const int array_len
= 9975;
13 Foo
<T
>[] root
= new Foo
<T
> [array_len
];
14 for (int i
= 0; i
< cycles
; ++i
) {
15 for (int j
= 0; j
< array_len
; ++j
)
16 root
[j
] = new Foo
<T
> (mk_entry (j
));
19 for (int i
= 0; i
< array_len
; ++i
)
20 if (root
[i
].Equals (mk_entry (i
)))
21 throw new Exception ("Invalid value at position " + i
);
30 for (int i
= 0; i
< loops
; ++i
) {
31 Driver
<object>.Fill (cycles
, (k
) => k
);