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

AttributesScopeUpdated.cs « TypeForwarding « Mono.Linker.Tests.Cases « test - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f1be225b938b6288f6e1b849d98733f9e72d98a5 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
using Mono.Linker.Tests.Cases.TypeForwarding.Dependencies;

namespace Mono.Linker.Tests.Cases.TypeForwarding
{
	// Actions:
	// link - Forwarder.dll and Implementation.dll
	// copy - this (test.dll) assembly

	[SetupLinkerDefaultAction ("link")]
	[SetupLinkerAction ("copy", "test")]
	[KeepTypeForwarderOnlyAssemblies ("false")]

	[SetupCompileBefore ("Forwarder.dll", new[] { "Dependencies/ReferenceImplementationLibrary.cs" }, defines: new[] { "INCLUDE_REFERENCE_IMPL" })]

	// After compiling the test case we then replace the reference impl with implementation + type forwarder
	[SetupCompileAfter ("Implementation.dll", new[] { "Dependencies/ImplementationLibrary.cs" })]
	[SetupCompileAfter ("Forwarder.dll", new[] { "Dependencies/ForwarderLibrary.cs" }, references: new[] { "Implementation.dll" })]

	[KeptTypeInAssembly ("Forwarder.dll", typeof (ImplementationLibrary))]
	[KeptTypeInAssembly ("Implementation.dll", typeof (ImplementationLibrary))]
	static class AttributesScopeUpdated
	{
		static void Main ()
		{
		}

		[Kept]
		public static void Test_1 ([KeptAttributeAttribute (typeof (TestType3Attribute))][TestType3 (typeof (ImplementationLibrary))] int arg)
		{
		}

		[Kept]
		public static void Test_2<[KeptAttributeAttribute (typeof (TestType3Attribute))] [TestType3 (typeof (ImplementationLibrary))] T> ()
		{
		}

		[Kept]
		[return: KeptAttributeAttribute (typeof (TestType3Attribute))]
		[return: TestType3 (typeof (ImplementationLibrary))]
		public static void Test_3 ()
		{
		}
	}

	[KeptBaseType (typeof (Attribute))]
	public class TestType3Attribute : Attribute
	{
		[Kept]
		public TestType3Attribute (Type type)
		{
		}
	}
}