blob: 5f2db3ddb1778b4ff637fca43f40368f9907ed90 (
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
|
using System;
using System.Collections;
using System.IO;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.CoreLink
{
[CoreLink ("link")]
[KeptAssembly ("mscorlib.dll")]
[KeptMemberInAssembly ("mscorlib.dll", typeof (Stack), ".ctor(System.Int32)", "Pop()", "Push(System.Object)")]
// 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
[RemovedMemberInAssembly ("mscorlib.dll", typeof (Stack), ".ctor(System.Collections.ICollection)")]
// Can be removed once this bug is fixed https://bugzilla.xamarin.com/show_bug.cgi?id=58168
[SkipPeVerify (SkipPeVerifyForToolchian.Pedump)]
class LinkingOfCoreLibrariesRemovesUnusedMethods {
public static void Main()
{
Stack stack = new Stack (2);
stack.Push (1);
var val = stack.Pop ();
}
}
}
|