diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2015-06-10 13:11:59 -0700 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2015-06-10 21:31:41 -0700 |
commit | 937180e726dd08c84852a835bd711157769aed2b (patch) | |
tree | 8b9c350368cb9f2c57c2fea77d4cc90b51a80dd2 /tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666 | |
parent | c65178cbb205f8573c84791a31836fb3a7dd237e (diff) | |
download | coreclr-937180e726dd08c84852a835bd711157769aed2b.tar.gz coreclr-937180e726dd08c84852a835bd711157769aed2b.tar.bz2 coreclr-937180e726dd08c84852a835bd711157769aed2b.zip |
Import the first batch of IL tests.
This set of tests is comprised of IL tests that:
- only reference APIs in .Net Core's System.Runtime,
System.Runtime.Extensions, and System.Threading contracts
- compile to a single executable,
- and expect no command line arguments at runtime.
Diffstat (limited to 'tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666')
5 files changed, 190 insertions, 0 deletions
diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/app.config b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/app.config new file mode 100644 index 0000000000..8077c95440 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/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/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/b10666.il b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/b10666.il new file mode 100644 index 0000000000..9235a4d046 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/b10666.il @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +.assembly extern legacy library mscorlib {} +.assembly b10666 +{ +} +.class value sealed Rational extends [mscorlib]System.ValueType +{ .field int32 Numerator + .field int32 Denominator + + .method public hidebysig specialname rtspecialname instance void .ctor() il managed + { + .maxstack 8 + ldarg.0 + ldc.i4.0 + stfld int32 Rational::Numerator + ldarg.0 + ldc.i4.0 + stfld int32 Rational::Denominator + ret + } + .method instance class [mscorlib]System.String ToString1() + { .locals (class [mscorlib]System.Text.StringBuilder SB, + class [mscorlib]System.String S, + class [mscorlib]System.Object N, + class [mscorlib]System.Object D) + newobj instance void [mscorlib]System.Text.StringBuilder::.ctor() + stloc.s SB + ldstr "The value is: {0}/{1}" + stloc.s S + ldarg.0 // By-ref to self + dup + ldfld int32 value class Rational::Numerator + box [mscorlib]System.Int32 + stloc.s N + ldfld int32 value class Rational::Denominator + box [mscorlib]System.Int32 + stloc.s D + ldloc.s SB + ldloc.s S + ldloc.s N + ldloc.s D + call instance class [mscorlib]System.Text.StringBuilder + [mscorlib]System.Text.StringBuilder::AppendFormat(class [mscorlib]System.String, + class [mscorlib]System.Object, class [mscorlib]System.Object) + callvirt instance class [mscorlib]System.String [mscorlib]System.Object::ToString() + ret + } + + + .method instance class [mscorlib]System.String ToString2() + { .maxstack 20 + newobj instance void [mscorlib]System.Text.StringBuilder::.ctor() + ldstr "The value is: {0}/{1}" + ldarg.0 // By-ref to self +// dup + ldfld int32 value class Rational::Numerator + box [mscorlib]System.Int32 + ldarg.0 + ldfld int32 value class Rational::Denominator + box [mscorlib]System.Int32 + call instance class [mscorlib]System.Text.StringBuilder + [mscorlib]System.Text.StringBuilder::AppendFormat(class [mscorlib]System.String, + class [mscorlib]System.Object, class [mscorlib]System.Object) + callvirt instance class [mscorlib]System.String [mscorlib]System.Object::ToString() + ret + } + +.method static int32 main() +{ .entrypoint + .locals (value class Rational Half) + ldloca.s Half + call instance void Rational::.ctor() + + ldloca.s Half + dup + ldc.i4.1 + stfld int32 value class Rational::Numerator + ldc.i4.2 + stfld int32 value class Rational::Denominator + + ldloca.s Half + call instance class [mscorlib]System.String value class Rational::ToString1() + call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) + + ldloca.s Half + call instance class [mscorlib]System.String value class Rational::ToString2() + call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) + + ldstr "Passed." + call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) + ldc.i4 100 + ret +} +} diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/b10666.ilproj b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/b10666.ilproj new file mode 100644 index 0000000000..c641f8da8a --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/b10666.ilproj @@ -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)\*.il" /> + </ItemGroup> + <PropertyGroup> + <GenerateRunScript>false</GenerateRunScript> + </PropertyGroup> + <MSBuild Projects="il_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" /> + </Target> +</Project>
\ No newline at end of file diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/il_template.proj b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/il_template.proj new file mode 100644 index 0000000000..cd6913e79e --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/il_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> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> + <RestorePackages>true</RestorePackages> + <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> + <ProjectLanguage>IL</ProjectLanguage> + </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).il" /> + </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>
\ No newline at end of file diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/packages.config b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/packages.config new file mode 100644 index 0000000000..37e10b961a --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b10666/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>
\ No newline at end of file |