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:
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Attributes/Csc/OnlyTypeUsedInAssemblyIsTypeOnAttributeCtorOnAssembly.cs')
-rw-r--r--test/Mono.Linker.Tests.Cases/Attributes/Csc/OnlyTypeUsedInAssemblyIsTypeOnAttributeCtorOnAssembly.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Attributes/Csc/OnlyTypeUsedInAssemblyIsTypeOnAttributeCtorOnAssembly.cs b/test/Mono.Linker.Tests.Cases/Attributes/Csc/OnlyTypeUsedInAssemblyIsTypeOnAttributeCtorOnAssembly.cs
new file mode 100644
index 000000000..62c1fd568
--- /dev/null
+++ b/test/Mono.Linker.Tests.Cases/Attributes/Csc/OnlyTypeUsedInAssemblyIsTypeOnAttributeCtorOnAssembly.cs
@@ -0,0 +1,23 @@
+using Mono.Linker.Tests.Cases.Attributes.Dependencies;
+using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
+
+[assembly: KeptAttributeAttribute (typeof (System.Diagnostics.DebuggableAttribute))]
+[assembly: AttributeDefinedInReference (typeof (TypeDefinedInReference))]
+
+namespace Mono.Linker.Tests.Cases.Attributes.Csc {
+ /// <summary>
+ /// In the case of attributes on assemblies, we expect both assemblies to be removed because we don't keep assembly level attributes
+ /// when that is the only type marked in the assembly
+ /// </summary>
+ [SetupCSharpCompilerToUse ("csc")]
+ [SetupCompileBefore ("LibraryWithType.dll", new [] { typeof(TypeDefinedInReference) })]
+ [SetupCompileBefore ("LibraryWithAttribute.dll", new [] { typeof(AttributeDefinedInReference) })]
+ [RemovedAssembly ("LibraryWithType.dll")]
+ [RemovedAssembly ("LibraryWithAttribute.dll")]
+ public class OnlyTypeUsedInAssemblyIsTypeOnAttributeCtorOnAssembly {
+ public static void Main()
+ {
+ }
+ }
+} \ No newline at end of file