|
|
|
@ -1095,8 +1095,8 @@ namespace ICSharpCode.Decompiler.Tests.TypeSystem
@@ -1095,8 +1095,8 @@ namespace ICSharpCode.Decompiler.Tests.TypeSystem
|
|
|
|
|
{ |
|
|
|
|
ITypeDefinition type = GetTypeDefinition(typeof(IShadowTestDerived)); |
|
|
|
|
Assert.That(type.DirectBaseTypes.Count() == 2, "Should have exactly two direct base types"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.First() == GetTypeDefinition(typeof(IShadowTestBase)), "Base type should be IShadowTestBase"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.Skip(1).First().IsKnownType(KnownTypeCode.Object), "Base type should be object"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.Skip(1).First() == GetTypeDefinition(typeof(IShadowTestBase)), "Base type should be IShadowTestBase"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.First().IsKnownType(KnownTypeCode.Object), "Base type should be object"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
@ -1104,9 +1104,9 @@ namespace ICSharpCode.Decompiler.Tests.TypeSystem
@@ -1104,9 +1104,9 @@ namespace ICSharpCode.Decompiler.Tests.TypeSystem
|
|
|
|
|
{ |
|
|
|
|
ITypeDefinition type = GetTypeDefinition(typeof(IDerived)); |
|
|
|
|
Assert.That(type.DirectBaseTypes.Count() == 3, "Should have exactly three direct base types"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.First() == GetTypeDefinition(typeof(IBase1)), "Base type should be IBase1"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.Skip(1).First() == GetTypeDefinition(typeof(IBase2)), "Base type should be IBase2"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.Skip(2).First().IsKnownType(KnownTypeCode.Object), "Base type should be object"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.First().IsKnownType(KnownTypeCode.Object), "Base type should be object"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.Skip(1).First() == GetTypeDefinition(typeof(IBase1)), "Base type should be IBase1"); |
|
|
|
|
Assert.That(type.DirectBaseTypes.Skip(2).First() == GetTypeDefinition(typeof(IBase2)), "Base type should be IBase2"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
|