blob: 5ecaea8aa3dff1af15164f2f6fd4d0cb381207e9 (
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 ("csc")]
// Use all of the compiler setup attributes so that we can verify they all work
// when roslyn is used
[SetupCompileArgument ("/debug:portable")]
[SetupCompileResource ("Dependencies/CanCompileTestCaseWithCsc.txt")]
[Define ("VERIFY_DEFINE_WORKS")]
[Reference ("System.dll")]
[SetupCompileBefore ("library.dll", new [] { "Dependencies/CanCompileTestCaseWithCsc_Lib.cs" }, compilerToUse: "csc")]
[KeptResource ("CanCompileTestCaseWithCsc.txt")]
[KeptMemberInAssembly ("library.dll", typeof (CanCompileTestCaseWithCsc_Lib), "Used()")]
class CanCompileTestCaseWithCsc {
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 ();
CanCompileTestCaseWithCsc_Lib.Used ();
}
[Kept]
static void UsedByDefine ()
{
}
}
}
|