summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/Coverage
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2015-06-10 13:11:59 -0700
committerPat Gavlin <pagavlin@microsoft.com>2015-06-10 21:31:41 -0700
commit937180e726dd08c84852a835bd711157769aed2b (patch)
tree8b9c350368cb9f2c57c2fea77d4cc90b51a80dd2 /tests/src/JIT/Methodical/Coverage
parentc65178cbb205f8573c84791a31836fb3a7dd237e (diff)
downloadcoreclr-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/Methodical/Coverage')
-rw-r--r--tests/src/JIT/Methodical/Coverage/Coverage.ilproj19
-rw-r--r--tests/src/JIT/Methodical/Coverage/b39946.il321
-rw-r--r--tests/src/JIT/Methodical/Coverage/b518440.il86
-rw-r--r--tests/src/JIT/Methodical/Coverage/hole.il139
-rw-r--r--tests/src/JIT/Methodical/Coverage/il_template.proj42
5 files changed, 607 insertions, 0 deletions
diff --git a/tests/src/JIT/Methodical/Coverage/Coverage.ilproj b/tests/src/JIT/Methodical/Coverage/Coverage.ilproj
new file mode 100644
index 0000000000..c641f8da8a
--- /dev/null
+++ b/tests/src/JIT/Methodical/Coverage/Coverage.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/Methodical/Coverage/b39946.il b/tests/src/JIT/Methodical/Coverage/b39946.il
new file mode 100644
index 0000000000..77dd334f48
--- /dev/null
+++ b/tests/src/JIT/Methodical/Coverage/b39946.il
@@ -0,0 +1,321 @@
+// 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 b39946 {}
+.class ILGEN_0x5c383c7 {
+
+
+.field static unsigned int8[] field_0x0
+.field static int32[] field_0x1
+.field static int8 field_0x2
+.field static int64 field_0x3
+.field static unsigned int16[] field_0x4
+.field static float32[] field_0x5
+.field static unsigned int64[] field_0x7
+
+.method static float32 Method_0xdab1c815(float32 Arg_0x0, unsigned int8 Arg_0x1, float32 Arg_0x2, int8 Arg_0x3, unsigned int64 Arg_0x4, unsigned int8 Arg_0x5, unsigned int32 Arg_0x6, int64 Arg_0x7) {
+.maxstack 19
+
+ .locals init (float32[] local_0x0,float64[] local_0x1,int64 local_0x2)
+ldc.i4 255
+ newarr [mscorlib]System.Single
+ stloc local_0x0
+ldc.i4 255
+ newarr [mscorlib]System.Double
+ stloc local_0x1
+
+Start_Orphan_0:
+Start_Orphan_1:
+ ldarga Arg_0x7
+ pop
+End_Orphan_1:
+Start_Orphan_2:
+ ldsfld float32[] ILGEN_0x5c383c7::field_0x5
+ stsfld float32[] ILGEN_0x5c383c7::field_0x5
+End_Orphan_2:
+ ldloc local_0x2
+ conv.i2
+ pop
+End_Orphan_0:
+ ldloc local_0x1
+Start_Orphan_3:
+Start_Orphan_4:
+Start_Orphan_5:
+Start_Orphan_6:
+ nop
+End_Orphan_6:
+ ldarga Arg_0x0
+Start_Orphan_7:
+ nop
+End_Orphan_7:
+ ldc.i4.3
+ conv.r8
+ stind.r4
+End_Orphan_5:
+Start_Orphan_8:
+ ldarg Arg_0x3
+ starg Arg_0x6
+End_Orphan_8:
+ ldsfld int32[] ILGEN_0x5c383c7::field_0x1
+Start_Orphan_9:
+ nop
+End_Orphan_9:
+ ldc.i4.3
+ ldarg Arg_0x3
+ xor
+ ldc.r4 float32(0x9f41529a)
+ conv.ovf.u2
+ clt
+ ldelema [mscorlib]System.Int32
+Start_Orphan_a:
+ ldloc local_0x1
+ ldc.i4.s 69
+ ldelema [mscorlib]System.Double
+Start_Orphan_b:
+ nop
+End_Orphan_b:
+ ldc.r4 float32(0x8da3479e)
+ ldarg Arg_0x0
+ add conv.r4
+ stind.r8
+End_Orphan_a:
+Start_Orphan_c:
+ nop
+End_Orphan_c:
+ ldc.i4.5
+ ldc.i4.1
+ add
+ conv.ovf.i
+ stind.i4
+End_Orphan_4:
+Start_Orphan_d:
+Start_Orphan_e:
+ nop
+End_Orphan_e:
+ ldloc local_0x0
+ ldc.r4 float32(0x4dc5acd3)
+ conv.u4
+ ldelema [mscorlib]System.Single
+ pop
+End_Orphan_d:
+ ldsfld int32[] ILGEN_0x5c383c7::field_0x1
+ ldlen
+ conv.u1
+ newarr [mscorlib]System.Byte
+ stsfld unsigned int8[] ILGEN_0x5c383c7::field_0x0
+End_Orphan_3:
+ ldc.i4 0xe918ddce
+ ldelem.r8
+Start_Orphan_f:
+Start_Orphan_10:
+Start_Orphan_11:
+ ldsfld int32[] ILGEN_0x5c383c7::field_0x1
+ ldc.i4.6
+ ldc.i4.4
+ stelem.i4
+End_Orphan_11:
+ ldsfld unsigned int64[] ILGEN_0x5c383c7::field_0x7
+ ldc.i4.s -15
+ ldelema [mscorlib]System.UInt64
+ ldind.u8
+ conv.i2
+ starg Arg_0x6
+End_Orphan_10:
+Start_Orphan_12:
+ nop
+End_Orphan_12:
+ ldc.i4.7
+ ldc.i4.6
+ add
+ neg
+ ldarg Arg_0x3
+ ceq
+ conv.u2
+ conv.u1
+ newarr [mscorlib]System.Byte
+Start_Orphan_13:
+ ldsflda int64 ILGEN_0x5c383c7::field_0x3
+ pop
+End_Orphan_13:
+Start_Orphan_14:
+Start_Orphan_15:
+ ldloc local_0x1
+ ldarg Arg_0x1
+ ldelema [mscorlib]System.Double
+ pop
+End_Orphan_15:
+Start_Orphan_16:
+ nop
+End_Orphan_16:
+ ldsfld int64 ILGEN_0x5c383c7::field_0x3
+ ldc.i8 0xb58120274c655f85
+ ldsfld int64 ILGEN_0x5c383c7::field_0x3
+ div.un
+ sub.ovf
+ stloc local_0x2
+End_Orphan_14:
+Start_Orphan_17:
+ ldsfld unsigned int8[] ILGEN_0x5c383c7::field_0x0
+ ldsfld int8 ILGEN_0x5c383c7::field_0x2
+ ldc.i4.0
+ stelem.i1
+End_Orphan_17:
+ ldarg Arg_0x2
+ conv.r8
+ ckfinite
+ conv.i8
+ conv.ovf.i
+ conv.i1
+ ldelema [mscorlib]System.Byte
+ pop
+End_Orphan_f:
+Start_Orphan_18:
+Start_Orphan_19:
+ ldc.i4.5
+ ldc.i4.m1
+ mul
+ conv.ovf.i8
+ conv.ovf.i8
+ starg Arg_0x4
+End_Orphan_19:
+Start_Orphan_1c:
+ ldsfld unsigned int16[] ILGEN_0x5c383c7::field_0x4
+Start_Orphan_1e:
+ ldarga Arg_0x1
+ pop
+End_Orphan_1e:
+ ldc.i4.0
+ conv.u
+ conv.ovf.u2
+ ldc.i4.s 24
+ conv.ovf.i2
+ ldarg Arg_0x6
+ and
+ stelem.i2
+End_Orphan_1c:
+ ldc.i4.6
+ ldarg Arg_0x6
+ add.ovf
+ ldc.i4.4
+ conv.ovf.i1
+ cgt
+Start_Orphan_21:
+ ldc.i4.0
+ stsfld int8 ILGEN_0x5c383c7::field_0x2
+End_Orphan_21:
+ ldc.i4.7
+ ldsfld int8 ILGEN_0x5c383c7::field_0x2
+ div
+ ldc.r4 float32(0x6b2f7336)
+ conv.ovf.u2
+ or
+ clt.un
+ conv.ovf.u4
+ conv.u1
+ newarr [mscorlib]System.UInt64
+ ldc.r8 float64(0xa6c5004c71818e)
+ conv.ovf.i
+ conv.ovf.i1.un
+ conv.ovf.i1.un
+Start_Orphan_27:
+ ldc.i4.2
+ conv.u1
+ newarr [mscorlib]System.Int32
+ ldc.i4.s 72
+ ldc.i4.s -16
+ add
+ ldc.i4.m1
+ conv.ovf.i2
+ stelem.i4
+End_Orphan_27:
+ ldc.r8 float64(0x9d7b1157b29312a1)
+ conv.r8
+ ldc.i8 0x44819212b5bc07ec
+ conv.r4
+ sub conv.r4
+ ldarg Arg_0x0
+ ldarg Arg_0x0
+ sub conv.r4
+ ldc.i4.8
+ conv.r4
+ rem conv.r4
+ div conv.r4
+ ldarga Arg_0x0
+ ldind.r4
+ ldc.i8 0x4ef8780366a2d301
+ conv.r.un
+ add conv.r4
+ ldarg Arg_0x7
+ conv.r.un
+ ckfinite
+ div conv.r4
+ cgt.un
+ ceq
+ ldc.i4.2
+ conv.i
+ conv.i8
+ not
+ stelem.i8
+End_Orphan_18:
+ ldloc local_0x1
+Start_Orphan_39:
+ ldarga Arg_0x4
+ ldc.i8 0x1e9183552a8439b4
+ stind.i8
+End_Orphan_39:
+ ldc.i4.s -80
+ conv.ovf.i8
+Start_Orphan_3b:
+ ldarg Arg_0x4
+ conv.ovf.u
+ conv.u1
+ newarr [mscorlib]System.Byte
+ stsfld unsigned int8[] ILGEN_0x5c383c7::field_0x0
+End_Orphan_3b:
+ ldc.i4.3
+ conv.ovf.i4.un
+Start_Orphan_44:
+ ldsfld int8 ILGEN_0x5c383c7::field_0x2
+ starg Arg_0x5
+End_Orphan_44:
+ ldc.i4 0xfe559194
+ ldc.i4 0x678622e7
+ conv.ovf.i2
+ clt.un
+ add
+ conv.i8
+ ceq
+ ldelema [mscorlib]System.Double
+ ldind.r8
+ mul conv.r4
+ret
+}
+.method static int32 Main() {
+.entrypoint
+.maxstack 20
+.try {
+ldc.r4 float32(0xd750d2d2)
+ldc.i4 0x581312c8
+ldc.r4 float32(0x30c249c1)
+ldc.i4 0x82adc1e7
+ldc.i8 0xff262efbfd511c87
+ldc.i4 0x50ed1f3a
+ldc.i4 0xbbbaab3f
+ldc.i8 0xdf6ade5f8fc91e19
+
+call float32 ILGEN_0x5c383c7::Method_0xdab1c815(float32 Arg_0x0, unsigned int8 Arg_0x1, float32 Arg_0x2, int8 Arg_0x3, unsigned int64 Arg_0x4, unsigned int8 Arg_0x5, unsigned int32 Arg_0x6, int64 Arg_0x7)
+conv.i4
+pop
+
+ leave a1
+} catch [mscorlib]System.NullReferenceException {
+ pop
+ leave a1
+}
+a1:
+ldc.i4 100
+ ret
+}
+
+}
diff --git a/tests/src/JIT/Methodical/Coverage/b518440.il b/tests/src/JIT/Methodical/Coverage/b518440.il
new file mode 100644
index 0000000000..0466f428ac
--- /dev/null
+++ b/tests/src/JIT/Methodical/Coverage/b518440.il
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+
+.assembly extern mscorlib{}
+.assembly b518440{}
+.module b518440.exe
+
+.class public A
+{
+ .method public hidebysig static int32 main(string[] args)
+ {
+ .entrypoint
+ .maxstack 2
+
+ call void A::Test()
+
+ ldstr "Test SUCCESS"
+ call void [mscorlib]System.Console::WriteLine(string)
+ ldc.i4 100
+ ret
+ }
+
+ .method public static void Test()
+ {
+ // Code size 45 (0x2d)
+ .maxstack 2
+ .locals init (bool V_0,
+ class [mscorlib]System.Exception V_1,
+ class [mscorlib]System.Exception V_2,
+ class [mscorlib]System.Exception V_3,
+ class [mscorlib]System.Exception V_4)
+ IL_000a: ldc.i4.0
+ IL_000b: stloc.0
+ .try
+ {
+ .try
+ {
+ IL_000c: newobj instance void [mscorlib]System.Exception::.ctor()
+ IL_0011: throw
+
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_0012: dup
+ IL_0013: stloc.3
+ IL_0014: stloc.1
+ IL_0015: leave.s IL_0018
+
+ } // end handler
+ } // end .try
+ finally
+ {
+ IL_0017: endfinally
+ } // end handler
+ IL_0018: ldloc.0
+ IL_0019: brfalse.s IL_001b
+
+ .try
+ {
+ IL_001b: newobj instance void [mscorlib]System.Exception::.ctor()
+ IL_0020: throw
+
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_0021: dup
+ IL_0022: stloc.s V_4
+ IL_0024: stloc.2
+ IL_0025: leave.s IL_002c
+
+ } // end handler
+
+ IL_002c: ret
+ } // end of method A::main
+
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ .maxstack 1
+ IL_0000: ldarg.0
+ IL_0001: call instance void [mscorlib]System.Object::.ctor()
+ IL_0006: ret
+ } // end of method A::.ctor
+}
+
diff --git a/tests/src/JIT/Methodical/Coverage/hole.il b/tests/src/JIT/Methodical/Coverage/hole.il
new file mode 100644
index 0000000000..0bc7aa21b4
--- /dev/null
+++ b/tests/src/JIT/Methodical/Coverage/hole.il
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+
+
+
+
+// Metadata version: v1.2.30210
+.assembly extern mscorlib {}
+.assembly hole {}
+.module hole.exe
+// MVID: {972ABF67-C385-44E6-B525-571BCCECC13C}
+.imagebase 0x00400000
+.file alignment 0x00000200
+.stackreserve 0x00100000
+.subsystem 0x0003 // WINDOWS_CUI
+.corflags 0x00000001 // ILONLY
+// Image base: 0x000006FBFEC20000
+
+// =============== CLASS MEMBERS DECLARATION ===================
+
+.class public auto ansi beforefieldinit BASIC
+ extends [mscorlib]System.Object
+{
+ .field public static int32 x
+ .method public hidebysig static int32 Main() cil managed
+ {
+ .entrypoint
+ // Code size 115 (0x73)
+ .maxstack 10
+ .locals init (valuetype VT[] V_0)
+ IL_0000: ldc.i4.4
+ IL_0001: newarr VT
+ IL_0006: stloc.0
+ IL_0007: ldloc.0
+ IL_0008: ldc.i4.0
+ IL_0009: ldelema VT
+ IL_000e: ldstr "Boo ya!"
+ IL_0013: ldc.i4.3
+ IL_0014: newobj instance void VT::.ctor(string,
+ int32)
+ IL_0019: stobj VT
+ IL_001e: ldloc.0
+ IL_001f: ldc.i4.1
+ IL_0020: ldelema VT
+ IL_0025: ldstr "Boo ya!"
+ IL_002a: ldc.i4.3
+ IL_002b: newobj instance void VT::.ctor(string,
+ int32)
+ IL_0030: stobj VT
+ IL_0035: ldloc.0
+ IL_0036: ldc.i4.2
+ IL_0037: ldelema VT
+ IL_003c: ldstr "Boo ya!"
+ IL_0041: ldc.i4.3
+ IL_0042: newobj instance void VT::.ctor(string,
+ int32)
+ IL_0047: stobj VT
+ IL_004c: ldloc.0
+ IL_004d: ldc.i4.3
+ IL_004e: ldelema VT
+ IL_0053: ldstr "Boo ya!"
+ IL_0058: ldc.i4.3
+ IL_0059: newobj instance void VT::.ctor(string,
+ int32)
+ IL_005e: stobj VT
+ IL_0063: ldsfld int32 BASIC::x
+ IL_0068: ldc.i4.0
+ IL_0069: ble.s IL_0072
+
+ tail.
+ call int32 BASIC::Foo()
+ ret
+
+ IL_0072: ldc.i4 1
+ ret
+ } // end of method BASIC::Main
+
+ .method public hidebysig static int32 Foo() cil managed
+ {
+ // Code size 21 (0x15)
+ .maxstack 10
+ IL_0000: ldstr "In Foo: "
+ IL_0005: call void [mscorlib]System.Console::Write(string)
+ IL_000a: ldsfld int32 BASIC::x
+ IL_000f: call void [mscorlib]System.Console::WriteLine(int32)
+ ldc.i4 100
+ IL_0014: ret
+ } // end of method BASIC::Foo
+
+ .method private hidebysig specialname rtspecialname static
+ void .cctor() cil managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldc.i4.4
+ IL_0001: stsfld int32 BASIC::x
+ IL_0006: ret
+ } // end of method BASIC::.cctor
+
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: call instance void [mscorlib]System.Object::.ctor()
+ IL_0006: ret
+ } // end of method BASIC::.ctor
+
+} // end of class BASIC
+
+.class public sequential ansi sealed beforefieldinit VT
+ extends [mscorlib]System.ValueType
+{
+ .field private string s
+ .field private int32 x
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor(string s,
+ int32 x) cil managed
+ {
+ // Code size 15 (0xf)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: ldarg.1
+ IL_0002: stfld string VT::s
+ IL_0007: ldarg.0
+ IL_0008: ldarg.2
+ IL_0009: stfld int32 VT::x
+ IL_000e: ret
+ } // end of method VT::.ctor
+
+} // end of class VT
+
+
+// =============================================================
+
+//*********** DISASSEMBLY COMPLETE ***********************
+// WARNING: Created Win32 resource file hole.res
diff --git a/tests/src/JIT/Methodical/Coverage/il_template.proj b/tests/src/JIT/Methodical/Coverage/il_template.proj
new file mode 100644
index 0000000000..cd6913e79e
--- /dev/null
+++ b/tests/src/JIT/Methodical/Coverage/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