diff options
author | Bengu Li <beli@microsoft.com> | 2015-06-08 11:31:51 -0700 |
---|---|---|
committer | Bengu Li <beli@microsoft.com> | 2015-06-08 11:31:51 -0700 |
commit | 2d836e1da3062fd797466a090123a746b9943d23 (patch) | |
tree | 46d10c23bead55bcbd9e91f20b18d4e3ec2ab444 /tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786 | |
parent | 4b21be40517f1348d7f223726decb0f719d09a4b (diff) | |
download | coreclr-2d836e1da3062fd797466a090123a746b9943d23.tar.gz coreclr-2d836e1da3062fd797466a090123a746b9943d23.tar.bz2 coreclr-2d836e1da3062fd797466a090123a746b9943d23.zip |
Add JIT/Regression/CLR-x86-JIT/V1-M09 test cases for JIT
Add JIT/Regression/CLR-x86-JIT/V1-M09 test cases for JIT. Related proj, config files added.
AllTestProjects.sln update delayed for a batch adding. Passed build, buildtest, runtest.
Diffstat (limited to 'tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786')
5 files changed, 132 insertions, 0 deletions
diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/app.config b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/app.config new file mode 100644 index 0000000000..62803f5972 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/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/b15786/b15786.cs b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/b15786.cs new file mode 100644 index 0000000000..cfd2effd12 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/b15786.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +namespace DefaultNamespace +{ + //@BEGINRENAME; Verify this renames + //@ENDRENAME; Verify this renames + using System; + + public class jitcast + { + public static UInt16 f() + { + int i = (Int32)UInt16.MaxValue; + return (UInt16)i; + } + + public static int Main(String[] args) + { + // Looks like what's happening is the JIT sees I'm casting an int + // to an unsigned short then back to an int and it messes up by + // sticking in sign extension. + int a = (Int32)f(); + Console.WriteLine("a was: " + a); + if (a == -1) + Console.WriteLine("\n\tBug #1: a shouldn't be -1! Widened from a unsigned short to an int shouldn't give a negative!\n"); + else + { + Console.WriteLine("pass"); + return 100; + } + return 1; + } + } +}
\ No newline at end of file diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/b15786.csproj b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/b15786.csproj new file mode 100644 index 0000000000..33b2928ebc --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/b15786.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/Regression/CLR-x86-JIT/V1-M09/b15786/cs_template.proj b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/cs_template.proj new file mode 100644 index 0000000000..adc2f21e14 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/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/Regression/CLR-x86-JIT/V1-M09/b15786/packages.config b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/packages.config new file mode 100644 index 0000000000..8f8ccd47d6 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b15786/packages.config @@ -0,0 +1,8 @@ +<?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" /> + <package id="System.Threading" version="4.0.0-beta-22412" /> + <package id="System.Threading.Thread" version="4.0.0-beta-22512" /> +</packages> |