diff options
author | Mike Voorhees <michaelv@unity3d.com> | 2017-05-10 00:20:26 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-05-11 22:21:05 +0300 |
commit | 7fadbac85790cde18d7daed6ab38fd8b205b127f (patch) | |
tree | 12a1a6799777b63c697bdb1b7da057691a1ada4c /linker/Tests/Mono.Linker.Tests.Cases.Expectations | |
parent | 98d8cffc84cdc3101267587f158b17467cb21ee5 (diff) |
Implement Kept & Removed Member in assembly
Diffstat (limited to 'linker/Tests/Mono.Linker.Tests.Cases.Expectations')
3 files changed, 37 insertions, 0 deletions
diff --git a/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptMemberInAssemblyAttribute.cs b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptMemberInAssemblyAttribute.cs new file mode 100644 index 000000000..31dd5131d --- /dev/null +++ b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptMemberInAssemblyAttribute.cs @@ -0,0 +1,18 @@ +using System; + + +namespace Mono.Linker.Tests.Cases.Expectations.Assertions { + [AttributeUsage (AttributeTargets.Class | AttributeTargets.Delegate, AllowMultiple = true, Inherited = false)] + public class KeptMemberInAssemblyAttribute : BaseExpectedLinkedBehaviorAttribute { + public readonly string AssemblyFileName; + public readonly Type Type; + public readonly string [] MemberNames; + + public KeptMemberInAssemblyAttribute (string assemblyFileName, Type type, params string [] memberNames) + { + AssemblyFileName = assemblyFileName; + Type = type; + MemberNames = memberNames; + } + } +} diff --git a/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Assertions/RemovedMemberInAssemblyAttribute.cs b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Assertions/RemovedMemberInAssemblyAttribute.cs new file mode 100644 index 000000000..3bcd63b9d --- /dev/null +++ b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Assertions/RemovedMemberInAssemblyAttribute.cs @@ -0,0 +1,17 @@ +using System; + +namespace Mono.Linker.Tests.Cases.Expectations.Assertions { + [AttributeUsage (AttributeTargets.Class | AttributeTargets.Delegate, AllowMultiple = true, Inherited = false)] + public class RemovedMemberInAssemblyAttribute : BaseExpectedLinkedBehaviorAttribute { + public readonly string AssemblyFileName; + public readonly Type Type; + public readonly string [] MemberNames; + + public RemovedMemberInAssemblyAttribute (string assemblyFileName, Type type, params string [] memberNames) + { + AssemblyFileName = assemblyFileName; + Type = type; + MemberNames = memberNames; + } + } +} diff --git a/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj index a9ba2d50b..d330e6c40 100644 --- a/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj +++ b/linker/Tests/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj @@ -43,8 +43,10 @@ <Compile Include="Assertions\BaseExpectedLinkedBehaviorAttribute.cs" /> <Compile Include="Assertions\KeptBackingFieldAttribute.cs" /> <Compile Include="Assertions\KeptMemberAttribute.cs" /> + <Compile Include="Assertions\KeptMemberInAssemblyAttribute.cs" /> <Compile Include="Assertions\KeptTypeInAssemblyAttribute.cs" /> <Compile Include="Assertions\RemovedAssemblyAttribute.cs" /> + <Compile Include="Assertions\RemovedMemberInAssemblyAttribute.cs" /> <Compile Include="Assertions\RemovedTypeInAssemblyAttribute.cs" /> <Compile Include="Metadata\BaseMetadataAttribute.cs" /> <Compile Include="Metadata\CoreLinkAttribute.cs" /> |