Skip to content

Commit

Permalink
Import JIT tests.
Browse files Browse the repository at this point in the history
This imports the remainder of the tests under JIT/jit64 that are able
to target CoreCLR.
  • Loading branch information
pgavlin committed May 27, 2015
1 parent 4d931ce commit b1d65ae
Show file tree
Hide file tree
Showing 151 changed files with 63,444 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/src/JIT/jit64/opt/cg/CGRecurse/CGRecurse.csproj
Original file line number Diff line number Diff line change
@@ -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>
51 changes: 51 additions & 0 deletions tests/src/JIT/jit64/opt/cg/CGRecurse/CGRecurseAAA.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;

namespace CGRecurse
{
public class RecursiveAAA
{
public static string ActualResult;

public static int cntA = 0;

public static int cntB = 0;

public static int cntC = 0;

public static int Main()
{
string ExpectedResult = "AAA";
int retVal = 1;
A();
if (ExpectedResult.Equals(ActualResult))
{
Console.WriteLine("Test SUCCESS");
retVal = 100;
}
return retVal;
}

public static void A()
{
ActualResult = (ActualResult + "A");
if ((cntA == 1))
{
cntA = 0;
return;
}
cntA = (cntA + 1);
A();
if ((cntA == 1))
{
cntA = 0;
return;
}
cntA = (cntA + 1);
A();
return;
}
}
}
57 changes: 57 additions & 0 deletions tests/src/JIT/jit64/opt/cg/CGRecurse/CGRecurseAAC.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;

namespace CGRecurse
{
public class RecursiveAAC
{
public static string ActualResult;

public static int cntA = 0;

public static int cntB = 0;

public static int cntC = 0;

public static int Main()
{
string ExpectedResult = "AAC";
int retVal = 1;
A();
if (ExpectedResult.Equals(ActualResult))
{
Console.WriteLine("Test SUCCESS");
retVal = 100;
}
return retVal;
}

public static void C()
{
ActualResult = (ActualResult + "C");
return;
}

public static void A()
{
ActualResult = (ActualResult + "A");
if ((cntA == 1))
{
cntA = 0;
return;
}
cntA = (cntA + 1);
A();
if ((cntC == 1))
{
cntC = 0;
return;
}
cntC = (cntC + 1);
C();
return;
}
}
}
57 changes: 57 additions & 0 deletions tests/src/JIT/jit64/opt/cg/CGRecurse/CGRecurseACA.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;

namespace CGRecurse
{
public class RecursiveACA
{
public static string ActualResult;

public static int cntA = 0;

public static int cntB = 0;

public static int cntC = 0;

public static int Main()
{
string ExpectedResult = "ACA";
int retVal = 1;
A();
if (ExpectedResult.Equals(ActualResult))
{
Console.WriteLine("Test SUCCESS");
retVal = 100;
}
return retVal;
}

public static void C()
{
ActualResult = (ActualResult + "C");
if ((cntA == 1))
{
cntA = 0;
return;
}
cntA = (cntA + 1);
A();
return;
}

public static void A()
{
ActualResult = (ActualResult + "A");
if ((cntC == 1))
{
cntC = 0;
return;
}
cntC = (cntC + 1);
C();
return;
}
}
}
58 changes: 58 additions & 0 deletions tests/src/JIT/jit64/opt/cg/CGRecurse/CGRecurseACC.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;

namespace CGRecurse
{
public class RecursiveACC
{
public static string ActualResult;

public static int cntA = 0;

public static int cntB = 0;

public static int cntC = 0;

public static int Main()
{
string ExpectedResult = "ACC";
int retVal = 1;
A();
Console.WriteLine(ActualResult);
if (ExpectedResult.Equals(ActualResult))
{
Console.WriteLine("Test SUCCESS");
retVal = 100;
}
return retVal;
}

public static void C()
{
ActualResult = (ActualResult + "C");
if ((cntC == 2))
{
cntC = 0;
return;
}
cntC = (cntC + 1);
C();
return;
}

public static void A()
{
ActualResult = (ActualResult + "A");
if ((cntC == 1))
{
cntC = 0;
return;
}
cntC = (cntC + 1);
C();
return;
}
}
}
27 changes: 27 additions & 0 deletions tests/src/JIT/jit64/opt/cg/CGRecurse/app.config
Original file line number Diff line number Diff line change
@@ -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>
42 changes: 42 additions & 0 deletions tests/src/JIT/jit64/opt/cg/CGRecurse/cs_template.proj
Original file line number Diff line number Diff line change
@@ -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>
6 changes: 6 additions & 0 deletions tests/src/JIT/jit64/opt/cg/CGRecurse/packages.config
Original file line number Diff line number Diff line change
@@ -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>
Loading

0 comments on commit b1d65ae

Please sign in to comment.