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

CanCompileTestCaseWithMsc.cs « TestFramework « Mono.Linker.Tests.Cases « test - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7bafdc3d2680e5f0f53a6c99d1468a7ca250019d (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
using System;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
using Mono.Linker.Tests.Cases.TestFramework.Dependencies;

[assembly: KeptAttributeAttribute (typeof (System.Diagnostics.DebuggableAttribute))]

namespace Mono.Linker.Tests.Cases.TestFramework {
	[SetupCSharpCompilerToUse ("mcs")]

	// Use all of the compiler setup attributes so that we can verify they all work
	// when roslyn is used
	[SetupCompileArgument ("/debug:pdbonly")]
	[SetupCompileResource ("Dependencies/CanCompileTestCaseWithMcs.txt")]
	[Define ("VERIFY_DEFINE_WORKS")]
	[Reference ("System.dll")]

	[SetupCompileBefore ("library.dll", new[] { "Dependencies/CanCompileTestCaseWithMcs_Lib.cs" }, compilerToUse: "mcs")]

	[KeptResource ("CanCompileTestCaseWithMcs.txt")]
	[KeptMemberInAssembly ("library.dll", typeof (CanCompileTestCaseWithMcs_Lib), "Used()")]
	class CanCompileTestCaseWithMsc {
		static void Main ()
		{
#if VERIFY_DEFINE_WORKS
			UsedByDefine ();
#endif
			// Use something from System.dll so that we can verify the reference attribute works
			var timer = new System.Timers.Timer ();

			CanCompileTestCaseWithMcs_Lib.Used ();
		}

		[Kept]
		static void UsedByDefine ()
		{
		}
	}
}