[interp] Remove unreachable code (#12411)
[mono-project.git] / mono / tests / sgen-gshared-vtype.cs
blob37e5c620363cecb327dfb0da003d1a8679ba4ca0
1 using System;
3 struct Foo<T> {
4 public T t;
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);
25 class Driver {
27 static void Main () {
28 int loops = 40;
29 int cycles = 40;
30 for (int i = 0; i < loops; ++i) {
31 Driver<object>.Fill (cycles, (k) => k);