summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Generics
diff options
context:
space:
mode:
authorBengu Li <beli@microsoft.com>2015-04-21 16:10:40 -0700
committerBengu Li <beli@microsoft.com>2015-04-21 16:10:40 -0700
commit5233f49389d74e3d8e7d7c2b27b373e44be9ae32 (patch)
treece1f86ad8a59517c9fc47e36f696e0625d1701ad /tests/src/JIT/Generics
parent640d40ab36d025fe5caf82830ad8128c9aa974ea (diff)
downloadcoreclr-5233f49389d74e3d8e7d7c2b27b373e44be9ae32.tar.gz
coreclr-5233f49389d74e3d8e7d7c2b27b373e44be9ae32.tar.bz2
coreclr-5233f49389d74e3d8e7d7c2b27b373e44be9ae32.zip
Add Generics/Arrays test cases for JIT
Add test cases in directory JIT/Generics/Arrays. Related proj, config, and sln files added and updated. Passed build, buildtest, runtest.
Diffstat (limited to 'tests/src/JIT/Generics')
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Jagged.csproj19
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01_instance.cs123
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/app.config27
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_instance.cs123
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_static.cs121
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class02.cs116
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class03.cs115
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class04.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class05.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class06.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class07.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/cs_template.proj42
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/packages.config6
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struc01.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct01_static.cs121
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct02.cs116
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct03.cs115
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct04.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct05.cs116
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct06.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct07.cs118
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/MultiDim.csproj19
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/app.config27
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01.cs105
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_Instance.cs111
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_static.cs110
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/cs_template.proj42
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/packages.config6
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01.cs105
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_Instance.cs111
-rw-r--r--tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_static.cs110
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/Jagged.csproj19
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/app.config27
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/class01.cs152
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/cs_template.proj42
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/packages.config6
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/struct01.cs152
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/MultiDim.csproj19
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/app.config27
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/class01.cs151
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/cs_template.proj42
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/packages.config6
-rw-r--r--tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/struct01.cs151
45 files changed, 3880 insertions, 0 deletions
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Jagged.csproj b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Jagged.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Jagged.csproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01.cs
new file mode 100644
index 0000000000..7232615954
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ 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<int>[][][][][] GenArray = new Gen<int>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<int>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<int>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<int>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<int>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<int>(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 += GenArray[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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01_instance.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01_instance.cs
new file mode 100644
index 0000000000..28d5f08863
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/Struct01_instance.cs
@@ -0,0 +1,123 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ public T Fld1;
+
+ public Gen(T fld1)
+ {
+ Fld1 = fld1;
+ }
+
+
+}
+
+
+public class ArrayHolder
+{
+ public Gen<int>[][][][][] GenArray = new Gen<int>[10][][][][];
+}
+
+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;
+
+ ArrayHolder ArrayHolderInst = new ArrayHolder();
+
+ for (i = 0; i < size; i++)
+ {
+ ArrayHolderInst.GenArray[i] = new Gen<int>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ ArrayHolderInst.GenArray[i][j] = new Gen<int>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ ArrayHolderInst.GenArray[i][j][k] = new Gen<int>[k][];
+ for (l = 0; l < k; l++)
+ {
+ ArrayHolderInst.GenArray[i][j][k][l] = new Gen<int>[l];
+ for (m = 0; m < l; m++)
+ {
+ ArrayHolderInst.GenArray[i][j][k][l][m] = new Gen<int>(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 += ArrayHolderInst.GenArray[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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/app.config b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/app.config
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01.cs
new file mode 100644
index 0000000000..37bdce557f
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ 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<int>[][][][][] GenArray = new Gen<int>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<int>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<int>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<int>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<int>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<int>(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 += GenArray[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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_instance.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_instance.cs
new file mode 100644
index 0000000000..89676a5b53
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_instance.cs
@@ -0,0 +1,123 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ public T Fld1;
+
+ public Gen(T fld1)
+ {
+ Fld1 = fld1;
+ }
+
+
+}
+
+
+public class ArrayHolder
+{
+ public Gen<int>[][][][][] GenArray = new Gen<int>[10][][][][];
+}
+
+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;
+
+ ArrayHolder ArrayHolderInst = new ArrayHolder();
+
+ for (i = 0; i < size; i++)
+ {
+ ArrayHolderInst.GenArray[i] = new Gen<int>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ ArrayHolderInst.GenArray[i][j] = new Gen<int>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ ArrayHolderInst.GenArray[i][j][k] = new Gen<int>[k][];
+ for (l = 0; l < k; l++)
+ {
+ ArrayHolderInst.GenArray[i][j][k][l] = new Gen<int>[l];
+ for (m = 0; m < l; m++)
+ {
+ ArrayHolderInst.GenArray[i][j][k][l][m] = new Gen<int>(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 += ArrayHolderInst.GenArray[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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_static.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_static.cs
new file mode 100644
index 0000000000..576bf638c5
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class01_static.cs
@@ -0,0 +1,121 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ public T Fld1;
+
+ public Gen(T fld1)
+ {
+ Fld1 = fld1;
+ }
+
+
+}
+
+
+public class ArrayHolder
+{
+ public static Gen<int>[][][][][] GenArray = new Gen<int>[10][][][][];
+}
+
+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;
+
+ for (i = 0; i < size; i++)
+ {
+ ArrayHolder.GenArray[i] = new Gen<int>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ ArrayHolder.GenArray[i][j] = new Gen<int>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ ArrayHolder.GenArray[i][j][k] = new Gen<int>[k][];
+ for (l = 0; l < k; l++)
+ {
+ ArrayHolder.GenArray[i][j][k][l] = new Gen<int>[l];
+ for (m = 0; m < l; m++)
+ {
+ ArrayHolder.GenArray[i][j][k][l][m] = new Gen<int>(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 += ArrayHolder.GenArray[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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class02.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class02.cs
new file mode 100644
index 0000000000..441e392339
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class02.cs
@@ -0,0 +1,116 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ 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<double>[][][][][] GenDoubleArray = new Gen<double>[size][][][][];
+
+ for (i = 0; i < size; i++)
+ {
+ GenDoubleArray[i] = new Gen<double>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenDoubleArray[i][j] = new Gen<double>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenDoubleArray[i][j][k] = new Gen<double>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenDoubleArray[i][j][k][l] = new Gen<double>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenDoubleArray[i][j][k][l][m] = new Gen<double>(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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class03.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class03.cs
new file mode 100644
index 0000000000..9ef2d96c8c
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class03.cs
@@ -0,0 +1,115 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ 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<string>[][][][][] GenStringArray = new Gen<string>[size][][][][];
+ for (i = 0; i < size; i++)
+ {
+ GenStringArray[i] = new Gen<string>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenStringArray[i][j] = new Gen<string>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenStringArray[i][j][k] = new Gen<string>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenStringArray[i][j][k][l] = new Gen<string>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenStringArray[i][j][k][l][m] = new Gen<string>((i * j * k * l * m).ToString());
+ }
+ }
+ }
+ }
+ }
+
+ 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 += System.Int32.Parse(GenStringArray[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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class04.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class04.cs
new file mode 100644
index 0000000000..7de59f08e6
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class04.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ 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<RefX1<int>>[][][][][] GenArray = new Gen<RefX1<int>>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<RefX1<int>>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<RefX1<int>>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<RefX1<int>>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<RefX1<int>>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<RefX1<int>>(new RefX1<int>(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 += GenArray[i][j][k][l][m].Fld1.t;
+ }
+ }
+ }
+ }
+ }
+
+ Eval(sum == 269325);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class05.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class05.cs
new file mode 100644
index 0000000000..1d78bdfd59
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class05.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ 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<RefX1<string>>[][][][][] GenArray = new Gen<RefX1<string>>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<RefX1<string>>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<RefX1<string>>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<RefX1<string>>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<RefX1<string>>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<RefX1<string>>(new RefX1<string>((i * j * k * l * m).ToString()));
+ }
+ }
+ }
+ }
+ }
+
+ 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 += System.Int32.Parse(GenArray[i][j][k][l][m].Fld1.t);
+ }
+ }
+ }
+ }
+ }
+
+ Eval(sum == 269325);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class06.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class06.cs
new file mode 100644
index 0000000000..6c05584268
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class06.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ 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<ValX1<int>>[][][][][] GenArray = new Gen<ValX1<int>>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<ValX1<int>>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<ValX1<int>>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<ValX1<int>>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<ValX1<int>>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<ValX1<int>>(new ValX1<int>(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 += GenArray[i][j][k][l][m].Fld1.t;
+ }
+ }
+ }
+ }
+ }
+
+ Eval(sum == 269325);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class07.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class07.cs
new file mode 100644
index 0000000000..b8bac32c66
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/class07.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ 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<ValX1<string>>[][][][][] GenArray = new Gen<ValX1<string>>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<ValX1<string>>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<ValX1<string>>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<ValX1<string>>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<ValX1<string>>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<ValX1<string>>(new ValX1<string>((i * j * k * l * m).ToString()));
+ }
+ }
+ }
+ }
+ }
+
+ 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 += System.Int32.Parse(GenArray[i][j][k][l][m].Fld1.t);
+ }
+ }
+ }
+ }
+ }
+
+ Eval(sum == 269325);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/cs_template.proj b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/cs_template.proj
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(AssemblyName1)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/packages.config b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/packages.config
new file mode 100644
index 0000000000..06d3d11ead
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/packages.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+</packages>
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struc01.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struc01.cs
new file mode 100644
index 0000000000..7232615954
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struc01.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ 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<int>[][][][][] GenArray = new Gen<int>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<int>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<int>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<int>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<int>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<int>(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 += GenArray[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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct01_static.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct01_static.cs
new file mode 100644
index 0000000000..6596555335
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct01_static.cs
@@ -0,0 +1,121 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ public T Fld1;
+
+ public Gen(T fld1)
+ {
+ Fld1 = fld1;
+ }
+
+
+}
+
+
+public class ArrayHolder
+{
+ public static Gen<int>[][][][][] GenArray = new Gen<int>[10][][][][];
+}
+
+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;
+
+ for (i = 0; i < size; i++)
+ {
+ ArrayHolder.GenArray[i] = new Gen<int>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ ArrayHolder.GenArray[i][j] = new Gen<int>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ ArrayHolder.GenArray[i][j][k] = new Gen<int>[k][];
+ for (l = 0; l < k; l++)
+ {
+ ArrayHolder.GenArray[i][j][k][l] = new Gen<int>[l];
+ for (m = 0; m < l; m++)
+ {
+ ArrayHolder.GenArray[i][j][k][l][m] = new Gen<int>(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 += ArrayHolder.GenArray[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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct02.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct02.cs
new file mode 100644
index 0000000000..7178a91701
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct02.cs
@@ -0,0 +1,116 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ 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<double>[][][][][] GenDoubleArray = new Gen<double>[size][][][][];
+
+ for (i = 0; i < size; i++)
+ {
+ GenDoubleArray[i] = new Gen<double>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenDoubleArray[i][j] = new Gen<double>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenDoubleArray[i][j][k] = new Gen<double>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenDoubleArray[i][j][k][l] = new Gen<double>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenDoubleArray[i][j][k][l][m] = new Gen<double>(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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct03.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct03.cs
new file mode 100644
index 0000000000..8b06023d84
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct03.cs
@@ -0,0 +1,115 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ 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<string>[][][][][] GenStringArray = new Gen<string>[size][][][][];
+ for (i = 0; i < size; i++)
+ {
+ GenStringArray[i] = new Gen<string>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenStringArray[i][j] = new Gen<string>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenStringArray[i][j][k] = new Gen<string>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenStringArray[i][j][k][l] = new Gen<string>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenStringArray[i][j][k][l][m] = new Gen<string>((i * j * k * l * m).ToString());
+ }
+ }
+ }
+ }
+ }
+
+ 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 += System.Int32.Parse(GenStringArray[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;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct04.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct04.cs
new file mode 100644
index 0000000000..181dcedab5
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct04.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ 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<RefX1<int>>[][][][][] GenArray = new Gen<RefX1<int>>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<RefX1<int>>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<RefX1<int>>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<RefX1<int>>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<RefX1<int>>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<RefX1<int>>(new RefX1<int>(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 += GenArray[i][j][k][l][m].Fld1.t;
+ }
+ }
+ }
+ }
+ }
+
+ Eval(sum == 269325);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct05.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct05.cs
new file mode 100644
index 0000000000..c6261e4160
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct05.cs
@@ -0,0 +1,116 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ 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<RefX1<string>>[][][][][] GenArray = new Gen<RefX1<string>>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<RefX1<string>>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<RefX1<string>>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<RefX1<string>>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<RefX1<string>>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<RefX1<string>>(new RefX1<string>((i * j * k * l * m).ToString()));
+ }
+ }
+ }
+ }
+ }
+
+ 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 += System.Int32.Parse(GenArray[i][j][k][l][m].Fld1.t);
+ }
+ }
+ }
+ }
+ }
+
+ Eval(sum == 269325);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct06.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct06.cs
new file mode 100644
index 0000000000..388fa939d3
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct06.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ 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<ValX1<int>>[][][][][] GenArray = new Gen<ValX1<int>>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<ValX1<int>>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<ValX1<int>>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<ValX1<int>>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<ValX1<int>>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<ValX1<int>>(new ValX1<int>(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 += GenArray[i][j][k][l][m].Fld1.t;
+ }
+ }
+ }
+ }
+ }
+
+ Eval(sum == 269325);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct07.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct07.cs
new file mode 100644
index 0000000000..ebb3789ece
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/Jagged/struct07.cs
@@ -0,0 +1,118 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ 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<ValX1<string>>[][][][][] GenArray = new Gen<ValX1<string>>[size][][][][];
+
+
+
+ for (i = 0; i < size; i++)
+ {
+ GenArray[i] = new Gen<ValX1<string>>[i][][][];
+ for (j = 0; j < i; j++)
+ {
+ GenArray[i][j] = new Gen<ValX1<string>>[j][][];
+ for (k = 0; k < j; k++)
+ {
+ GenArray[i][j][k] = new Gen<ValX1<string>>[k][];
+ for (l = 0; l < k; l++)
+ {
+ GenArray[i][j][k][l] = new Gen<ValX1<string>>[l];
+ for (m = 0; m < l; m++)
+ {
+ GenArray[i][j][k][l][m] = new Gen<ValX1<string>>(new ValX1<string>((i * j * k * l * m).ToString()));
+ }
+ }
+ }
+ }
+ }
+
+ 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 += System.Int32.Parse(GenArray[i][j][k][l][m].Fld1.t);
+ }
+ }
+ }
+ }
+ }
+
+ Eval(sum == 269325);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/MultiDim.csproj b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/MultiDim.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/MultiDim.csproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/app.config b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/app.config
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01.cs
new file mode 100644
index 0000000000..03a78965a9
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01.cs
@@ -0,0 +1,105 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ 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;
+ double sum = 0;
+ int cLoc = 0;
+
+ Gen<int>[, ,] GenArray = new Gen<int>[size, size, size];
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ GenArray[i, j, k] = new Gen<int>(cLoc);
+ cLoc++;
+ }
+ }
+ }
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ sum += GenArray[i, j, k].Fld1;
+ cLoc++;
+ }
+ }
+ }
+
+
+
+
+ Eval(sum == 499500);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_Instance.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_Instance.cs
new file mode 100644
index 0000000000..c981ffdf28
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_Instance.cs
@@ -0,0 +1,111 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ public T Fld1;
+
+ public Gen(T fld1)
+ {
+ Fld1 = fld1;
+ }
+
+
+}
+
+public class ArrayHolder
+{
+ public Gen<int>[, ,] GenArray = new Gen<int>[10, 10, 10];
+}
+
+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;
+ double sum = 0;
+ int cLoc = 0;
+
+ ArrayHolder ArrayHolderInst = new ArrayHolder();
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ ArrayHolderInst.GenArray[i, j, k] = new Gen<int>(cLoc);
+ cLoc++;
+ }
+ }
+ }
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ sum += ArrayHolderInst.GenArray[i, j, k].Fld1;
+ cLoc++;
+ }
+ }
+ }
+
+
+
+
+ Eval(sum == 499500);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_static.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_static.cs
new file mode 100644
index 0000000000..e4b8f67caa
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/class01_static.cs
@@ -0,0 +1,110 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ public T Fld1;
+
+ public Gen(T fld1)
+ {
+ Fld1 = fld1;
+ }
+
+
+}
+
+public class ArrayHolder
+{
+ public static Gen<int>[, ,] GenArray = new Gen<int>[10, 10, 10];
+}
+
+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;
+ double sum = 0;
+ int cLoc = 0;
+
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ ArrayHolder.GenArray[i, j, k] = new Gen<int>(cLoc);
+ cLoc++;
+ }
+ }
+ }
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ sum += ArrayHolder.GenArray[i, j, k].Fld1;
+ cLoc++;
+ }
+ }
+ }
+
+
+
+
+ Eval(sum == 499500);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/cs_template.proj b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/cs_template.proj
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(AssemblyName1)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/packages.config b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/packages.config
new file mode 100644
index 0000000000..06d3d11ead
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/packages.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+</packages>
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01.cs
new file mode 100644
index 0000000000..862cc568ed
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01.cs
@@ -0,0 +1,105 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ 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;
+ double sum = 0;
+ int cLoc = 0;
+
+ Gen<int>[, ,] GenArray = new Gen<int>[size, size, size];
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ GenArray[i, j, k] = new Gen<int>(cLoc);
+ cLoc++;
+ }
+ }
+ }
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ sum += GenArray[i, j, k].Fld1;
+ cLoc++;
+ }
+ }
+ }
+
+
+
+
+ Eval(sum == 499500);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_Instance.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_Instance.cs
new file mode 100644
index 0000000000..ea40ce96f2
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_Instance.cs
@@ -0,0 +1,111 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ public T Fld1;
+
+ public Gen(T fld1)
+ {
+ Fld1 = fld1;
+ }
+
+
+}
+
+public class ArrayHolder
+{
+ public Gen<int>[, ,] GenArray = new Gen<int>[10, 10, 10];
+}
+
+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;
+ double sum = 0;
+ int cLoc = 0;
+
+ ArrayHolder ArrayHolderInst = new ArrayHolder();
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ ArrayHolderInst.GenArray[i, j, k] = new Gen<int>(cLoc);
+ cLoc++;
+ }
+ }
+ }
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ sum += ArrayHolderInst.GenArray[i, j, k].Fld1;
+ cLoc++;
+ }
+ }
+ }
+
+
+
+
+ Eval(sum == 499500);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_static.cs b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_static.cs
new file mode 100644
index 0000000000..0b505f7e7e
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/ConstructedTypes/MultiDim/struct01_static.cs
@@ -0,0 +1,110 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ public T Fld1;
+
+ public Gen(T fld1)
+ {
+ Fld1 = fld1;
+ }
+
+
+}
+
+public class ArrayHolder
+{
+ public static Gen<int>[, ,] GenArray = new Gen<int>[10, 10, 10];
+}
+
+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;
+ double sum = 0;
+ int cLoc = 0;
+
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ ArrayHolder.GenArray[i, j, k] = new Gen<int>(cLoc);
+ cLoc++;
+ }
+ }
+ }
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ for (k = 0; (k < size); k++)
+ {
+ sum += ArrayHolder.GenArray[i, j, k].Fld1;
+ cLoc++;
+ }
+ }
+ }
+
+
+
+
+ Eval(sum == 499500);
+ sum = 0;
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/Jagged.csproj b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/Jagged.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/Jagged.csproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/app.config b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/app.config
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/class01.cs b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/class01.cs
new file mode 100644
index 0000000000..793cca3ed3
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/class01.cs
@@ -0,0 +1,152 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ public static int size = 10;
+
+
+
+ public T[][] TArray;
+
+ public void StoreTArray(T[] arr)
+ {
+ TArray = new T[size][];
+ int i, j;
+
+ for (i = 0; (i < size); i++)
+ {
+ TArray[i] = new T[size];
+ for (j = 0; (j < size); j++)
+ {
+ TArray[i][j] = arr[(i * 10) + j];
+ }
+ }
+ }
+
+ public void LoadTArray(out T[] arr)
+ {
+ arr = new T[size * size];
+ int i, j;
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ arr[(i * 10) + j] = TArray[i][j];
+ }
+ }
+ }
+
+ public bool VerifyTArray(T[] arr)
+ {
+ int i, j;
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ if (!(arr[(i * 10) + j].Equals(TArray[i][j])))
+ {
+ Console.WriteLine("Failed Verification of Element TArray[{0}][{1}]", i, j);
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+}
+
+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 i = 0;
+
+ int[] IntArr_in = new int[100];
+ for (i = 0; (i < (10 * 10)); i++)
+ {
+ IntArr_in[i] = i;
+ }
+
+ int[] IntArr_out;
+ Gen<int> GenInt = new Gen<int>();
+ GenInt.StoreTArray(IntArr_in);
+ GenInt.LoadTArray(out IntArr_out);
+ Eval(GenInt.VerifyTArray(IntArr_out));
+
+ double[] DoubleArr_in = new double[100];
+ for (i = 0; (i < 10 * 10); i++)
+ {
+ DoubleArr_in[i] = i;
+ }
+
+ double[] DoubleArr_out;
+ Gen<double> GenDouble = new Gen<double>();
+ GenDouble.StoreTArray(DoubleArr_in);
+ GenDouble.LoadTArray(out DoubleArr_out);
+ Eval(GenDouble.VerifyTArray(DoubleArr_out));
+
+
+ string[] StringArr_in = new String[100];
+ for (i = 0; (i < 10 * 10); i++)
+ {
+ StringArr_in[i] = i.ToString();
+ }
+
+ String[] StringArr_out;
+ Gen<String> GenString = new Gen<String>();
+ GenString.StoreTArray(StringArr_in);
+ GenString.LoadTArray(out StringArr_out);
+ Eval(GenString.VerifyTArray(StringArr_out));
+
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/cs_template.proj b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/cs_template.proj
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(AssemblyName1)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/packages.config b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/packages.config
new file mode 100644
index 0000000000..06d3d11ead
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/packages.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+</packages>
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/struct01.cs b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/struct01.cs
new file mode 100644
index 0000000000..bbbe5ee402
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/Jagged/struct01.cs
@@ -0,0 +1,152 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ public static int size = 10;
+
+
+
+ public T[][] TArray;
+
+ public void StoreTArray(T[] arr)
+ {
+ TArray = new T[size][];
+ int i, j;
+
+ for (i = 0; (i < size); i++)
+ {
+ TArray[i] = new T[size];
+ for (j = 0; (j < size); j++)
+ {
+ TArray[i][j] = arr[(i * 10) + j];
+ }
+ }
+ }
+
+ public void LoadTArray(out T[] arr)
+ {
+ arr = new T[size * size];
+ int i, j;
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ arr[(i * 10) + j] = TArray[i][j];
+ }
+ }
+ }
+
+ public bool VerifyTArray(T[] arr)
+ {
+ int i, j;
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ if (!(arr[(i * 10) + j].Equals(TArray[i][j])))
+ {
+ Console.WriteLine("Failed Verification of Element TArray[{0}][{1}]", i, j);
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+}
+
+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 i = 0;
+
+ int[] IntArr_in = new int[100];
+ for (i = 0; (i < (10 * 10)); i++)
+ {
+ IntArr_in[i] = i;
+ }
+
+ int[] IntArr_out;
+ Gen<int> GenInt = new Gen<int>();
+ GenInt.StoreTArray(IntArr_in);
+ GenInt.LoadTArray(out IntArr_out);
+ Eval(GenInt.VerifyTArray(IntArr_out));
+
+ double[] DoubleArr_in = new double[100];
+ for (i = 0; (i < 10 * 10); i++)
+ {
+ DoubleArr_in[i] = i;
+ }
+
+ double[] DoubleArr_out;
+ Gen<double> GenDouble = new Gen<double>();
+ GenDouble.StoreTArray(DoubleArr_in);
+ GenDouble.LoadTArray(out DoubleArr_out);
+ Eval(GenDouble.VerifyTArray(DoubleArr_out));
+
+
+ string[] StringArr_in = new String[100];
+ for (i = 0; (i < 10 * 10); i++)
+ {
+ StringArr_in[i] = i.ToString();
+ }
+
+ String[] StringArr_out;
+ Gen<String> GenString = new Gen<String>();
+ GenString.StoreTArray(StringArr_in);
+ GenString.LoadTArray(out StringArr_out);
+ Eval(GenString.VerifyTArray(StringArr_out));
+
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/MultiDim.csproj b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/MultiDim.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/MultiDim.csproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/app.config b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/app.config
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/class01.cs b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/class01.cs
new file mode 100644
index 0000000000..cadca7a368
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/class01.cs
@@ -0,0 +1,151 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public class Gen<T>
+{
+ public static int size = 10;
+
+
+
+ public T[,] TArray;
+
+ public void StoreTArray(T[] arr)
+ {
+ TArray = new T[size, size];
+ int i, j;
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ TArray[i, j] = arr[(i * 10) + j];
+ }
+ }
+ }
+
+ public void LoadTArray(out T[] arr)
+ {
+ arr = new T[size * size];
+ int i, j;
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ arr[(i * 10) + j] = TArray[i, j];
+ }
+ }
+ }
+
+ public bool VerifyTArray(T[] arr)
+ {
+ int i, j;
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ if (!(arr[(i * 10) + j].Equals(TArray[i, j])))
+ {
+ Console.WriteLine("Failed Verification of Element TArray[{0}][{1}]", i, j);
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+}
+
+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 i = 0;
+
+ int[] IntArr_in = new int[100];
+ for (i = 0; (i < (10 * 10)); i++)
+ {
+ IntArr_in[i] = i;
+ }
+
+ int[] IntArr_out;
+ Gen<int> GenInt = new Gen<int>();
+ GenInt.StoreTArray(IntArr_in);
+ GenInt.LoadTArray(out IntArr_out);
+ Eval(GenInt.VerifyTArray(IntArr_out));
+
+ double[] DoubleArr_in = new double[100];
+ for (i = 0; (i < 10 * 10); i++)
+ {
+ DoubleArr_in[i] = i;
+ }
+
+ double[] DoubleArr_out;
+ Gen<double> GenDouble = new Gen<double>();
+ GenDouble.StoreTArray(DoubleArr_in);
+ GenDouble.LoadTArray(out DoubleArr_out);
+ Eval(GenDouble.VerifyTArray(DoubleArr_out));
+
+
+ string[] StringArr_in = new String[100];
+ for (i = 0; (i < 10 * 10); i++)
+ {
+ StringArr_in[i] = i.ToString();
+ }
+
+ String[] StringArr_out;
+ Gen<String> GenString = new Gen<String>();
+ GenString.StoreTArray(StringArr_in);
+ GenString.LoadTArray(out StringArr_out);
+ Eval(GenString.VerifyTArray(StringArr_out));
+
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/cs_template.proj b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/cs_template.proj
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(AssemblyName1)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/packages.config b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/packages.config
new file mode 100644
index 0000000000..06d3d11ead
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/packages.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+</packages>
diff --git a/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/struct01.cs b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/struct01.cs
new file mode 100644
index 0000000000..8cd5375852
--- /dev/null
+++ b/tests/src/JIT/Generics/Arrays/TypeParameters/MultiDim/struct01.cs
@@ -0,0 +1,151 @@
+// 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<T>
+{
+ public T t;
+ public ValX1(T t)
+ {
+ this.t = t;
+ }
+
+}
+public class RefX1<T>
+{
+ public T t;
+ public RefX1(T t)
+ {
+ this.t = t;
+ }
+}
+
+
+public struct Gen<T>
+{
+ public static int size = 10;
+
+
+
+ public T[,] TArray;
+
+ public void StoreTArray(T[] arr)
+ {
+ TArray = new T[size, size];
+ int i, j;
+
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ TArray[i, j] = arr[(i * 10) + j];
+ }
+ }
+ }
+
+ public void LoadTArray(out T[] arr)
+ {
+ arr = new T[size * size];
+ int i, j;
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ arr[(i * 10) + j] = TArray[i, j];
+ }
+ }
+ }
+
+ public bool VerifyTArray(T[] arr)
+ {
+ int i, j;
+ for (i = 0; (i < size); i++)
+ {
+ for (j = 0; (j < size); j++)
+ {
+ if (!(arr[(i * 10) + j].Equals(TArray[i, j])))
+ {
+ Console.WriteLine("Failed Verification of Element TArray[{0}][{1}]", i, j);
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+}
+
+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 i = 0;
+
+ int[] IntArr_in = new int[100];
+ for (i = 0; (i < (10 * 10)); i++)
+ {
+ IntArr_in[i] = i;
+ }
+
+ int[] IntArr_out;
+ Gen<int> GenInt = new Gen<int>();
+ GenInt.StoreTArray(IntArr_in);
+ GenInt.LoadTArray(out IntArr_out);
+ Eval(GenInt.VerifyTArray(IntArr_out));
+
+ double[] DoubleArr_in = new double[100];
+ for (i = 0; (i < 10 * 10); i++)
+ {
+ DoubleArr_in[i] = i;
+ }
+
+ double[] DoubleArr_out;
+ Gen<double> GenDouble = new Gen<double>();
+ GenDouble.StoreTArray(DoubleArr_in);
+ GenDouble.LoadTArray(out DoubleArr_out);
+ Eval(GenDouble.VerifyTArray(DoubleArr_out));
+
+
+ string[] StringArr_in = new String[100];
+ for (i = 0; (i < 10 * 10); i++)
+ {
+ StringArr_in[i] = i.ToString();
+ }
+
+ String[] StringArr_out;
+ Gen<String> GenString = new Gen<String>();
+ GenString.StoreTArray(StringArr_in);
+ GenString.LoadTArray(out StringArr_out);
+ Eval(GenString.VerifyTArray(StringArr_out));
+
+
+ if (result)
+ {
+ Console.WriteLine("Test Passed");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("Test Failed");
+ return 1;
+ }
+ }
+
+}
+