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

LinkingOfCoreLibrariesRemovesUnusedMethods.cs « CoreLink « Mono.Linker.Tests.Cases « Tests « linker - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 78b460939a43ec8fc892830ef085c150a860549a (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
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)")]
	class LinkingOfCoreLibrariesRemovesUnusedMethods {
		public static void Main()
		{
			Stack stack = new Stack (2);
			stack.Push (1);
			var val = stack.Pop ();
		}
	}
}