Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Voorhees <michaelv@unity3d.com>2017-05-10 00:49:18 +0300
committerMarek Safar <marek.safar@gmail.com>2017-05-11 22:21:05 +0300
commit8c5a33bb25974f786460ac739d923555b7478342 (patch)
tree1ab6823b86018d8315b4ac5f6200856903d6f791 /linker/Tests
parent7fadbac85790cde18d7daed6ab38fd8b205b127f (diff)
Add a test for copying of core assemblies
Diffstat (limited to 'linker/Tests')
-rw-r--r--linker/Tests/Mono.Linker.Tests.Cases/CoreLink/CopyOfCoreLibrariesKeepsUnusedTypes.cs18
-rw-r--r--linker/Tests/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj1
2 files changed, 19 insertions, 0 deletions
diff --git a/linker/Tests/Mono.Linker.Tests.Cases/CoreLink/CopyOfCoreLibrariesKeepsUnusedTypes.cs b/linker/Tests/Mono.Linker.Tests.Cases/CoreLink/CopyOfCoreLibrariesKeepsUnusedTypes.cs
new file mode 100644
index 000000000..25ee13f24
--- /dev/null
+++ b/linker/Tests/Mono.Linker.Tests.Cases/CoreLink/CopyOfCoreLibrariesKeepsUnusedTypes.cs
@@ -0,0 +1,18 @@
+using System;
+using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
+
+namespace Mono.Linker.Tests.Cases.CoreLink
+{
+ [CoreLink ("copy")]
+ [KeptAssembly ("mscorlib.dll")]
+ // These types are normally removed when the core libraries are linked
+ [KeptTypeInAssembly ("mscorlib.dll", typeof (ConsoleKeyInfo))]
+ [KeptTypeInAssembly ("mscorlib.dll", typeof (System.Collections.ObjectModel.KeyedCollection<,>))]
+ class CopyOfCoreLibrariesKeepsUnusedTypes
+ {
+ public static void Main()
+ {
+ }
+ }
+}
diff --git a/linker/Tests/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj b/linker/Tests/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj
index 74325a8ac..a9cba0fda 100644
--- a/linker/Tests/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj
+++ b/linker/Tests/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj
@@ -56,6 +56,7 @@
<Compile Include="Basic\UnusedPropertyGetsRemoved.cs" />
<Compile Include="Basic\UnusedPropertySetterRemoved.cs" />
<Compile Include="Basic\UsedPropertyIsKept.cs" />
+ <Compile Include="CoreLink\CopyOfCoreLibrariesKeepsUnusedTypes.cs" />
<Compile Include="CoreLink\LinkingOfCoreLibrariesRemovesUnusedMethods.cs" />
<Compile Include="CoreLink\LinkingOfCoreLibrariesRemovesUnusedTypes.cs" />
<Compile Include="Advanced\DeadCodeElimination1.cs" />