blob: 439e73d758a418bab1fba678e8df8ce0fb307793 (
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
|
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 - This assembly, Forwarder.dll and Implementation.dll
// --keep-facades
[SetupLinkerDefaultAction ("link")]
[KeepTypeForwarderOnlyAssemblies ("true")]
[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" })]
[KeptAssembly ("Forwarder.dll")]
[RemovedForwarder ("Forwarder.dll", "ImplementationLibrary")]
[RemovedAssembly ("Implementation.dll")]
class UnusedForwarderWithAssemblyLinkedAndFacadesKept
{
static void Main ()
{
}
static void Unused ()
{
new ImplementationLibrary ().GetSomeValue ();
}
}
}
|