blob: 3b92282bfb66bc9d3494dc25d799780695d482eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
using System;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.CoreLink {
[IgnoreTestCase("Requires mono 5.2 to pass. [Conditional] is not working with mcs on OSX agent")]
[CoreLink ("link")]
[Reference("System.dll")]
[KeptAssembly ("mscorlib.dll")]
[KeptAssembly("System.dll")]
// 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))]
[RemovedTypeInAssembly ("mscorlib.dll", typeof (System.Resources.ResourceWriter))]
[RemovedTypeInAssembly ("System.dll", typeof (System.CodeDom.Compiler.CodeCompiler))]
// Can be removed once this bug is fixed https://bugzilla.xamarin.com/show_bug.cgi?id=58168
[SkipPeVerify (SkipPeVerifyForToolchian.Pedump)]
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"));
}
[Kept]
static void OtherMethods2 (Uri uri)
{
}
}
}
|