// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // using System; public struct ValX1 { public T t; public ValX1(T t) { this.t = t; } } public class RefX1 { public T t; public RefX1(T t) { this.t = t; } } public class Gen { public T Fld1; public Gen(T fld1) { Fld1 = fld1; } } public class Test { public static int counter = 0; public static bool result = true; public static void Eval(bool exp) { counter++; if (!exp) { result = exp; Console.WriteLine("Test Failed at location: " + counter); } } public static int Main() { int size = 10; int i, j, k, l, m; double sum = 0; Gen[][][][][] GenDoubleArray = new Gen[size][][][][]; for (i = 0; i < size; i++) { GenDoubleArray[i] = new Gen[i][][][]; for (j = 0; j < i; j++) { GenDoubleArray[i][j] = new Gen[j][][]; for (k = 0; k < j; k++) { GenDoubleArray[i][j][k] = new Gen[k][]; for (l = 0; l < k; l++) { GenDoubleArray[i][j][k][l] = new Gen[l]; for (m = 0; m < l; m++) { GenDoubleArray[i][j][k][l][m] = new Gen(i * j * k * l * m); } } } } } for (i = 0; i < size; i++) { for (j = 0; j < i; j++) { for (k = 0; k < j; k++) { for (l = 0; l < k; l++) { for (m = 0; m < l; m++) { sum += GenDoubleArray[i][j][k][l][m].Fld1; } } } } } Eval(sum == 269325); sum = 0; if (result) { Console.WriteLine("Test Passed"); return 100; } else { Console.WriteLine("Test Failed"); return 1; } } }