提交 f6a908fc 编写于 作者: V vsadov

fix some tests after merge from master

上级 3ad26228
...@@ -584,7 +584,7 @@ public void M() ...@@ -584,7 +584,7 @@ public void M()
var options = TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All); var options = TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All);
CompileAndVerify(text, verify: false, options: options, symbolValidator: module => CompileAndVerify(text, verify: false, options: options, symbolValidator: module =>
{ {
var method = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__Inner0_0"); var method = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__Inner|0_0");
Assert.Equal(RefKind.RefReadOnly, method.RefKind); Assert.Equal(RefKind.RefReadOnly, method.RefKind);
Assert.True(method.ReturnsByRefReadonly); Assert.True(method.ReturnsByRefReadonly);
...@@ -612,7 +612,7 @@ public void M() ...@@ -612,7 +612,7 @@ public void M()
var options = TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All); var options = TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All);
CompileAndVerify(text, options: options, symbolValidator: module => CompileAndVerify(text, options: options, symbolValidator: module =>
{ {
var parameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__Inner0_0").GetParameters().Single(); var parameter = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__Inner|0_0").GetParameters().Single();
Assert.Equal(RefKind.RefReadOnly, parameter.RefKind); Assert.Equal(RefKind.RefReadOnly, parameter.RefKind);
AssertReferencedIsReadOnlyAttribute(Accessibility.Internal, parameter.GetAttributes(), module.ContainingAssembly.Name); AssertReferencedIsReadOnlyAttribute(Accessibility.Internal, parameter.GetAttributes(), module.ContainingAssembly.Name);
...@@ -639,7 +639,7 @@ public void M() ...@@ -639,7 +639,7 @@ public void M()
var options = TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All); var options = TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All);
CompileAndVerify(text, verify: false, options: options, symbolValidator: module => CompileAndVerify(text, verify: false, options: options, symbolValidator: module =>
{ {
var method = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__Inner1_0"); var method = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__Inner|1_0");
Assert.Equal(RefKind.RefReadOnly, method.RefKind); Assert.Equal(RefKind.RefReadOnly, method.RefKind);
Assert.True(method.ReturnsByRefReadonly); Assert.True(method.ReturnsByRefReadonly);
...@@ -673,7 +673,7 @@ public void M() ...@@ -673,7 +673,7 @@ public void M()
var options = TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All); var options = TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All);
CompileAndVerify(codeB, verify: false, additionalRefs: new[] { referenceA }, options: options, symbolValidator: module => CompileAndVerify(codeB, verify: false, additionalRefs: new[] { referenceA }, options: options, symbolValidator: module =>
{ {
var method = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__Inner0_0"); var method = module.ContainingAssembly.GetTypeByMetadataName("Test").GetMethod("<M>g__Inner|0_0");
Assert.Equal(RefKind.RefReadOnly, method.RefKind); Assert.Equal(RefKind.RefReadOnly, method.RefKind);
Assert.True(method.ReturnsByRefReadonly); Assert.True(method.ReturnsByRefReadonly);
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -639,7 +639,7 @@ class Program ...@@ -639,7 +639,7 @@ class Program
var comp = CompileAndVerify(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular, verify: false); var comp = CompileAndVerify(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular, verify: false);
comp.VerifyIL("Program.<M>g__M10_0(in int, in (int Alice, int Bob))", @" comp.VerifyIL("Program.<M>g__M1|0_0(in int, in (int Alice, int Bob))", @"
{ {
// Code size 12 (0xc) // Code size 12 (0xc)
.maxstack 1 .maxstack 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册