diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UsedAttributeTypeOnAssemblyIsKept.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UsedAttributeTypeOnAssemblyIsKept.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UsedAttributeTypeOnAssemblyIsKept.cs b/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UsedAttributeTypeOnAssemblyIsKept.cs new file mode 100644 index 000000000..3f84fddbb --- /dev/null +++ b/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UsedAttributeTypeOnAssemblyIsKept.cs @@ -0,0 +1,23 @@ +using System; +using Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed; +using Mono.Linker.Tests.Cases.Expectations.Metadata; +using Mono.Linker.Tests.Cases.Expectations.Assertions; + +[assembly: UsedAttributeTypeOnAssemblyIsKept.Foo] +[assembly: KeptAttributeAttribute (typeof (UsedAttributeTypeOnAssemblyIsKept.FooAttribute))] + +namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed { + [SetupLinkerArgument("--used-attrs-only", "true")] + class UsedAttributeTypeOnAssemblyIsKept { + static void Main () + { + var str = typeof (FooAttribute).ToString (); + } + + [Kept] + [KeptMember (".ctor()")] + [KeptBaseType (typeof (Attribute))] + public class FooAttribute : Attribute { + } + } +} |