diff options
Diffstat (limited to 'linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata')
3 files changed, 38 insertions, 13 deletions
diff --git a/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata/CoreLinkAttribute.cs b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata/CoreLinkAttribute.cs deleted file mode 100644 index e287d5a56..000000000 --- a/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata/CoreLinkAttribute.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Mono.Linker.Tests.Cases.Expectations.Metadata { - [AttributeUsage (AttributeTargets.Class)] - public class CoreLinkAttribute : BaseMetadataAttribute { - - public CoreLinkAttribute (string value) - { - if (string.IsNullOrEmpty (value)) - throw new ArgumentException ("Value cannot be null or empty.", nameof (value)); - } - } -}
\ No newline at end of file diff --git a/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata/SetupLinkerActionAttribute.cs b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata/SetupLinkerActionAttribute.cs new file mode 100644 index 000000000..d0d68193e --- /dev/null +++ b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata/SetupLinkerActionAttribute.cs @@ -0,0 +1,18 @@ +using System; + +namespace Mono.Linker.Tests.Cases.Expectations.Metadata +{ + [AttributeUsage (AttributeTargets.Class, AllowMultiple = true)] + public class SetupLinkerActionAttribute : BaseMetadataAttribute + { + public SetupLinkerActionAttribute (string action, string assembly) + { + switch (action) { + case "link": case "copy": case "skip": + break; + default: + throw new ArgumentOutOfRangeException (nameof (action)); + } + } + } +} diff --git a/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata/SetupLinkerCoreActionAttribute.cs b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata/SetupLinkerCoreActionAttribute.cs new file mode 100644 index 000000000..c60bc59b2 --- /dev/null +++ b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Metadata/SetupLinkerCoreActionAttribute.cs @@ -0,0 +1,20 @@ +using System; + +namespace Mono.Linker.Tests.Cases.Expectations.Metadata +{ + [AttributeUsage (AttributeTargets.Class, AllowMultiple = false)] + public class SetupLinkerCoreActionAttribute : BaseMetadataAttribute + { + public SetupLinkerCoreActionAttribute (string action) + { + switch (action) { + case "link": + case "copy": + case "skip": + break; + default: + throw new ArgumentOutOfRangeException (nameof (action)); + } + } + } +} |