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
path: root/linker
diff options
context:
space:
mode:
authorMike Voorhees <michaelv@unity3d.com>2017-08-01 19:01:04 +0300
committerMarek Safar <marek.safar@gmail.com>2017-08-02 20:14:24 +0300
commit39b70e7550e38188a6f411d7ec46fc9ac5528cd8 (patch)
treebb73f1ea2d4389b1422c547e502380975b6ee561 /linker
parentbba6a2f79dffe52c03e056afdb31ba3da2f2b50a (diff)
Fix LinkingOfCoreLibrariesRemovesUnusedTypes failing on Windows
Skip PeVerifying of System.dll and System.Configuration.dll. PeVerify reports problems in the unlinked mono class lib version of these assemblies as well as the .NET Framework version. Also change the types used by this test. Use types that exist in mono AOT profiles
Diffstat (limited to 'linker')
-rw-r--r--linker/Tests/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/linker/Tests/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs b/linker/Tests/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs
index bbd0aee0f..b7edac39e 100644
--- a/linker/Tests/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs
+++ b/linker/Tests/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
@@ -11,22 +12,26 @@ namespace Mono.Linker.Tests.Cases.CoreLink {
// We can't check everything that should be removed, but we should be able to check a few niche things that
// we known should be removed which will at least verify that the core library was processed
[KeptTypeInAssembly ("mscorlib.dll", typeof (System.Collections.Generic.IEnumerable<>))]
- [KeptTypeInAssembly ("System.dll", typeof (Uri))]
+ [KeptTypeInAssembly ("System.dll", typeof (System.Collections.Generic.SortedList<,>))]
[RemovedTypeInAssembly ("mscorlib.dll", typeof (System.Resources.ResourceWriter))]
- [RemovedTypeInAssembly ("System.dll", typeof (System.CodeDom.Compiler.CodeCompiler))]
+ [RemovedTypeInAssembly ("System.dll", typeof (System.Collections.Generic.SortedDictionary<,>))]
// Can be removed once this bug is fixed https://bugzilla.xamarin.com/show_bug.cgi?id=58168
[SkipPeVerify (SkipPeVerifyForToolchian.Pedump)]
+
+ // All sorts of stuff is flagged as invalid even in the original System.dll and System.Configuration.dll for mono class libraries
+ [SkipPeVerify("System.dll")]
+ [SkipPeVerify("System.Configuration.dll")]
class LinkingOfCoreLibrariesRemovesUnusedTypes {
public static void Main ()
{
// Use something from system that would normally be removed if we didn't use it
- OtherMethods2 (new Uri ("dont care"));
+ OtherMethods2 (new SortedList<string, string>());
}
[Kept]
- static void OtherMethods2 (Uri uri)
+ static void OtherMethods2 (SortedList<string, string> list)
{
}
}