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

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2020-12-24 14:43:30 +0300
committerGitHub <noreply@github.com>2020-12-24 14:43:30 +0300
commit6d05762d54a56309e49e6d8b70dca272e78e3e19 (patch)
tree6a3d943bb160e0f4335caffa87a042b5dffa7886 /test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardedIsUpdatedForMissingType.cs
parent8ecdb90f69bacd96eb8a171d01a29b83494c0611 (diff)
Fixes removal of unused assembly references for linked assemblies (#1683)
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardedIsUpdatedForMissingType.cs')
-rw-r--r--test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardedIsUpdatedForMissingType.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardedIsUpdatedForMissingType.cs b/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardedIsUpdatedForMissingType.cs
new file mode 100644
index 000000000..a5e019cb0
--- /dev/null
+++ b/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardedIsUpdatedForMissingType.cs
@@ -0,0 +1,33 @@
+using System;
+using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
+
+namespace Mono.Linker.Tests.Cases.TypeForwarding
+{
+ [SkipUnresolved (true)]
+ [KeepTypeForwarderOnlyAssemblies ("false")]
+ [SetupCompileBefore ("Lib.dll", new[] { "Dependencies/TypeForwardedIsUpdatedForMissingTypeLib.cs" })]
+ [SetupCompileBefore ("AnotherLibrary.dll", new[] { "Dependencies/TypeForwardedIsUpdatedForMissingTypeLib2.cs" })]
+
+ [SetupCompileAfter ("AnotherLibrary.dll", new[] { "Dependencies/TypeForwardedIsUpdatedForMissingTypeLib2.cs" })]
+ [SetupCompileAfter ("Implementation.dll", new[] { "Dependencies/TypeForwardedIsUpdatedForMissingTypeLib.cs" }, removeFromLinkerInput: true)]
+ [SetupCompileAfter ("Lib.dll", new[] { "Dependencies/TypeForwardedIsUpdatedForMissingTypeFwd.cs" }, references: new[] { "Implementation.dll" })]
+
+ public class TypeForwardedIsUpdatedForMissingType
+ {
+ public static void Main ()
+ {
+ Test (null);
+ }
+
+ // It's important that the assembly reference to AnotherLibrary is added before Lib
+ public void DependencyWhichIsRemovedFromAssemblyList (C2 c)
+ {
+ }
+
+ [Kept]
+ static void Test (C1 c)
+ {
+ }
+ }
+}