summaryrefslogtreecommitdiff
path: root/tests/src
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2019-05-16 09:47:35 -0700
committerJan Vorlicek <janvorli@microsoft.com>2019-05-16 09:47:35 -0700
commit513979c6ad1aefb3f4494025613a2aedeb2a1464 (patch)
treedc5a339e43a182ef86da5b8ff07cac5a50db56cf /tests/src
parente03969fd4b0265219040defd4bc64e12903f4e42 (diff)
downloadcoreclr-513979c6ad1aefb3f4494025613a2aedeb2a1464.tar.gz
coreclr-513979c6ad1aefb3f4494025613a2aedeb2a1464.tar.bz2
coreclr-513979c6ad1aefb3f4494025613a2aedeb2a1464.zip
Add regression test for #24524
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/Regressions/coreclr/GitHub_24524/test24524.il28
-rw-r--r--tests/src/Regressions/coreclr/GitHub_24524/test24524.ilproj38
2 files changed, 66 insertions, 0 deletions
diff --git a/tests/src/Regressions/coreclr/GitHub_24524/test24524.il b/tests/src/Regressions/coreclr/GitHub_24524/test24524.il
new file mode 100644
index 0000000000..f6c1d333d4
--- /dev/null
+++ b/tests/src/Regressions/coreclr/GitHub_24524/test24524.il
@@ -0,0 +1,28 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+
+//
+// This test checks that signatures for fields are encoded properly in cross-module scenario.
+// It needs to be crossgen-ed with large version bubble enabled to test. It always succeeds
+// in other cases.
+//
+.assembly extern System.Private.CoreLib { auto }
+.assembly extern System.Console { auto }
+
+.assembly test24524{}
+
+.method private hidebysig static int32
+ Main() cil managed
+{
+ .entrypoint
+ .maxstack 2
+
+ ldtoken field object [System.Private.CoreLib]System.Type::Missing
+ call class[System.Private.CoreLib]System.Reflection.FieldInfo [System.Private.CoreLib]System.Reflection.FieldInfo::GetFieldFromHandle(valuetype [System.Private.CoreLib]System.RuntimeFieldHandle)
+ call void [System.Console]System.Console::WriteLine(object)
+
+ ldc.i4 100
+ ret
+}
diff --git a/tests/src/Regressions/coreclr/GitHub_24524/test24524.ilproj b/tests/src/Regressions/coreclr/GitHub_24524/test24524.ilproj
new file mode 100644
index 0000000000..b90dee9318
--- /dev/null
+++ b/tests/src/Regressions/coreclr/GitHub_24524/test24524.ilproj
@@ -0,0 +1,38 @@
+<?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>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{8C26D5B9-74A1-4EE2-926E-59CF0EC5CD43}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </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>
+ <PropertyGroup>
+
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="test24524.il" />
+ </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