private static IEnumerable <VerificationResult> Verify(TestCase testCase) { EcmaModule module = TestDataLoader.GetModuleForTestAssembly(testCase.ModuleName); var typeHandle = (TypeDefinitionHandle)MetadataTokens.EntityHandle(testCase.MetadataToken); var type = (EcmaType)module.GetType(typeHandle); var verifier = new Verifier((ILVerifyTypeSystemContext)type.Context); return(verifier.Verify(module.PEReader, typeHandle)); }
private static IEnumerable <VerificationResult> Verify(TestCase testCase) { EcmaModule module = TestDataLoader.GetModuleForTestAssembly(testCase.ModuleName); var methodHandle = (MethodDefinitionHandle)MetadataTokens.EntityHandle(testCase.MetadataToken); var method = (EcmaMethod)module.GetMethod(methodHandle); var verifier = new Verifier((ILVerifyTypeSystemContext)method.Context, new VerifierOptions() { IncludeMetadataTokensInErrorMessages = true }); return(verifier.Verify(module.PEReader, methodHandle)); }