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
path: root/test
diff options
context:
space:
mode:
authorJackson Schuster <36744439+jtschuster@users.noreply.github.com>2022-04-21 19:09:29 +0300
committerGitHub <noreply@github.com>2022-04-21 19:09:29 +0300
commita505231da871cc8b75ce8f2b605b7c7b825e3787 (patch)
treec16f6c6744b16e68cf62ca10eef908fe32528dc4 /test
parent3226921178c34eb9364e3ebdc39b3831b97a6cc1 (diff)
Use WellKnownType in more places and add mapping to MetadataType (#2699)
Add mapping from WellKnownType to Cecil's MetadataType for quicker checking in IsTypeOf. Add wrapper method for BCL.FindPredfinedType that takes a WellKnownType. * Use WellKnownType enum in more places * Use DisplayName for Namespace comparisons * Use switch expressions instead of statements * Use OriginalDefinition.SpecialType for WellKnownType comparisons * Add MetadataType.Void and delete Ananlyzer WellKnownTypeExtensions
Diffstat (limited to 'test')
-rw-r--r--test/Mono.Linker.Tests/Tests/TestFrameworkRulesAndConventions.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Mono.Linker.Tests/Tests/TestFrameworkRulesAndConventions.cs b/test/Mono.Linker.Tests/Tests/TestFrameworkRulesAndConventions.cs
index fec4f11cd..d20fbd66d 100644
--- a/test/Mono.Linker.Tests/Tests/TestFrameworkRulesAndConventions.cs
+++ b/test/Mono.Linker.Tests/Tests/TestFrameworkRulesAndConventions.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Linq;
+using ILLink.Shared.TypeSystemProxy;
using Mono.Cecil;
using Mono.Linker.Tests.Extensions;
using Mono.Linker.Tests.TestCases;
@@ -81,7 +82,7 @@ namespace Mono.Linker.Tests.Tests
static bool IsAttributeType (TypeDefinition type)
{
- if (type.Namespace == "System" && type.Name == "Attribute")
+ if (type.IsTypeOf (WellKnownType.System_Attribute))
return true;
if (type.BaseType == null)