提交 75463028 编写于 作者: J Jared Parsons

Rename to CompileStandardAndVerify

This unifies our API naming convention. When standard is in the name
then we are using the netstandard2.0 API set and when it is not then it
is the simple desktop mscorlib46.

Both variants are necessary for CompileAndVerify style functions because
many of our tests that use it can only run on desktop or simply need to
have some of the netstandard2.0 API set missing.
上级 c62c9499
......@@ -121,7 +121,7 @@
- Embed PDBs to be consistent with Jenkins builds.
-->
<RoslynDebugType Condition="'$(OfficialBuild)' == 'true'">portable</RoslynDebugType>
<RoslynDebugType Condition="'$(OfficialBuild)' != 'true'">embedded</RoslynDebugType>
<RoslynDebugType Condition="'$(OfficialBuild)' != 'true'">full</RoslynDebugType>
<!--
The source root path used for deterministic normalization of source paths.
......
......@@ -816,7 +816,7 @@ public class Base
public virtual int Goo { get { return 0; } }
}
";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[Fact]
......@@ -1267,7 +1267,7 @@ public class Test
Assert.Equal("JJ", event10.AddMethod.GetReturnTypeAttributes().Single().AttributeClass.Name);
};
CompileAndVerify(source, sourceSymbolValidator: symbolValidator(true), symbolValidator: symbolValidator(false));
CompileStandardAndVerify(source, sourceSymbolValidator: symbolValidator(true), symbolValidator: symbolValidator(false));
}
[Fact]
......@@ -1504,7 +1504,7 @@ static void Main()
Assert.Equal(0, parameters[2].GetAttributes(paramAttrType).Count());
};
CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator);
CompileStandardAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator);
}
[Fact]
......@@ -1615,7 +1615,7 @@ static void Main()
}
};
CompileAndVerify(source, sourceSymbolValidator: symbolValidator(false), symbolValidator: symbolValidator(true));
CompileStandardAndVerify(source, sourceSymbolValidator: symbolValidator(false), symbolValidator: symbolValidator(true));
}
[Fact]
......@@ -2119,7 +2119,7 @@ static void Main()
};
// Verify attributes from source and then load metadata to see attributes are written correctly.
var compVerifier = CompileAndVerify(
var compVerifier = CompileStandardAndVerify(
source,
sourceSymbolValidator: attributeValidator,
symbolValidator: attributeValidator,
......@@ -2273,7 +2273,7 @@ public static void Main()
}
}
";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[WorkItem(541071, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541071")]
......@@ -2310,7 +2310,7 @@ static void Main()
}
";
var expectedOutput = @"True";
CompileAndVerify(source, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, expectedOutput: expectedOutput);
}
[Fact]
......@@ -2913,7 +2913,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "");
CompileStandardAndVerify(source, expectedOutput: "");
}
[WorkItem(541856, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541856")]
......@@ -2941,7 +2941,7 @@ public class B
public object[] X;
}
";
CompileAndVerify(source, expectedOutput: "");
CompileStandardAndVerify(source, expectedOutput: "");
}
[WorkItem(541856, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541856")]
......@@ -3020,7 +3020,7 @@ public class I
{
}
";
CompileAndVerify(source, expectedOutput: "");
CompileStandardAndVerify(source, expectedOutput: "");
}
[WorkItem(541859, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541859")]
......@@ -3045,7 +3045,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "int");
CompileStandardAndVerify(source, expectedOutput: "int");
}
[WorkItem(541876, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541876")]
......@@ -3332,7 +3332,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "1");
CompileStandardAndVerify(source, expectedOutput: "1");
}
[WorkItem(542534, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542534")]
......@@ -3713,7 +3713,7 @@ static void Main(string[] args)
}
}
";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[Fact]
......@@ -3869,7 +3869,7 @@ static void Main()
Console.WriteLine(message == UnicodeReplacementCharacter + UnicodeReplacementCharacter);
}
}";
CompileAndVerify(source, expectedOutput: "True");
CompileStandardAndVerify(source, expectedOutput: "True");
}
[WorkItem(546621, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546621")]
......@@ -3991,7 +3991,7 @@ public class C
UnicodeReplacementCharacter + UnicodeReplacementCharacter + UnicodeReplacementCharacter + UnicodeReplacementCharacter);
};
CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false));
CompileStandardAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false));
}
[Fact]
......@@ -4064,7 +4064,7 @@ class C
{
}
";
CompileAndVerify(source, symbolValidator: (m) =>
CompileStandardAndVerify(source, symbolValidator: (m) =>
{
var c = m.GlobalNamespace.GetMember<NamedTypeSymbol>("C");
var attr = c.GetAttributes().Single();
......@@ -4108,7 +4108,7 @@ class C
{
}
";
CompileAndVerify(source, symbolValidator: (m) =>
CompileStandardAndVerify(source, symbolValidator: (m) =>
{
var c = m.GlobalNamespace.GetMember<NamedTypeSymbol>("C");
var attr = c.GetAttributes().Single();
......@@ -4136,7 +4136,7 @@ class C<T>
public void M<[X]U>() { }
}
";
CompileAndVerify(source, symbolValidator: module =>
CompileStandardAndVerify(source, symbolValidator: module =>
{
var @class = module.GlobalNamespace.GetMember<NamedTypeSymbol>("C");
var classTypeParameter = @class.TypeParameters.Single();
......@@ -4968,7 +4968,7 @@ static void Main()
}
}
";
var compilation = CompileAndVerify(source, expectedOutput: "");
var compilation = CompileStandardAndVerify(source, expectedOutput: "");
}
[WorkItem(541858, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541858")]
......@@ -6019,7 +6019,7 @@ partial class C
static partial void F(int y, [A]int z);
}
";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[WorkItem(543456, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543456")]
......@@ -6061,7 +6061,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "1");
CompileStandardAndVerify(source, expectedOutput: "1");
}
[WorkItem(542652, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542652")]
......@@ -6435,7 +6435,7 @@ public class C<T>
public enum E { V }
}";
CompileAndVerify(source, expectedOutput: "");
CompileStandardAndVerify(source, expectedOutput: "");
}
[WorkItem(544512, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544512")]
......@@ -6574,7 +6574,7 @@ class Test
Assert.Equal("Attr2", attrs.Single().AttributeClass.Name);
};
CompileAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator);
CompileStandardAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator);
}
[WorkItem(545499, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/545499")]
......@@ -6716,7 +6716,7 @@ class X: Attribute
{
}
";
CompileAndVerify(source5, additionalRefs: new[] { comp1, comp2 });
CompileStandardAndVerify(source5, additionalRefs: new[] { comp1, comp2 });
// Multiple from PE, multiple from Source
var source6 = @"
......@@ -7323,7 +7323,7 @@ static void WrapEnum(IEnumerable x)
} // namespace
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
- 5 -
- 100 -
- 100000 -
......
......@@ -243,7 +243,7 @@ private void TestConditionAttributeType_SameSource(string condDefs)
{
// Same source file
string testSource = condDefs + s_commonTestSource_ConditionalAttrDefs + s_commonTestSource_ConditionalAttributesApplied;
CompileAndVerify(testSource, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: "");
CompileStandardAndVerify(testSource, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: "");
// Scenario to test Conditional directive stack creation during SyntaxTree.Create, see Devdiv Bug #13846 for details.
CompilationUnitSyntax root = SyntaxFactory.ParseCompilationUnit(testSource);
......@@ -261,11 +261,11 @@ private void TestConditionAttributeType_DifferentSource(string condDefsSrcFile1,
// Different source files, same compilation
var testSources = new[] { source1, source2 };
CompileAndVerify(testSources, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: "");
CompileStandardAndVerify(testSources, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: "");
// Different source files, different compilation
var comp1 = CreateStandardCompilation(source1);
CompileAndVerify(source2, additionalRefs: new[] { comp1.ToMetadataReference() }, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: "");
CompileStandardAndVerify(source2, additionalRefs: new[] { comp1.ToMetadataReference() }, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: "");
}
#endregion
......@@ -454,7 +454,7 @@ private void TestConditionMethods_SameSource(string condDefs)
{
// Same source file
string testSource = condDefs + s_commonTestSource_ConditionalMethodDefs + s_commonTestSource_ConditionalMethodCalls;
CompileAndVerify(testSource, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest);
CompileStandardAndVerify(testSource, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest);
// Scenario to test Conditional directive stack creation during SyntaxTree.Create, see Devdiv Bug #13846 for details.
CompilationUnitSyntax root = SyntaxFactory.ParseCompilationUnit(testSource);
......@@ -472,11 +472,11 @@ private void TestConditionMethods_DifferentSource(string condDefsSrcFile1, strin
// Different source files, same compilation
var testSources = new[] { source1, source2 };
CompileAndVerify(testSources, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest);
CompileStandardAndVerify(testSources, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest);
// Different source files, different compilation
var comp1 = CreateStandardCompilation(source1, assemblyName: Guid.NewGuid().ToString());
CompileAndVerify(source2, additionalRefs: new[] { comp1.ToMetadataReference() }, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest);
CompileStandardAndVerify(source2, additionalRefs: new[] { comp1.ToMetadataReference() }, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest);
}
#endregion
......@@ -641,7 +641,7 @@ class Bar
}
};
CompileAndVerify(source, symbolValidator: validator(false), sourceSymbolValidator: validator(true), expectedOutput: "");
CompileStandardAndVerify(source, symbolValidator: validator(false), sourceSymbolValidator: validator(true), expectedOutput: "");
}
[Fact]
......
......@@ -1043,7 +1043,7 @@ static IEnumerable<dynamic> Goo()
}
}
";
CompileAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
CompileStandardAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
{
var c = module.GlobalNamespace.GetMember<NamedTypeSymbol>("C");
var iterator = c.GetMember<NamedTypeSymbol>("<Goo>d__0");
......@@ -1087,7 +1087,7 @@ static void Main()
}";
// Make sure we emit without errors when dynamic attributes are not present.
CompileAndVerify(source, expectedSignatures: new[]
CompileStandardAndVerify(source, expectedSignatures: new[]
{
Signature(
"C+<>c",
......@@ -1112,7 +1112,7 @@ static void Main()
}
}";
CompileAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, expectedSignatures: new[]
CompileStandardAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, expectedSignatures: new[]
{
Signature(
"C+<>c",
......@@ -1195,7 +1195,7 @@ public void BackingField()
{
static dynamic[] P { get; set; }
}";
CompileAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, expectedSignatures: new[]
CompileStandardAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, expectedSignatures: new[]
{
Signature(
"C",
......@@ -1229,7 +1229,7 @@ static void Main()
F(new object[0]);
}
}";
CompileAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, expectedSignatures: new[]
CompileStandardAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, expectedSignatures: new[]
{
Signature(
"C+<>c__DisplayClass0_0",
......
......@@ -185,7 +185,7 @@ public static void Main()
}
}";
CompileAndVerify(code, verify: Verification.Passes, expectedOutput: "3");
CompileStandardAndVerify(code, verify: Verification.Passes, expectedOutput: "3");
}
[Fact]
......@@ -282,7 +282,7 @@ public void M(in int p)
}
}";
CompileAndVerify(code, verify: Verification.Passes, additionalRefs: new[] { reference }, symbolValidator: module =>
CompileStandardAndVerify(code, verify: Verification.Passes, additionalRefs: new[] { reference }, symbolValidator: module =>
{
var attributeName = AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName;
......
......@@ -51,7 +51,7 @@ public void IsByRefLikeIsWrittenToMetadata_NeedsToBeGenerated()
ref struct S1{}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("S1");
AssertReferencedIsByRefLike(type);
......@@ -68,7 +68,7 @@ class Test
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
AssertReferencedIsByRefLike(type);
......@@ -108,7 +108,7 @@ class Test<T>
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test`1").GetTypeMember("S1");
AssertReferencedIsByRefLike(type);
......@@ -133,7 +133,7 @@ class Test
}
";
CompileAndVerify(codeB, verify: Verification.Passes, additionalRefs: new[] { referenceA }, symbolValidator: module =>
CompileStandardAndVerify(codeB, verify: Verification.Passes, additionalRefs: new[] { referenceA }, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
......@@ -427,7 +427,7 @@ public class Test
public ref struct S1{}
}";
CompileAndVerify(code, verify: Verification.Fails, additionalRefs: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module =>
CompileStandardAndVerify(code, verify: Verification.Fails, additionalRefs: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
......@@ -448,7 +448,7 @@ public class Test1
public ref struct S1{}
}";
var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Passes, symbolValidator: module =>
var comp1 = CompileStandardAndVerify(code1, options: options, verify: Verification.Passes, symbolValidator: module =>
{
AssertGeneratedEmbeddedAttribute(module.ContainingAssembly, AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName);
AssertGeneratedEmbeddedAttribute(module.ContainingAssembly, AttributeDescription.IsByRefLikeAttribute.FullName);
......@@ -460,7 +460,7 @@ public class Test2
public ref struct S1{}
}";
CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), additionalRefs: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module =>
CompileStandardAndVerify(code2, options: options.WithModuleName("Assembly2"), additionalRefs: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module =>
{
AssertGeneratedEmbeddedAttribute(module.ContainingAssembly, AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName);
AssertGeneratedEmbeddedAttribute(module.ContainingAssembly, AttributeDescription.IsByRefLikeAttribute.FullName);
......@@ -481,7 +481,7 @@ class Test
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
Assert.Null(module.ContainingAssembly.GetTypeByMetadataName(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName));
});
......@@ -696,7 +696,7 @@ public class ObsoleteAttribute{}
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
AssertReferencedIsByRefLike(type, hasObsolete: false);
......@@ -738,7 +738,7 @@ class Test
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
Assert.True(type.IsByRefLikeType);
......@@ -785,7 +785,7 @@ class Test
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
Assert.True(type.IsByRefLikeType);
......@@ -846,7 +846,7 @@ public void ObsoleteHasErrorEqualsTrue()
{
var text = @"public ref struct S {}";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("S");
AssertReferencedIsByRefLike(type);
......@@ -980,7 +980,7 @@ namespace System
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("System.TypedReference");
......
......@@ -1119,7 +1119,7 @@ public int Boo(int i)
public class A : Attribute { }
";
CompileAndVerify(source, expectedOutput: "Attribute Count=1").VerifyDiagnostics(
CompileStandardAndVerify(source, expectedOutput: "Attribute Count=1").VerifyDiagnostics(
// (12,6): warning CS0658: 'goo' is not a recognized attribute location. Valid attribute locations for this declaration are 'method, return'. All attributes in this block will be ignored.
Diagnostic(ErrorCode.WRN_InvalidAttributeLocation, "goo").WithArguments("goo", "method, return"));
}
......
......@@ -30,7 +30,7 @@ class Test
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
Assert.True(type.IsReadOnly);
......@@ -49,7 +49,7 @@ public void IsReadOnlyIsWrittenToMetadata_NeedsToBeGenerated()
readonly struct S1{}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("S1");
Assert.True(type.IsReadOnly);
......@@ -67,7 +67,7 @@ class Test
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
Assert.True(type.IsReadOnly);
......@@ -85,7 +85,7 @@ class Test
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test+S1`1");
Assert.True(type.IsReadOnly);
......@@ -103,7 +103,7 @@ class Test<T>
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test`1").GetTypeMember("S1");
Assert.True(type.IsReadOnly);
......@@ -129,7 +129,7 @@ class Test
}
";
CompileAndVerify(codeB, verify: Verification.Passes, additionalRefs: new[] { referenceA }, symbolValidator: module =>
CompileStandardAndVerify(codeB, verify: Verification.Passes, additionalRefs: new[] { referenceA }, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
Assert.True(type.IsReadOnly);
......@@ -423,7 +423,7 @@ public class Test
public readonly struct S1{}
}";
CompileAndVerify(code, verify: Verification.Fails, additionalRefs: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module =>
CompileStandardAndVerify(code, verify: Verification.Fails, additionalRefs: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module =>
{
var type = module.ContainingAssembly.GetTypeByMetadataName("Test").GetTypeMember("S1");
Assert.True(type.IsReadOnly);
......@@ -444,7 +444,7 @@ public class Test1
public readonly struct S1{}
}";
var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Passes, symbolValidator: module =>
var comp1 = CompileStandardAndVerify(code1, options: options, verify: Verification.Passes, symbolValidator: module =>
{
AssertGeneratedEmbeddedAttribute(module.ContainingAssembly, AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName);
AssertGeneratedEmbeddedAttribute(module.ContainingAssembly, AttributeDescription.IsReadOnlyAttribute.FullName);
......@@ -456,7 +456,7 @@ public class Test2
public readonly struct S1{}
}";
CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), additionalRefs: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module =>
CompileStandardAndVerify(code2, options: options.WithModuleName("Assembly2"), additionalRefs: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module =>
{
AssertGeneratedEmbeddedAttribute(module.ContainingAssembly, AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName);
AssertGeneratedEmbeddedAttribute(module.ContainingAssembly, AttributeDescription.IsReadOnlyAttribute.FullName);
......@@ -477,7 +477,7 @@ class Test
}
";
CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(text, verify: Verification.Passes, symbolValidator: module =>
{
Assert.Null(module.ContainingAssembly.GetTypeByMetadataName(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName));
});
......
......@@ -60,7 +60,7 @@ public struct EventDescriptor
}
};
CompileAndVerify(source, symbolValidator: attributeValidator(false), sourceSymbolValidator: attributeValidator(true));
CompileStandardAndVerify(source, symbolValidator: attributeValidator(false), sourceSymbolValidator: attributeValidator(true));
}
[Fact, WorkItem(544956, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544956")]
......@@ -73,7 +73,7 @@ class Goo
[System.Security.SuppressUnmanagedCodeSecurityAttribute]
public static void Main() {}
}";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[WorkItem(544929, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544929")]
......@@ -272,7 +272,7 @@ class MyCodeAccessSecurityAttribute : CodeAccessSecurityAttribute
public static void Main() {}
}
";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[WorkItem(544918, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544918")]
......@@ -417,7 +417,7 @@ class Test
public static void Main() {}
}
";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[WorkItem(544918, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544918")]
......
......@@ -34,7 +34,7 @@ public void Pack()
";
const TypeAttributes typeDefMask = TypeAttributes.StringFormatMask | TypeAttributes.LayoutMask;
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -210,11 +210,11 @@ class Structs
}
};
CompileAndVerify(verifiable, assemblyValidator: validator);
CompileAndVerify(unverifiable, assemblyValidator: validator, verify: Verification.Fails);
CompileStandardAndVerify(verifiable, assemblyValidator: validator);
CompileStandardAndVerify(unverifiable, assemblyValidator: validator, verify: Verification.Fails);
// CLR limitation on type size, not a RefEmit bug:
CompileAndVerify(unloadable, assemblyValidator: validator, verify: Verification.Fails);
CompileStandardAndVerify(unloadable, assemblyValidator: validator, verify: Verification.Fails);
}
[Fact]
......@@ -332,7 +332,7 @@ public class C : B
}
";
// type C can't be loaded
CompileAndVerify(source, verify: Verification.Fails);
CompileStandardAndVerify(source, verify: Verification.Fails);
}
[Fact]
......@@ -352,7 +352,7 @@ public class A
event Action b;
}
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var reader = assembly.GetMetadataReader();
Assert.Equal(2, reader.GetTableRowCount(TableIndex.FieldLayout));
......@@ -615,7 +615,7 @@ public void ReadingFromMetadata()
private void VerifyStructLayout(string source, bool hasInstanceFields)
{
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var reader = assembly.GetMetadataReader();
var type = reader.TypeDefinitions
......
......@@ -168,7 +168,7 @@ class Test
.WithOptimizationLevel(optimizationLevel)
.WithMetadataImportOptions(MetadataImportOptions.All);
CompileAndVerify(source, options: options, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, symbolValidator: module =>
{
var peModule = (PEModuleSymbol)module;
var type = peModule.GlobalNamespace.GetMember<NamedTypeSymbol>("Test");
......@@ -218,7 +218,7 @@ abstract class C
.WithOptimizationLevel(optimizationLevel)
.WithMetadataImportOptions(MetadataImportOptions.All);
CompileAndVerify(source, options: options, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, symbolValidator: module =>
{
var peModule = (PEModuleSymbol)module;
var c = peModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C");
......@@ -563,7 +563,7 @@ public static void Main()
}
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
var attributes = module.ContainingAssembly.GetAttributes();
......@@ -598,7 +598,7 @@ public static void Main()
}
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
var attributes = module.ContainingAssembly.GetAttributes();
......@@ -633,7 +633,7 @@ public static void Main()
}
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
var attributes = module.ContainingAssembly.GetAttributes();
......@@ -668,7 +668,7 @@ public static void Main()
}
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
var attributes = module.ContainingAssembly.GetAttributes();
......@@ -704,7 +704,7 @@ public static void Main()
}
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
VerifyDebuggableAttribute(module.GetAttributes().Single(), optimizationLevel, isSynthesized: false);
......@@ -742,7 +742,7 @@ public static void Main()
}
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
var attributes = module.ContainingAssembly.GetAttributes();
......@@ -777,7 +777,7 @@ public static void Main()
}
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
VerifyCompilationRelaxationsAttribute(module.GetAttributes().Single(), isSynthesized: false);
......@@ -814,7 +814,7 @@ public static void Main()
}
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
VerifyDebuggableAttribute(module.GetAttributes().Single(), options.OptimizationLevel, isSynthesized: false);
......@@ -1105,7 +1105,7 @@ public static void Main()
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, additionalRefs: new[] { reference }, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, additionalRefs: new[] { reference }, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
var attributes = module.ContainingAssembly.GetAttributes();
......@@ -1146,7 +1146,7 @@ public static void Main()
}";
var options = new CSharpCompilationOptions(outputKind, optimizationLevel: optimizationLevel);
CompileAndVerify(source, additionalRefs: new[] { reference }, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
CompileStandardAndVerify(source, additionalRefs: new[] { reference }, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module =>
{
var attributes = module.ContainingAssembly.GetAttributes();
......@@ -1199,7 +1199,7 @@ public static void Main()
{
// Modules security attributes are copied to assemblies they're included in
var moduleReference = ModuleMetadata.CreateFromImage(compilation.EmitToArray()).GetReference();
CompileAndVerify("", additionalRefs: new[] { moduleReference }, symbolValidator: validateSecurity, verify: Verification.Skipped);
CompileStandardAndVerify("", additionalRefs: new[] { moduleReference }, symbolValidator: validateSecurity, verify: Verification.Skipped);
}
else
{
......
......@@ -101,7 +101,7 @@ public class Derived<T> : Outer<(int e1, (int e2, int e3) e4)>.Inner<
[Fact]
public void TestCompile()
{
CompileAndVerify(s_tuplesTestSource,
CompileStandardAndVerify(s_tuplesTestSource,
options: TestOptions.ReleaseDll,
additionalRefs: s_attributeRefs);
}
......@@ -227,7 +227,7 @@ public void RoundTrip()
{
ModuleSymbol sourceModule = null;
ModuleSymbol peModule = null;
CompileAndVerify(s_tuplesTestSource,
CompileStandardAndVerify(s_tuplesTestSource,
options: TestOptions.UnsafeReleaseDll,
additionalRefs: s_attributeRefs,
verify: Verification.Passes,
......@@ -931,7 +931,7 @@ void verifyTupleImpls(NamedTypeSymbol t, string[] tupleNames)
}
}
CompileAndVerify(src,
CompileStandardAndVerify(src,
additionalRefs: new[] { ValueTupleRef, SystemRuntimeFacadeRef },
assemblyValidator: validator,
symbolValidator: symbolValidator);
......@@ -1030,7 +1030,7 @@ void VerifyTupleImpls(NamedTypeSymbol t, string[] tupleNames)
}
}
CompileAndVerify(src,
CompileStandardAndVerify(src,
additionalRefs: new[] { ValueTupleRef, SystemRuntimeFacadeRef },
assemblyValidator: validator,
symbolValidator: symbolValidator);
......
......@@ -413,7 +413,7 @@ class C
#endregion
// Verify attributes from source and then load metadata to see attributes are written correctly.
CompileAndVerify(text, additionalRefs: new[] { SystemRef }, sourceSymbolValidator: attributeValidator);
CompileStandardAndVerify(text, additionalRefs: new[] { SystemRef }, sourceSymbolValidator: attributeValidator);
}
[Fact]
......@@ -460,7 +460,7 @@ public class Bar
Assert.Equal(ConstantValue.Null, constantValue);
};
var comp = CompileAndVerify(source, symbolValidator: verifier);
var comp = CompileStandardAndVerify(source, symbolValidator: verifier);
comp.VerifyDiagnostics();
}
......@@ -603,7 +603,7 @@ public static void Main()
// .custom instance void[mscorlib] System.Runtime.CompilerServices.DateTimeConstantAttribute::.ctor(int64) = ( 01 00 FF FF FF FF FF FF FF FF 00 00 )
// using the native compiler, this code outputs 0
var comp = CompileAndVerify(source, expectedOutput: "0");
var comp = CompileStandardAndVerify(source, expectedOutput: "0");
comp.VerifyDiagnostics();
}
......@@ -634,7 +634,7 @@ public static void Main()
// .custom instance void[mscorlib] System.Runtime.CompilerServices.DateTimeConstantAttribute::.ctor(int64) = ( 01 00 2A 00 00 00 00 00 00 00 00 00 )
// Using the native compiler, the code executes to output 0
var comp = CompileAndVerify(source, expectedOutput: "0");
var comp = CompileStandardAndVerify(source, expectedOutput: "0");
comp.VerifyDiagnostics();
}
......@@ -687,7 +687,7 @@ public static void Main()
";
var ilReference = CompileIL(ilsource);
CompileAndVerify(cssource, expectedOutput: "0", additionalRefs: new[] { ilReference });
CompileStandardAndVerify(cssource, expectedOutput: "0", additionalRefs: new[] { ilReference });
// The native compiler would produce a working exe, but that exe would fail at runtime
}
......@@ -736,7 +736,7 @@ public class CCC
#endregion
CompileAndVerify(
CompileStandardAndVerify(
text,
additionalRefs: new[] { SystemRef },
expectedOutput: @"
......@@ -803,7 +803,7 @@ public void M([DefaultParameterValue((short)1)]int goo)
Assert.Equal(0, ps[0].GetAttributes().Length);
};
CompileAndVerify(source, additionalRefs: new[] { SystemRef }, symbolValidator: verifier);
CompileStandardAndVerify(source, additionalRefs: new[] { SystemRef }, symbolValidator: verifier);
}
[Fact]
......@@ -1013,7 +1013,7 @@ public class C
set { }
}
}";
CompileAndVerify(source, new[] { SystemRef }, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, new[] { SystemRef }, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -1068,7 +1068,7 @@ public void DPV_Optional_Delegates()
";
// Dev11: doesn't allow DPV(null) on int[], we do.
CompileAndVerify(source, new[] { SystemRef }, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, new[] { SystemRef }, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -1158,7 +1158,7 @@ public A([Optional]int[] a)
}
}";
CompileAndVerify(text);
CompileStandardAndVerify(text);
}
[Fact]
......@@ -1179,7 +1179,7 @@ public interface ISomeInterface
}
";
// Dev10 reports CS1909, we don't
CompileAndVerify(text, additionalRefs: new[] { SystemRef });
CompileStandardAndVerify(text, additionalRefs: new[] { SystemRef });
}
[Fact, WorkItem(544934, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544934")]
......@@ -1199,7 +1199,7 @@ static void Main()
Goo();
}
}";
CompileAndVerify(source, additionalRefs: new[] { SystemRef }, expectedOutput: @"5");
CompileStandardAndVerify(source, additionalRefs: new[] { SystemRef }, expectedOutput: @"5");
}
[Fact]
......@@ -1321,7 +1321,7 @@ partial class C
partialValidator(sourceMethod);
};
CompileAndVerify(source, additionalRefs: new[] { SystemRef }, sourceSymbolValidator: sourceValidator);
CompileStandardAndVerify(source, additionalRefs: new[] { SystemRef }, sourceSymbolValidator: sourceValidator);
}
[WorkItem(544303, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544303")]
......@@ -1339,7 +1339,7 @@ public class Goo: Attribute
public static void Main() {}
}";
CompileAndVerify(source, expectedOutput: "");
CompileStandardAndVerify(source, expectedOutput: "");
}
[Fact]
......@@ -1539,7 +1539,7 @@ public static void Main()
}
}
";
CompileAndVerify(source, additionalRefs: new[] { MscorlibRef, SystemRef }, options: TestOptions.ReleaseExe, expectedOutput: "");
CompileStandardAndVerify(source, additionalRefs: new[] { MscorlibRef, SystemRef }, options: TestOptions.ReleaseExe, expectedOutput: "");
}
[Fact, WorkItem(546624, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546624")]
......@@ -1841,7 +1841,7 @@ public static void Main()
}
}
";
CompileAndVerify(source, additionalRefs: new[] { SystemRef }, expectedOutput: @"100200300400");
CompileStandardAndVerify(source, additionalRefs: new[] { SystemRef }, expectedOutput: @"100200300400");
}
[WorkItem(544516, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544516")]
......@@ -1875,7 +1875,7 @@ public static void Main()
}
}";
CompileAndVerify(source, expectedOutput: @"Has DecimalConstantAttribute
CompileStandardAndVerify(source, expectedOutput: @"Has DecimalConstantAttribute
No DecimalConstantAttribute");
}
......@@ -1897,7 +1897,7 @@ public class C
}
}
";
var comp = CompileAndVerify(source, expectedSignatures: new[]
var comp = CompileStandardAndVerify(source, expectedSignatures: new[]
{
Signature("C", "get_Item",
".method public hidebysig specialname instance System.Decimal get_Item(" +
......@@ -1923,7 +1923,7 @@ public void DecimalConstant_Delegates()
public delegate void D([Optional, DecimalConstantAttribute(hi: 3, sign: 2, mid: 4, low: 5, scale: 1)]ref decimal a, decimal b = 2m);
";
var comp = CompileAndVerify(source, expectedSignatures: new[]
var comp = CompileStandardAndVerify(source, expectedSignatures: new[]
{
Signature("D", "BeginInvoke",
".method public hidebysig newslot virtual instance System.IAsyncResult BeginInvoke(" +
......@@ -1966,7 +1966,7 @@ class C
public static void M5(int m, out int n, ref int o) { throw null; }
}
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -2147,7 +2147,7 @@ public void InOutAttributes_Delegates()
public delegate int F([Out]int a, [In]int b, [In, Out]ref int c, [In]ref int d, ref int e, [Out]out int f, out int g);
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -2202,7 +2202,7 @@ public class C
public int this[[Out]int a, [In]int b, [In, Out]int c, int d] { get { return 0; } set { } }
}
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -2259,7 +2259,7 @@ class C
}
}
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -2468,7 +2468,7 @@ class Program
static extern void SurrogatePairMax();
}
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -2523,7 +2523,7 @@ public class C
public static extern void M();
}
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -2614,7 +2614,7 @@ public class C
Assert.Null(n.GetDllImportData());
};
CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false));
CompileStandardAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false));
}
[Fact]
......@@ -2639,7 +2639,7 @@ public class C
public extern static event System.Action G;
}
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -2759,7 +2759,7 @@ public class C
sb.AppendLine("}");
var code = sb.ToString();
CompileAndVerify(code, assemblyValidator: (assembly) =>
CompileStandardAndVerify(code, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
Assert.Equal(cases.Length, metadataReader.GetTableRowCount(TableIndex.ImplMap));
......@@ -2938,7 +2938,7 @@ abstract class C
}
};
CompileAndVerify(source, assemblyValidator: validator);
CompileStandardAndVerify(source, assemblyValidator: validator);
}
[Fact]
......@@ -3113,7 +3113,7 @@ abstract class C
public extern static void f21();
}
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var peReader = assembly.GetMetadataReader();
foreach (var methodHandle in peReader.MethodDefinitions)
......@@ -3188,7 +3188,7 @@ class C
[MethodImpl(MethodImplOptions.PreserveSig)]
public static void f1() { }
}";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[Fact]
......@@ -3259,7 +3259,7 @@ abstract class C
}
";
// Ref.Emit doesn't implement custom attributes yet
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -3291,7 +3291,7 @@ abstract class C
}
";
// Ref.Emit doesn't implement custom attributes yet
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -3383,7 +3383,7 @@ interface I { }
delegate void D();
";
// Ref.Emit doesn't implement custom attributes yet
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -3539,7 +3539,7 @@ public static int Main ()
// the resulting code does not need to verify
// This is consistent with Dev10 behavior
CompileAndVerify(source, options: TestOptions.ReleaseDll, verify: Verification.Fails, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator);
CompileStandardAndVerify(source, options: TestOptions.ReleaseDll, verify: Verification.Fails, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator);
}
[Fact, WorkItem(544507, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544507")]
......@@ -3625,7 +3625,7 @@ public static int Main ()
0";
// Verify attributes from source and then load metadata to see attributes are written correctly.
CompileAndVerify(source, sourceSymbolValidator: attributeValidator(true), symbolValidator: attributeValidator(false), expectedOutput: expectedOutput);
CompileStandardAndVerify(source, sourceSymbolValidator: attributeValidator(true), symbolValidator: attributeValidator(false), expectedOutput: expectedOutput);
}
[Fact]
......@@ -3685,9 +3685,9 @@ public static int Main ()
// Verify attributes from source and then load metadata to see attributes are written correctly.
// Using metadata reference to test RetargetingNamedTypeSymbol CoClass type
CompileAndVerify(source2, additionalRefs: new[] { compDll.ToMetadataReference() }, expectedOutput: expectedOutput);
CompileStandardAndVerify(source2, additionalRefs: new[] { compDll.ToMetadataReference() }, expectedOutput: expectedOutput);
// Using assembly file reference to test PENamedTypeSymbol symbol CoClass type
CompileAndVerify(source2, additionalRefs: new[] { compDll.EmitToImageReference() }, expectedOutput: expectedOutput);
CompileStandardAndVerify(source2, additionalRefs: new[] { compDll.EmitToImageReference() }, expectedOutput: expectedOutput);
}
[Fact]
......@@ -3754,7 +3754,7 @@ public static int Main ()
string expectedOutput = @"string";
// Verify attributes from source and then load metadata to see attributes are written correctly.
CompileAndVerify(source, sourceSymbolValidator: attributeValidator(true), symbolValidator: attributeValidator(false), expectedOutput: expectedOutput);
CompileStandardAndVerify(source, sourceSymbolValidator: attributeValidator(true), symbolValidator: attributeValidator(false), expectedOutput: expectedOutput);
}
[Fact]
......@@ -3793,9 +3793,9 @@ public static int Main ()
// Verify attributes from source and then load metadata to see attributes are written correctly.
// Using metadata reference to test RetargetingNamedTypeSymbol CoClass type
CompileAndVerify(source2, additionalRefs: new[] { compDll.ToMetadataReference() }, expectedOutput: expectedOutput);
CompileStandardAndVerify(source2, additionalRefs: new[] { compDll.ToMetadataReference() }, expectedOutput: expectedOutput);
// Using assembly file reference to test PENamedTypeSymbol symbol CoClass type
CompileAndVerify(source2, additionalRefs: new[] { compDll.EmitToImageReference() }, expectedOutput: expectedOutput);
CompileStandardAndVerify(source2, additionalRefs: new[] { compDll.EmitToImageReference() }, expectedOutput: expectedOutput);
}
[Fact]
......@@ -4180,7 +4180,7 @@ public static int Main ()
return 0;
}
}";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[Fact]
......@@ -4541,7 +4541,7 @@ enum En
[SpecialName]
struct S { }
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -4650,7 +4650,7 @@ enum E
[Serializable]
delegate void D();
";
CompileAndVerify(source, assemblyValidator: (assembly) =>
CompileStandardAndVerify(source, assemblyValidator: (assembly) =>
{
var metadataReader = assembly.GetMetadataReader();
......@@ -4855,7 +4855,7 @@ public bool AllowMultiple
};
// Verify attributes from source and then load metadata to see attributes are written correctly.
CompileAndVerify(source, sourceSymbolValidator: attributeValidator, symbolValidator: attributeValidator);
CompileStandardAndVerify(source, sourceSymbolValidator: attributeValidator, symbolValidator: attributeValidator);
}
[WorkItem(546102, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546102")]
......@@ -4885,7 +4885,7 @@ public bool AllowMultiple
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
class A: Attribute {}
";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[WorkItem(546056, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546056")]
......@@ -5005,7 +5005,7 @@ public static void Main()
";
#endregion
CompileAndVerify(source, additionalRefs: new[] { SystemRef }, expectedOutput: @"System.Reflection.Missing")
CompileStandardAndVerify(source, additionalRefs: new[] { SystemRef }, expectedOutput: @"System.Reflection.Missing")
.VerifyIL("Test.Main", @"{
// Code size 16 (0x10)
.maxstack 2
......@@ -5338,7 +5338,7 @@ class A
// Dev10 Runtime Exception:
// Unhandled Exception: System.TypeLoadException: Windows Runtime types can only be declared in Windows Runtime assemblies.
var verifier = CompileAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator, verify: Verification.Fails);
var verifier = CompileStandardAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator, verify: Verification.Fails);
}
#endregion
......@@ -5395,7 +5395,7 @@ public static void Main()
Assert.True(method.RequiresSecurityObject, "Metadata flag RequiresSecurityObject is not set");
};
CompileAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator, expectedOutput: "");
CompileStandardAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator, expectedOutput: "");
}
#endregion
......@@ -6088,7 +6088,7 @@ class Base: System.Attribute
public class Nested: Goo {}
}
";
CompileAndVerify(source);
CompileStandardAndVerify(source);
source = @"
using System;
......
......@@ -331,7 +331,7 @@ static int Main()
}
";
// Dev10 print '0'
CompileAndVerify(source, expectedOutput: "1");
CompileStandardAndVerify(source, expectedOutput: "1");
}
[WorkItem(529000, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/529000")]
......@@ -374,7 +374,7 @@ public static void Main01()
}
";
CompileAndVerify(source, expectedOutput: "0000");
CompileStandardAndVerify(source, expectedOutput: "0000");
}
[WorkItem(529001, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/529001")]
......@@ -529,7 +529,7 @@ static void Main()
}
";
CompileAndVerify(source, expectedOutput: "OV 9");
CompileStandardAndVerify(source, expectedOutput: "OV 9");
}
[WorkItem(529262, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/529262")]
......@@ -557,7 +557,7 @@ static void Main()
}
}";
// Dev12 would emit "2, 1 | T1, T2 | x, y".
CompileAndVerify(source, expectedOutput: "2, 1 | T, U | x, y");
CompileStandardAndVerify(source, expectedOutput: "2, 1 | T, U | x, y");
}
[Fact, WorkItem(529279, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/529279")]
......@@ -656,7 +656,7 @@ public static void Main()
}
";
// Native compiler picks explicit conversion - print 3
CompileAndVerify(source, expectedOutput: "2");
CompileStandardAndVerify(source, expectedOutput: "2");
}
[Fact, WorkItem(529362, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/529362")]
......@@ -690,7 +690,7 @@ public static void Main()
}
";
// Native compiler picks explicit conversion
CompileAndVerify(source, expectedOutput: "Implicit");
CompileStandardAndVerify(source, expectedOutput: "Implicit");
}
[Fact, WorkItem(529363, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/529363")]
......@@ -1027,7 +1027,7 @@ static void Main()
";
// Native Compiler: x => Convert(Convert(op_Explicit(x)))
CompileAndVerify(text, additionalRefs: new[] { LinqAssemblyRef }, expectedOutput:
CompileStandardAndVerify(text, additionalRefs: new[] { LinqAssemblyRef }, expectedOutput:
@"x => Convert(Convert(Convert(x)))
x => Convert(Convert(Convert(x)))
");
......@@ -1053,7 +1053,7 @@ static void Main()
";
// Native compiler: x => (Convert(x) != Convert(null))
CompileAndVerify(source, additionalRefs: new[] { LinqAssemblyRef }, expectedOutput:
CompileStandardAndVerify(source, additionalRefs: new[] { LinqAssemblyRef }, expectedOutput:
@"x => (Convert(x) != null)
True
");
......@@ -1149,7 +1149,7 @@ public IEnumerable Goo()
}
";
// Native print "++ ++ EX 2"
var verifier = CompileAndVerify(source, expectedOutput: " ++ EX 1");
var verifier = CompileStandardAndVerify(source, expectedOutput: " ++ EX 1");
// must not load "<>4__this"
verifier.VerifyIL("Program.test.<Goo>d__1.System.Collections.IEnumerator.MoveNext()", @"
......@@ -1266,7 +1266,7 @@ static int Main()
}
}
";
CompileAndVerify(source, expectedOutput: "1"); // Native print 0
CompileStandardAndVerify(source, expectedOutput: "1"); // Native print 0
}
[Fact, WorkItem(530614, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530614")]
......@@ -1345,7 +1345,7 @@ static int Main()
}
";
// Native compiler throw
CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: "3");
CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: "3");
}
[Fact, WorkItem(530696, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530696")]
......@@ -1397,7 +1397,7 @@ public void RepeatedObsoleteWarnings()
// without warnings in Dev11 but we will report warnings. I think it's a corner enough scenario and the native
// behavior is quirky enough to warrant a break.
// </quote>
CompileAndVerify(@"
CompileStandardAndVerify(@"
using System;
[Obsolete]
public class ObsoleteType
......@@ -1458,7 +1458,7 @@ static void Main()
[Fact, WorkItem(531014, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/531014")]
public void TestVariableAndTypeNameClashes()
{
CompileAndVerify(@"
CompileStandardAndVerify(@"
using System;
public class Class1
{
......@@ -1523,7 +1523,7 @@ static void Main()
";
// BREAK: Dev11 reports WRN_MultipleRuntimeOverrideMatches, but there
// is no runtime ambiguity because the return types differ.
CompileAndVerify(source, expectedOutput: "Derived.Out");
CompileStandardAndVerify(source, expectedOutput: "Derived.Out");
}
[WorkItem(695311, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/695311")]
......@@ -1712,7 +1712,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "Base.op_FalseBase.op_True");
CompileStandardAndVerify(source, expectedOutput: "Base.op_FalseBase.op_True");
}
}
}
......@@ -24,7 +24,7 @@ public CodeGenAsyncEHTests()
private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, IEnumerable<MetadataReference> references = null, CSharpCompilationOptions options = null)
{
references = (references != null) ? references.Concat(s_asyncRefs) : s_asyncRefs;
return base.CompileAndVerify(source, expectedOutput: expectedOutput, additionalRefs: references, options: options);
return base.CompileStandardAndVerify(source, expectedOutput: expectedOutput, additionalRefs: references, options: options);
}
[Fact]
......@@ -936,7 +936,7 @@ public static void Main()
var expected = @"
2
";
var v = CompileAndVerify(source, s_asyncRefs, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: expected, symbolValidator: module =>
var v = CompileStandardAndVerify(source, s_asyncRefs, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: expected, symbolValidator: module =>
{
Assert.Equal(new[]
{
......
......@@ -24,7 +24,7 @@ public CodeGenAsyncLocalsTests()
private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, IEnumerable<MetadataReference> references = null, CSharpCompilationOptions options = null, Verification verify = Verification.Passes)
{
references = (references != null) ? references.Concat(s_asyncRefs) : s_asyncRefs;
return base.CompileAndVerify(source, expectedOutput: expectedOutput, additionalRefs: references, options: options, verify: verify);
return base.CompileStandardAndVerify(source, expectedOutput: expectedOutput, additionalRefs: references, options: options, verify: verify);
}
private string GetFieldLoadsAndStores(CompilationVerifier c, string qualifiedMethodName)
......@@ -231,7 +231,7 @@ public static async Task M(int x, int y, int z)
y = 1;
}
}";
CompileAndVerify(source, additionalRefs: s_asyncRefs, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
CompileStandardAndVerify(source, additionalRefs: s_asyncRefs, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
{
AssertEx.Equal(new[]
{
......@@ -244,7 +244,7 @@ public static async Task M(int x, int y, int z)
}, module.GetFieldNames("C.<M>d__1"));
});
CompileAndVerify(source, additionalRefs: s_asyncRefs, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
CompileStandardAndVerify(source, additionalRefs: s_asyncRefs, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
{
AssertEx.Equal(new[]
{
......@@ -283,7 +283,7 @@ public async Task M(IDisposable disposable)
lock (this) { }
}
}";
CompileAndVerify(source, s_asyncRefs, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
CompileStandardAndVerify(source, s_asyncRefs, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
{
AssertEx.Equal(new[]
{
......@@ -301,7 +301,7 @@ public async Task M(IDisposable disposable)
}, module.GetFieldNames("C.<M>d__3"));
});
var vd = CompileAndVerify(source, s_asyncRefs, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
var vd = CompileStandardAndVerify(source, s_asyncRefs, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
{
AssertEx.Equal(new[]
{
......@@ -1239,7 +1239,7 @@ public async Task F()
var b8 = await Task.FromResult(default(Tuple<long, long, long>));
}
}";
CompileAndVerify(source, additionalRefs: s_asyncRefs, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
CompileStandardAndVerify(source, additionalRefs: s_asyncRefs, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
{
AssertEx.Equal(new[]
{
......
......@@ -24,7 +24,7 @@ public CodeGenAsyncSpillTests()
private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, IEnumerable<MetadataReference> references = null, CSharpCompilationOptions options = null)
{
references = (references != null) ? references.Concat(s_asyncRefs) : s_asyncRefs;
return base.CompileAndVerify(source, expectedOutput: expectedOutput, additionalRefs: references, options: options);
return base.CompileStandardAndVerify(source, expectedOutput: expectedOutput, additionalRefs: references, options: options);
}
[Fact]
......@@ -944,7 +944,7 @@ public static async Task<int> F(int[] array)
}
}
";
CompileAndVerify(source, additionalRefs: s_asyncRefs, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
CompileStandardAndVerify(source, additionalRefs: s_asyncRefs, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
{
AssertEx.Equal(new[]
{
......@@ -959,7 +959,7 @@ public static async Task<int> F(int[] array)
}, module.GetFieldNames("C.<F>d__3"));
});
CompileAndVerify(source, additionalRefs: s_asyncRefs, verify: Verification.Passes, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
CompileStandardAndVerify(source, additionalRefs: s_asyncRefs, verify: Verification.Passes, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
{
AssertEx.Equal(new[]
{
......
......@@ -1957,7 +1957,7 @@ static void Main()
t.Run(6);
}
}";
CompileAndVerify(source, new[] { CSharpRef, SystemCoreRef });
CompileStandardAndVerify(source, new[] { CSharpRef, SystemCoreRef });
}
[Fact]
......
......@@ -38,7 +38,7 @@ public static int Minus(int a)
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.Add", @"
{
......@@ -112,7 +112,7 @@ public static long Minus(uint a)
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.Add", @"
{
......@@ -210,7 +210,7 @@ public static E PreDec(E e)
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.Add1", @"
{
......@@ -383,7 +383,7 @@ public static long Sub_Ptr(C* a, C* b)
}
}
";
var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails);
var verifier = CompileStandardAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails);
// NOTE: unsigned addition
verifier.VerifyIL("C.Add_Int1", @"
......@@ -603,7 +603,7 @@ static bool LocalInc()
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.Local", @"
{
......@@ -672,7 +672,7 @@ public static int PreDec(int a)
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.PostInc", @"
{
......@@ -758,7 +758,7 @@ public static int Rem(int a, int b)
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.Add", @"
{
......@@ -839,7 +839,7 @@ public static int Add(short a)
}
}";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.Add", @"
{
......@@ -896,7 +896,7 @@ public static int PreInc(short a)
checked { return s++; }
}
}";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.PostIncUserDefined", @"
{
......@@ -983,7 +983,7 @@ public static int[] ArraySize(long size)
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.ArraySize", @"
{
......@@ -1037,7 +1037,7 @@ static void ForEachMultiDimArray()
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.ForEachString", @"
{
......@@ -1193,7 +1193,7 @@ public static int Rem(int a, int b)
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.Add", @"
{
......@@ -1289,7 +1289,7 @@ public static short Enum_Short(E a)
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("C.SByte_UInt", @"
{
......@@ -1330,7 +1330,7 @@ .maxstack 1
[Fact]
public void Lambda_Statement()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static void F()
......@@ -1359,7 +1359,7 @@ .maxstack 2
[Fact]
public void Lambda_QueryStmt()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
using System.Linq;
class C
......@@ -1387,7 +1387,7 @@ .maxstack 2
[Fact]
public void Lambda_QueryExpr()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
using System.Linq;
class C
......@@ -1412,7 +1412,7 @@ .maxstack 2
[Fact]
public void Lambda_AddOvfAssignment()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static void F()
......@@ -1439,7 +1439,7 @@ .maxstack 2
[Fact]
public void Lambda_Add()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static void F()
......@@ -1465,7 +1465,7 @@ .maxstack 2
[Fact]
public void Lambda_Cast()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static void F()
......@@ -1491,7 +1491,7 @@ .maxstack 2
[Fact]
public void Lambda_AddOvfCompoundAssignment()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static void F()
......@@ -1518,7 +1518,7 @@ .maxstack 2
[Fact]
public void Lambda_AddOvfArgument()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1546,7 +1546,7 @@ .maxstack 2
[Fact]
public void Lambda_AddOvfArgument2()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1574,7 +1574,7 @@ .maxstack 2
[Fact]
public void Lambda_AddArgument3()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1602,7 +1602,7 @@ .maxstack 2
[Fact]
public void Lambda_AddOvfArgument4()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1631,7 +1631,7 @@ .maxstack 2
[Fact]
public void Lambda_AddOvfArgument5()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1659,7 +1659,7 @@ .maxstack 2
[Fact]
public void Lambda_AddArgument6()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1687,7 +1687,7 @@ .maxstack 2
[Fact]
public void Lambda_AddArgument7()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1715,7 +1715,7 @@ .maxstack 2
[Fact]
public void Lambda_AddOvfArgument8()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1743,7 +1743,7 @@ .maxstack 2
[Fact]
public void Lambda_LambdaVsDelegate1()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static void F()
......@@ -1767,7 +1767,7 @@ .maxstack 2
[Fact]
public void Lambda_LambdaVsDelegate2()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static void F()
......@@ -1790,7 +1790,7 @@ .maxstack 2
[Fact]
public void Lambda_LambdaVsDelegate3()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static void F()
......@@ -1813,7 +1813,7 @@ .maxstack 2
[Fact]
public void Lambda_NewDelegate1()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1838,7 +1838,7 @@ .maxstack 2
[Fact]
public void Lambda_NewDelegate2()
{
var verifier = CompileAndVerify(@"
var verifier = CompileStandardAndVerify(@"
class C
{
static System.Func<int, int> Id(System.Func<int, int> x) { return x; }
......@@ -1872,7 +1872,7 @@ public static uint ULong_UInt(ulong a)
}
}
";
CompileAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(true)).VerifyIL("C.ULong_UInt", @"
CompileStandardAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(true)).VerifyIL("C.ULong_UInt", @"
{
// Code size 3 (0x3)
.maxstack 1
......@@ -1881,7 +1881,7 @@ .maxstack 1
IL_0002: ret
}
");
CompileAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(false)).VerifyIL("C.ULong_UInt", @"
CompileStandardAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(false)).VerifyIL("C.ULong_UInt", @"
{
// Code size 3 (0x3)
.maxstack 1
......@@ -1904,7 +1904,7 @@ public static uint ULong_UInt(ulong a)
}
}
";
CompileAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(true)).VerifyIL("C.ULong_UInt", @"
CompileStandardAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(true)).VerifyIL("C.ULong_UInt", @"
{
// Code size 3 (0x3)
.maxstack 1
......@@ -1932,7 +1932,7 @@ public static uint ULong_UInt(ulong a)
}
}
";
CompileAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(true)).VerifyIL("C.ULong_UInt", @"
CompileStandardAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(true)).VerifyIL("C.ULong_UInt", @"
{
// Code size 9 (0x9)
.maxstack 3
......@@ -1959,7 +1959,7 @@ class Test
const int b = unchecked((int)0x80000000);
}
";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[Fact]
......@@ -2018,7 +2018,7 @@ static void Main()
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("Program.Main", @"
{
......@@ -2065,7 +2065,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "0");
CompileStandardAndVerify(source, expectedOutput: "0");
}
[Fact]
......@@ -2084,7 +2084,7 @@ public static void Main()
}
";
CompileAndVerify(
CompileStandardAndVerify(
source,
expectedOutput: "32000");
}
......@@ -2189,7 +2189,7 @@ static void Main()
}
";
CompileAndVerify(
CompileStandardAndVerify(
source,
expectedOutput: "PASS");
}
......@@ -2221,7 +2221,7 @@ static void Main()
}
";
CompileAndVerify(
CompileStandardAndVerify(
source,
expectedOutput: "PASS");
}
......@@ -2267,7 +2267,7 @@ static int Main()
}
";
CompileAndVerify(
CompileStandardAndVerify(
source,
expectedOutput: "OV-0");
}
......@@ -2298,7 +2298,7 @@ public static void Main()
}
}
";
CompileAndVerify(
CompileStandardAndVerify(
source,
expectedOutput: "32000OV");
}
......@@ -2332,7 +2332,7 @@ public void inc()
}
}
";
var verifier = CompileAndVerify(source);
var verifier = CompileStandardAndVerify(source);
verifier.VerifyIL("Derived2.inc", @"
{
......
......@@ -35,7 +35,7 @@ static void Main()
System.Console.Write(Tester(false)().GetType());
}
}";
var verify = CompileAndVerify(src,
var verify = CompileStandardAndVerify(src,
options: TestOptions.DebugExe,
expectedOutput: "C");
verify.VerifyIL("C.Tester", @"
......@@ -72,7 +72,7 @@ .locals init (System.Func<I> V_0)
}
");
verify = CompileAndVerify(src,
verify = CompileStandardAndVerify(src,
expectedOutput: "C");
verify.VerifyIL("C.Tester", @"
{
......@@ -159,7 +159,7 @@ static void Main()
System.Console.Write(Tester(1)().GetType());
}
}";
var verify = CompileAndVerify(src,
var verify = CompileStandardAndVerify(src,
options: TestOptions.DebugExe,
expectedOutput: "A");
verify.VerifyIL("C.Tester", @"
......@@ -209,7 +209,7 @@ .locals init (System.Func<I> V_0)
IL_006e: ret
}
");
verify = CompileAndVerify(src,
verify = CompileStandardAndVerify(src,
expectedOutput: "A");
verify.VerifyIL("C.Tester", @"
{
......@@ -285,7 +285,7 @@ static void Main()
System.Console.Write(Tester(-1)().GetType());
}
}";
var verify = CompileAndVerify(src,
var verify = CompileStandardAndVerify(src,
options: TestOptions.DebugExe,
expectedOutput: "B");
verify.VerifyIL("C.Tester", @"
......@@ -335,7 +335,7 @@ .locals init (System.Func<I> V_0)
IL_006e: ret
}
");
verify = CompileAndVerify(src,
verify = CompileStandardAndVerify(src,
expectedOutput: "B");
verify.VerifyIL("C.Tester", @"
{
......@@ -414,7 +414,7 @@ static void Main()
System.Console.Write(Tester(-2)().GetType());
}
}";
var verify = CompileAndVerify(src,
var verify = CompileStandardAndVerify(src,
options: TestOptions.DebugExe,
expectedOutput: "D");
verify.VerifyIL("C.Tester", @"
......@@ -477,7 +477,7 @@ .locals init (System.Func<I> V_0)
IL_0093: ret
}
");
verify = CompileAndVerify(src,
verify = CompileStandardAndVerify(src,
expectedOutput: "D");
verify.VerifyIL("C.Tester", @"
{
......@@ -563,7 +563,7 @@ static void Main()
System.Console.Write(Tester(1, 0).GetType());
}
}";
var verify = CompileAndVerify(src,
var verify = CompileStandardAndVerify(src,
options: TestOptions.DebugExe,
expectedOutput: "C");
verify.VerifyIL("C.Tester", @"
......@@ -594,7 +594,7 @@ .maxstack 1
IL_0024: ret
}");
// Optimized
verify = CompileAndVerify(src,
verify = CompileStandardAndVerify(src,
expectedOutput: "C");
verify.VerifyIL("C.Tester", @"
{
......@@ -647,7 +647,7 @@ static void Main()
System.Console.Write(Tester(0).GetType());
}
}";
var verify = CompileAndVerify(src,
var verify = CompileStandardAndVerify(src,
options: TestOptions.DebugExe,
expectedOutput: "B");
verify.VerifyIL("C.Tester", @"
......@@ -680,7 +680,7 @@ .maxstack 2
IL_0026: ret
}");
// Optimized
verify = CompileAndVerify(src,
verify = CompileStandardAndVerify(src,
expectedOutput: "B");
verify.VerifyIL("C.Tester", @"
{
......@@ -737,7 +737,7 @@ static void Main()
System.Console.Write(Tester(1).GetType());
}
}";
var verify = CompileAndVerify(src,
var verify = CompileStandardAndVerify(src,
options: TestOptions.DebugExe,
expectedOutput: "A");
verify.VerifyIL("C.Tester", @"
......@@ -776,7 +776,7 @@ .maxstack 2
IL_0032: ret
}");
// Optimized
verify = CompileAndVerify(src,
verify = CompileStandardAndVerify(src,
expectedOutput: "A");
verify.VerifyIL("C.Tester", @"
{
......@@ -843,7 +843,7 @@ static void Main()
System.Console.Write(Tester(0).GetType());
}
}";
var verify = CompileAndVerify(src,
var verify = CompileStandardAndVerify(src,
options: TestOptions.DebugExe,
expectedOutput: "D");
verify.VerifyIL("C.Tester", @"
......@@ -883,7 +883,7 @@ .maxstack 2
IL_0033: ret
}");
// Optimized
verify = CompileAndVerify(src,
verify = CompileStandardAndVerify(src,
expectedOutput: "D");
verify.VerifyIL("C.Tester", @"
{
......@@ -930,7 +930,7 @@ static void Main()
System.Console.WriteLine(b ? 1 : 2);
}
}";
var comp = CompileAndVerify(source, expectedOutput: "1");
var comp = CompileStandardAndVerify(source, expectedOutput: "1");
comp.VerifyDiagnostics();
comp.VerifyIL("C.Main", @"{
// Code size 13 (0xd)
......@@ -959,7 +959,7 @@ static void Main()
System.Console.WriteLine(false ? x : y);
}
}";
var comp = CompileAndVerify(source, expectedOutput: @"
var comp = CompileStandardAndVerify(source, expectedOutput: @"
1
2");
comp.VerifyDiagnostics();
......@@ -992,7 +992,7 @@ static void Main()
System.Console.WriteLine(s2);
}
}";
var comp = CompileAndVerify(source);
var comp = CompileStandardAndVerify(source);
comp.VerifyDiagnostics();
comp.VerifyIL("C.Main", @"
{
......@@ -1032,7 +1032,7 @@ static void Main()
}
}";
// NOTE: this is slightly different from the Dev10 IL, which caches the lambdas in static fields
var comp = CompileAndVerify(source);
var comp = CompileStandardAndVerify(source);
comp.VerifyDiagnostics();
comp.VerifyIL("C.Main", @"
{
......@@ -1098,7 +1098,7 @@ static int M()
return 0;
}
}";
var comp = CompileAndVerify(source);
var comp = CompileStandardAndVerify(source);
comp.VerifyDiagnostics();
comp.VerifyIL("C.Main", @"
{
......@@ -1144,7 +1144,7 @@ static void Main()
}
}";
// NOTE: second call is to Write(uint)
var comp = CompileAndVerify(source, expectedOutput: "00");
var comp = CompileStandardAndVerify(source, expectedOutput: "00");
comp.VerifyDiagnostics();
comp.VerifyIL("C.Main", @"
{
......@@ -1197,7 +1197,7 @@ static void Main()
}
}";
// NOTE: second call is to Write(uint)
var comp = CompileAndVerify(source, expectedOutput: @"
var comp = CompileStandardAndVerify(source, expectedOutput: @"
first attempt: System.Type[]
second attempt: System.Type[]");
comp.VerifyDiagnostics();
......@@ -1257,7 +1257,7 @@ static void Main()
}";
// Note the explicit casts, even though the conversions are
// implicit reference conversions.
var comp = CompileAndVerify(source);
var comp = CompileStandardAndVerify(source);
comp.VerifyDiagnostics();
comp.VerifyIL("Test.Main", @"
{
......@@ -1303,7 +1303,7 @@ static void Main()
}";
// Note the explicit casts, even though the conversions are
// implicit reference conversions.
var comp = CompileAndVerify(source);
var comp = CompileStandardAndVerify(source);
comp.VerifyDiagnostics();
comp.VerifyIL("Test.Main", @"
{
......@@ -1345,7 +1345,7 @@ public Test1(Base link)
public Base m1() { return ((++cnt) & Driver.mask) != 0 ? same : next; } //version1 (explicit impl in original repro)
public Base m2() { return ((++cnt) & Driver.mask) != 0 ? this : next; } //version2
}";
var comp = CompileAndVerify(source);
var comp = CompileStandardAndVerify(source);
comp.VerifyDiagnostics();
comp.VerifyIL("Test1.m1", @"
{
......@@ -1423,7 +1423,7 @@ public static void g(bool p)
// implicit reference conversions.
// CONSIDER: dev10 writes to/reads from a temp to simulate
// a static cast (instead of using castclass).
var comp = CompileAndVerify(source);
var comp = CompileStandardAndVerify(source);
comp.VerifyDiagnostics();
comp.VerifyIL("MainClass.g", @"
{
......@@ -1468,7 +1468,7 @@ static void Main(string[] args)
string expectedOutput = @"aaa
bbb
ccc";
CompileAndVerify(source, additionalRefs: new[] { LinqAssemblyRef }, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, additionalRefs: new[] { LinqAssemblyRef }, expectedOutput: expectedOutput);
}
[Fact]
......@@ -1504,7 +1504,7 @@ class Goo
1
4
4";
CompileAndVerify(source, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, expectedOutput: expectedOutput);
}
[Fact]
......@@ -1537,7 +1537,7 @@ class Goo
";
string expectedOutput = @"10
-10";
CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: expectedOutput);
}
[Fact]
......@@ -1557,7 +1557,7 @@ static void Main(string[] args)
}
";
string expectedOutput = @"100";
CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: expectedOutput);
}
[Fact]
......@@ -1588,7 +1588,7 @@ public struct TestStruct
}
";
string expectedOutput = @"10";
CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: expectedOutput);
}
[Fact]
......@@ -1611,7 +1611,7 @@ .maxstack 1
IL_0001: call ""void System.Console.WriteLine(int)""
IL_0006: ret
}";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
}
[WorkItem(528275, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/528275")]
......@@ -1645,7 +1645,7 @@ .maxstack 4
// Dev11 compiler reports WRN_UnreachableExpr, but reachability is defined for statements not for expressions.
// We don't report the warning.
CompileAndVerify(source, additionalRefs: metadataRef, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL).VerifyDiagnostics();
CompileStandardAndVerify(source, additionalRefs: metadataRef, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL).VerifyDiagnostics();
}
[Fact]
......@@ -1693,7 +1693,7 @@ .maxstack 2
IL_0036: call ""void System.Console.WriteLine(decimal)""
IL_003b: ret
}";
CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef }).VerifyIL("Program.Main", expectedIL);
CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef }).VerifyIL("Program.Main", expectedIL);
}
[Fact, WorkItem(530071, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530071")]
......@@ -1718,7 +1718,7 @@ static void Main(string[] args)
3";
// Dev11 compiler reports WRN_UnreachableExpr, but reachability is defined for statements not for expressions.
// We don't report the warning.
CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: expectedOutput).
CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef }, expectedOutput: expectedOutput).
VerifyDiagnostics();
}
......@@ -1742,7 +1742,7 @@ .maxstack 1
IL_0000: ldc.i4.2
IL_0001: ret
}";
CompileAndVerify(source).VerifyIL("Program.Main", expectedIL);
CompileStandardAndVerify(source).VerifyIL("Program.Main", expectedIL);
}
[Fact]
......@@ -1769,7 +1769,7 @@ .maxstack 1
IL_0009: ldc.i4.1
IL_000a: ret
}";
CompileAndVerify(source).VerifyIL("Program.Main", expectedIL);
CompileStandardAndVerify(source).VerifyIL("Program.Main", expectedIL);
}
[Fact]
......@@ -1800,7 +1800,7 @@ .maxstack 1
IL_000b: call ""void System.Console.WriteLine(object)""
IL_0010: ret
}";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
}
[Fact]
......@@ -1845,7 +1845,7 @@ .maxstack 1
IL_0024: ret
}
";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
}
[Fact]
......@@ -1863,7 +1863,7 @@ static void Main(string[] args)
}
";
string expectedOutput = @"2";
CompileAndVerify(source, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, expectedOutput: expectedOutput);
}
[Fact]
......@@ -1895,7 +1895,7 @@ .maxstack 1
IL_000f: call ""void System.Console.WriteLine(string)""
IL_0014: ret
}";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.fun", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.fun", expectedIL);
}
[Fact]
......@@ -1940,7 +1940,7 @@ .locals init (bool V_0)
IL_0012: call ""void System.Console.WriteLine(bool)""
IL_0017: ret
}";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.fun", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.fun", expectedIL);
}
[Fact]
......@@ -1984,7 +1984,7 @@ .locals init (bool V_0)
IL_001a: call ""void System.Console.WriteLine(bool)""
IL_001f: ret
}";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.fun", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.fun", expectedIL);
}
[Fact]
......@@ -2037,7 +2037,7 @@ .maxstack 2
IL_0020: call ""void System.Console.Write(string)""
IL_0025: ret
}";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
}
[Fact]
......@@ -2111,7 +2111,7 @@ .maxstack 3
IL_004b: call ""void System.Console.Write(string)""
IL_0050: ret
}";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL);
}
[Fact(), WorkItem(543609, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543609")]
......@@ -2164,7 +2164,7 @@ .maxstack 3
IL_0017: stloc.1
IL_0018: ret
}";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Class1.Main", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Class1.Main", expectedIL);
}
[Fact(), WorkItem(638289, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/638289")]
......@@ -2194,7 +2194,7 @@ static void Main()
System.Console.Write(Tester(null).GetType());
}
}";
var verify = CompileAndVerify(src,
var verify = CompileStandardAndVerify(src,
options: TestOptions.DebugExe,
expectedOutput: "C");
verify.VerifyIL("C.Tester", @"
......@@ -2225,7 +2225,7 @@ .maxstack 2
IL_001f: ret
}");
// Optimized
verify = CompileAndVerify(src,
verify = CompileStandardAndVerify(src,
expectedOutput: "C");
verify.VerifyIL("C.Tester",
@"
......@@ -2296,7 +2296,7 @@ .maxstack 2
IL_000a: ret
}
";
CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Class1.Main", expectedIL);
CompileStandardAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Class1.Main", expectedIL);
}
[Fact, WorkItem(12439, "https://github.com/dotnet/roslyn/issues/12439")]
......@@ -2323,7 +2323,7 @@ static void Where<TSource>()
}
}";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[Fact, WorkItem(12439, "https://github.com/dotnet/roslyn/issues/12439")]
......@@ -2350,7 +2350,7 @@ static IEnumerable<int> Where<TSource>()
}
}";
CompileAndVerify(source);
CompileStandardAndVerify(source);
}
[Fact, WorkItem(17756, "https://github.com/dotnet/roslyn/issues/17756")]
......@@ -2398,7 +2398,7 @@ static void Main()
1
1
1";
CompileAndVerify(source, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, expectedOutput: expectedOutput);
}
[Fact, WorkItem(17756, "https://github.com/dotnet/roslyn/issues/17756")]
......@@ -2432,7 +2432,7 @@ unsafe static void Main()
";
string expectedOutput = @"1
1";
CompileAndVerify(source, expectedOutput: expectedOutput, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails);
CompileStandardAndVerify(source, expectedOutput: expectedOutput, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails);
}
[Fact, WorkItem(17756, "https://github.com/dotnet/roslyn/issues/17756")]
......@@ -2469,13 +2469,13 @@ static void Main()
";
string expectedOutput = @"1
1";
CompileAndVerify(source, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, expectedOutput: expectedOutput);
}
[Fact]
public void RefReadonlyConditional()
{
var comp = CompileAndVerify(@"
var comp = CompileStandardAndVerify(@"
using System;
struct S
......@@ -2706,7 +2706,7 @@ public void Mutate()
string expectedOutput = @"2
2
2";
var verify = CompileAndVerify(source, expectedOutput: expectedOutput);
var verify = CompileStandardAndVerify(source, expectedOutput: expectedOutput);
verify.VerifyIL("Program.Main",
@"
......
......@@ -23,7 +23,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: string.Empty).
CompileStandardAndVerify(source, expectedOutput: string.Empty).
VerifyIL("C..ctor", @"
{
// Code size 7 (0x7)
......@@ -51,7 +51,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: string.Empty).
CompileStandardAndVerify(source, expectedOutput: string.Empty).
VerifyIL("C..ctor", @"
{
// Code size 7 (0x7)
......@@ -79,7 +79,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: string.Empty).
CompileStandardAndVerify(source, expectedOutput: string.Empty).
VerifyIL("C..ctor", @"
{
// Code size 7 (0x7)
......@@ -111,7 +111,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: string.Empty).
CompileStandardAndVerify(source, expectedOutput: string.Empty).
VerifyIL("C..ctor", @"
{
// Code size 8 (0x8)
......@@ -151,7 +151,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: string.Empty).
CompileStandardAndVerify(source, expectedOutput: string.Empty).
VerifyIL("C..ctor", @"
{
// Code size 8 (0x8)
......@@ -188,7 +188,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: string.Empty).
CompileStandardAndVerify(source, expectedOutput: string.Empty).
VerifyIL("C..ctor", @"
{
// Code size 8 (0x8)
......@@ -260,7 +260,7 @@ public static int Init(int value, string message)
}
";
//interested in execution order and number of field initializations
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
C.f
B.f
B()
......@@ -297,7 +297,7 @@ static void Main(string[] args)
}
";
var expectedOutput = @"True";
CompileAndVerify(text, expectedOutput: expectedOutput);
CompileStandardAndVerify(text, expectedOutput: expectedOutput);
}
[Fact]
......@@ -320,7 +320,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "42").
CompileStandardAndVerify(source, expectedOutput: "42").
VerifyIL("C..ctor", @"
{
// Code size 15 (0xf)
......@@ -357,7 +357,7 @@ public static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "42").
CompileStandardAndVerify(source, expectedOutput: "42").
VerifyIL("S..ctor", @"
{
// Code size 21 (0x15)
......@@ -398,7 +398,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "42").
CompileStandardAndVerify(source, expectedOutput: "42").
VerifyIL("C..ctor(int)", @"
{
// Code size 40 (0x28)
......@@ -446,7 +446,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "42").
CompileStandardAndVerify(source, expectedOutput: "42").
VerifyIL("C..cctor()", @"
{
// Code size 35 (0x23)
......@@ -481,7 +481,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: @"123
CompileStandardAndVerify(source, expectedOutput: @"123
123").
VerifyIL("C..cctor()", @"
{
......@@ -513,7 +513,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: @"123
CompileStandardAndVerify(source, expectedOutput: @"123
123").
VerifyIL("C..cctor()", @"
{
......@@ -563,7 +563,7 @@ public class ClassWithStaticField
}
}
";
CompileAndVerify(source, expectedOutput: "3").
CompileStandardAndVerify(source, expectedOutput: "3").
VerifyIL("ClassWithStaticField..cctor", @"
{
// Code size 74 (0x4a)
......
......@@ -74,7 +74,7 @@ public static void Main(string[] args)
}
}
";
var compilationVerifier = CompileAndVerify(source, expectedOutput: @"");
var compilationVerifier = CompileStandardAndVerify(source, expectedOutput: @"");
}
[Fact]
......@@ -109,7 +109,7 @@ static void Goo<T>(J<T> x)
}
}
";
var compilationVerifier = CompileAndVerify(source, expectedOutput: @"Goo<T>(J<T> x)
var compilationVerifier = CompileStandardAndVerify(source, expectedOutput: @"Goo<T>(J<T> x)
");
}
......@@ -144,7 +144,7 @@ public static void Main(string[] args)
g1.M();
}
}";
CompileAndVerify(csSource, expectedOutput: "hello");
CompileStandardAndVerify(csSource, expectedOutput: "hello");
}
[WorkItem(544427, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544427")]
......@@ -168,7 +168,7 @@ static void Main()
{
}
}";
var compilation = CompileAndVerify(text);
var compilation = CompileStandardAndVerify(text);
compilation.VerifyIL("Test.M",
@"{
// Code size 13 (0xd)
......@@ -275,7 +275,7 @@ public static void Main()
";
// When the method with the attribute is in source.
var verifier1 = CompileAndVerify(source1 + source2, expectedOutput: expectedOutput);
var verifier1 = CompileStandardAndVerify(source1 + source2, expectedOutput: expectedOutput);
// When the method with the attribute is from metadata.
var comp2 = CreateStandardCompilation(source2, new[] { MetadataReference.CreateFromImage(verifier1.EmittedAssemblyData) }, TestOptions.ReleaseExe);
......@@ -373,7 +373,7 @@ public static void Main()
";
// When the method with the attribute is in source.
var verifier1 = CompileAndVerify(source1 + source2, expectedOutput: expectedOutput);
var verifier1 = CompileStandardAndVerify(source1 + source2, expectedOutput: expectedOutput);
// When the method with the attribute is from metadata.
var comp2 = CreateStandardCompilation(source2, new[] { MetadataReference.CreateFromImage(verifier1.EmittedAssemblyData) }, TestOptions.ReleaseExe);
......@@ -398,7 +398,7 @@ static void Main()
{
}
}";
var compilation = CompileAndVerify(text);
var compilation = CompileStandardAndVerify(text);
compilation.VerifyIL("Program.Test(decimal)",
@"
{
......@@ -444,7 +444,7 @@ private static float Mul2(float arg)
}
}
";
var compilation = CompileAndVerify(text);
var compilation = CompileStandardAndVerify(text);
compilation.VerifyIL("Program.Test2(float)",
@"
{
......@@ -492,7 +492,7 @@ private static float Mul2(float arg)
}
}
";
var compilation = CompileAndVerify(text);
var compilation = CompileStandardAndVerify(text);
compilation.VerifyIL("Program.Test2(float)",
@"
{
......@@ -536,7 +536,7 @@ class MyClass
}
}
";
var compilation = CompileAndVerify(text, expectedOutput: "Value is: 1");
var compilation = CompileStandardAndVerify(text, expectedOutput: "Value is: 1");
compilation.VerifyIL("Class1.Main()",
@"
{
......@@ -595,7 +595,7 @@ class MyClass
}
}
";
var compilation = CompileAndVerify(text, expectedOutput: "Value is: 1");
var compilation = CompileStandardAndVerify(text, expectedOutput: "Value is: 1");
compilation.VerifyIL("Class1.Main()",
@"
{
......@@ -643,7 +643,7 @@ class MyClass
}
}
";
var compilation = CompileAndVerify(text, expectedOutput: "Value is: 1");
var compilation = CompileStandardAndVerify(text, expectedOutput: "Value is: 1");
compilation.VerifyIL("Class1.Main()",
@"
{
......@@ -705,7 +705,7 @@ public enum E { }
}
";
var compilation = CompileAndVerify(source, expectedOutput: "TrueTrue");
var compilation = CompileStandardAndVerify(source, expectedOutput: "TrueTrue");
compilation.VerifyIL("Program.Goo<T>(G<T>.E, G<int>.E)",
@"
{
......@@ -771,7 +771,7 @@ static void Main()
}
";
var compilation = CompileAndVerify(source);
var compilation = CompileStandardAndVerify(source);
compilation.VerifyIL("C.Main()",
@"
{
......@@ -809,7 +809,7 @@ static void Main(string[] args)
}
";
CompileAndVerify(source, expectedOutput:
CompileStandardAndVerify(source, expectedOutput:
@"
42");
}
......@@ -836,7 +836,7 @@ static void Main()
}
";
CompileAndVerify(source, expectedOutput:
CompileStandardAndVerify(source, expectedOutput:
@"
42
......@@ -863,7 +863,7 @@ static void Main()
}
";
var compilation = CompileAndVerify(source);
var compilation = CompileStandardAndVerify(source);
compilation.VerifyIL("C.Main()", @"
{
// Code size 32 (0x20)
......@@ -898,7 +898,7 @@ static void Test()
}
}";
var compilation = CompileAndVerify(source);
var compilation = CompileStandardAndVerify(source);
compilation.VerifyIL("C.Test()", @"
{
// Code size 31 (0x1f)
......@@ -933,7 +933,7 @@ static void Test()
}
}";
var compilation = CompileAndVerify(source);
var compilation = CompileStandardAndVerify(source);
compilation.VerifyIL("C.Test()", @"
{
// Code size 32 (0x20)
......@@ -970,7 +970,7 @@ static void Test()
}
}";
var compilation = CompileAndVerify(source);
var compilation = CompileStandardAndVerify(source);
compilation.VerifyIL("C.Test()", @"
{
// Code size 24 (0x18)
......@@ -1007,7 +1007,7 @@ static void Main()
}
";
var compilation = CompileAndVerify(source);
var compilation = CompileStandardAndVerify(source);
compilation.VerifyIL("C.Main()",
@"
{
......@@ -1093,7 +1093,7 @@ static void Main()
}
";
string expectedOutput = @"1";
CompileAndVerify(source, expectedOutput: expectedOutput);
CompileStandardAndVerify(source, expectedOutput: expectedOutput);
}
[Fact, WorkItem(22533, "https://github.com/dotnet/roslyn/issues/22533")]
......@@ -1113,7 +1113,7 @@ static bool M()
}
}
";
var comp = CompileAndVerify(source);
var comp = CompileStandardAndVerify(source);
comp.VerifyIL("Program.M",
@"{
// Code size 28 (0x1c)
......@@ -1154,7 +1154,7 @@ static bool M()
}
}
";
var comp = CompileAndVerify(source);
var comp = CompileStandardAndVerify(source);
comp.VerifyIL("Program.M",
@"{
// Code size 43 (0x2b)
......
......@@ -284,7 +284,7 @@ dynamic F(dynamic d)
}
";
// the delegate is generated, no error is reported
CompileAndVerify(source, new[] { systemCoreRef, csrtRef });
CompileStandardAndVerify(source, new[] { systemCoreRef, csrtRef });
}
[Fact]
......@@ -304,7 +304,7 @@ dynamic F(dynamic d)
}
";
// the delegate is generated, no error is reported
var c = CompileAndVerify(source, new[] { systemCoreRef, csrtRef, funcRef });
var c = CompileStandardAndVerify(source, new[] { systemCoreRef, csrtRef, funcRef });
Assert.Equal(1, ((CSharpCompilation)c.Compilation).GlobalNamespace.GetMember<NamespaceSymbol>("System").GetMember<NamedTypeSymbol>("Func`13").Arity);
}
......@@ -331,7 +331,7 @@ dynamic F(dynamic d)
";
// Desired: the delegate is generated, no error is reported.
// Actual: use the malformed Func`13 time and failed to PEVerify. Not presently worthwhile to fix.
CompileAndVerify(source, new[] { systemCoreRef, csrtRef }, verify: Verification.Fails).VerifyIL("C.F", @"
CompileStandardAndVerify(source, new[] { systemCoreRef, csrtRef }, verify: Verification.Fails).VerifyIL("C.F", @"
{
// Code size 189 (0xbd)
.maxstack 13
......@@ -578,7 +578,7 @@ public void M2(dynamic d)
d.m(1,2,3);
}
}";
var verifier = CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
var verifier = CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
{
var c = peModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C");
var containers = c.GetMembers().OfType<NamedTypeSymbol>().ToArray();
......@@ -634,7 +634,7 @@ public void M1(dynamic d)
var x = new System.Action(() => d.m());
}
}";
var verifier = CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
var verifier = CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
{
var c = peModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C");
Assert.Equal(2, c.GetMembers().OfType<NamedTypeSymbol>().Count());
......@@ -669,7 +669,7 @@ public IEnumerable<dynamic> M1()
yield return d;
}
}";
var verifier = CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
var verifier = CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
{
var c = peModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C");
var iteratorClass = c.GetMember<NamedTypeSymbol>("<M1>d__0");
......@@ -795,7 +795,7 @@ public dynamic M(dynamic d, List<dynamic> a, Dictionary<dynamic, dynamic[]>[] b)
return d(a, b);
}
}";
var verifier = CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
var verifier = CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
{
var container = peModule.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMember<NamedTypeSymbol>("<>o__0");
Assert.Equal(0, container.GetMembers().Single().GetAttributes().Length);
......@@ -815,7 +815,7 @@ public dynamic M(dynamic d)
return d(ref d);
}
}";
var verifier = CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
var verifier = CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule =>
{
var d = peModule.GlobalNamespace.GetMember<NamedTypeSymbol>("<>F{00000004}");
......@@ -1008,7 +1008,7 @@ class C
}
}
";
CompileAndVerify(source, new[] { CSharpRef, SystemCoreRef });
CompileStandardAndVerify(source, new[] { CSharpRef, SystemCoreRef });
}
[Fact]
......@@ -1087,7 +1087,7 @@ public void M(dynamic arg = null)
}
}
";
CompileAndVerify(source, new[] { SystemCoreRef });
CompileStandardAndVerify(source, new[] { SystemCoreRef });
}
[Fact, WorkItem(16, "http://roslyn.codeplex.com/workitem/16")]
......@@ -1531,7 +1531,7 @@ void L3(int y)
l3(d);
}
}";
CompileAndVerify(src,
CompileStandardAndVerify(src,
expectedOutput: "2024",
parseOptions: _localFunctionParseOptions,
additionalRefs: new[] { SystemCoreRef, CSharpRef }).VerifyDiagnostics();
......@@ -2268,7 +2268,7 @@ public List<dynamic> As(dynamic d)
}
}";
// TODO: Why does RefEmit use fat header with maxstack = 2?
var verifier = CompileAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, symbolValidator: module =>
var verifier = CompileStandardAndVerify(source, additionalRefs: new[] { SystemCoreRef, CSharpRef }, symbolValidator: module =>
{
var pe = (PEModuleSymbol)module;
......@@ -5011,7 +5011,7 @@ static void Main()
1:t
1:t";
CompileAndVerify(source: source, expectedOutput: output, additionalRefs: new[] { SystemCoreRef, CSharpRef });
CompileStandardAndVerify(source: source, expectedOutput: output, additionalRefs: new[] { SystemCoreRef, CSharpRef });
}
......@@ -5114,7 +5114,7 @@ static void Main()
00011111-
01111111";
CompileAndVerify(source: source, expectedOutput: output, additionalRefs: new[] { SystemCoreRef, CSharpRef });
CompileStandardAndVerify(source: source, expectedOutput: output, additionalRefs: new[] { SystemCoreRef, CSharpRef });
}
[Fact]
......@@ -5144,7 +5144,7 @@ public static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: "", additionalRefs: new[] { SystemCoreRef, CSharpRef });
CompileStandardAndVerify(source, expectedOutput: "", additionalRefs: new[] { SystemCoreRef, CSharpRef });
}
[Fact]
......@@ -6570,7 +6570,7 @@ .maxstack 9
IL_0067: ret
}");
CompileAndVerify(source,
CompileStandardAndVerify(source,
new[] { SystemCoreRef, CSharpRef },
expectedOutput: "The call is ambiguous between the following methods or properties: 'A.M(A)' and 'A.M(string)'");
}
......@@ -8044,7 +8044,7 @@ public static void Main()
}
}
";
CompileAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, expectedOutput: "2");
CompileStandardAndVerify(source, additionalRefs: new[] { CSharpRef, SystemCoreRef }, expectedOutput: "2");
}
[Fact]
......@@ -8708,7 +8708,7 @@ public static void Main()
public void m(ref object a, out object b) { b = null; }
}
";
CompileAndVerify(source, expectedOutput: "", additionalRefs: new[] { SystemCoreRef, CSharpRef });
CompileStandardAndVerify(source, expectedOutput: "", additionalRefs: new[] { SystemCoreRef, CSharpRef });
}
/// <summary>
......@@ -13993,7 +13993,7 @@ static void Main()
}
}
";
var comp = CompileAndVerify(source, expectedOutput: "hello!", additionalRefs: new[] { ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef, SystemCoreRef });
var comp = CompileStandardAndVerify(source, expectedOutput: "hello!", additionalRefs: new[] { ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef, SystemCoreRef });
comp.VerifyDiagnostics();
// No runtime failure (System.ArrayTypeMismatchException: Attempted to access an element as a type incompatible with the array.)
// because of the special handling for dynamic in LocalRewriter.TransformCompoundAssignmentLHS
......
......@@ -56,7 +56,7 @@ static void Main()
}
}
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
C.Method
I1.Method
I2.Method
......@@ -428,7 +428,7 @@ public static void Main()
i1.Method(4, 5, ""c"", l1);
}
}";
var comp = CompileAndVerify(source,
var comp = CompileStandardAndVerify(source,
expectedOutput: @"
Base.Method(1, 2, b)
Class.Method(3, 4, c)
......@@ -582,7 +582,7 @@ public static void Main()
i4.Method<List<long>>(new List<int>(), new List<string>[]{}, new List<List<List<string>>>(), new Dictionary<int, List<long>>());
}
}";
var comp = CompileAndVerify(source,
var comp = CompileStandardAndVerify(source,
expectedOutput: @"
Derived1.set_Property
Derived1.Method
......@@ -663,7 +663,7 @@ public static void Main()
}
}";
var comp = CompileAndVerify(source,
var comp = CompileStandardAndVerify(source,
expectedOutput: @"
Derived1.Method`1
Derived1.Method`2",
......@@ -741,7 +741,7 @@ public static void Main()
}
}";
var comp = CompileAndVerify(source, expectedOutput: @"
var comp = CompileStandardAndVerify(source, expectedOutput: @"
Derived`2.Method(U)
Derived`2.Method()
Base.Method(T)
......@@ -806,7 +806,7 @@ public static void Main()
}
}";
var comp = CompileAndVerify(source, expectedOutput: @"
var comp = CompileStandardAndVerify(source, expectedOutput: @"
Derived`2.Method(U)
Derived`2.Method()
Base.Method(T)
......@@ -899,7 +899,7 @@ public static void Main()
j.P = 1;
}
}";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
I3.M1
I1.M2
I3.M2
......@@ -953,7 +953,7 @@ class Inner : IInner
}
";
var comp = CompileAndVerify(source, expectedSignatures: new[]
var comp = CompileStandardAndVerify(source, expectedSignatures: new[]
{
Signature("Outer`1+IInner", "M", ".method public hidebysig newslot abstract virtual instance System.Void M(T t) cil managed"),
Signature("Outer`1+Inner", "Outer<T>.IInner.M", ".method private hidebysig newslot virtual final instance System.Void Outer<T>.IInner.M(T t) cil managed"),
......
......@@ -61,7 +61,7 @@ public Partial(int garbage)
}
}
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
Start Partial()
Partial.a
Partial.b
......@@ -131,7 +131,7 @@ public Derived2()
}
}
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
Derived2.c
Derived.b
Base.a
......@@ -179,7 +179,7 @@ static Partial()
}
}
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
Partial.a
Partial.b
Partial.c
......@@ -228,7 +228,7 @@ class Derived2 : Derived
static Derived2() { System.Console.WriteLine(""Derived2()""); }
}
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
Base.a
Base()
Base.a = 1
......@@ -280,7 +280,7 @@ class Derived2 : Derived
static Derived2() { System.Console.WriteLine(""Derived2()""); }
}
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
Derived.b
Derived()
Base.a
......@@ -332,7 +332,7 @@ class Derived2 : Derived
static Derived2() { System.Console.WriteLine(""Derived2()""); }
}
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
Derived2.c
Derived2()
Derived.b
......@@ -400,7 +400,7 @@ public Derived()
}
}
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
Derived.b
static Derived()
Derived.y
......@@ -625,7 +625,7 @@ public A(int garbage)
}
}
";
CompileAndVerify(source, expectedOutput: @"
CompileStandardAndVerify(source, expectedOutput: @"
A.a
A(int)
A()
......
......@@ -46,7 +46,7 @@ public void SimpleDelegateMembersTest()
var validator = getValidator(expected);
// We should see the same members from both source and metadata
var verifier = CompileAndVerify(
var verifier = CompileStandardAndVerify(
libSrc,
sourceSymbolValidator: validator,
symbolValidator: validator,
......@@ -267,7 +267,7 @@ class Test
}
};
var comp = CompileAndVerify(
var comp = CompileStandardAndVerify(
allDelegates,
additionalRefs: new[] {
winRtDelegateLibrary,
......
......@@ -341,11 +341,11 @@ interface I2 { }
// we run more than once to increase the chance of observing a problem due to nondeterminism
for (int i = 0; i < 2; i++)
{
var cv = CompileAndVerify(sources: new string[] { x1, x2, x3 }, expectedOutput: expectedOutput1);
var cv = CompileStandardAndVerify(sources: new string[] { x1, x2, x3 }, expectedOutput: expectedOutput1);
var trees = cv.Compilation.SyntaxTrees.ToArray();
var comp2 = cv.Compilation.RemoveAllSyntaxTrees().AddSyntaxTrees(trees[1], trees[0], trees[2]);
CompileAndVerify(comp2, expectedOutput: expectedOutput2);
CompileAndVerify(sources: new string[] { x2, x1, x3 }, expectedOutput: expectedOutput2);
CompileStandardAndVerify(sources: new string[] { x2, x1, x3 }, expectedOutput: expectedOutput2);
}
}
......
......@@ -3213,7 +3213,7 @@ private static void AssertInstrumented(CompilationVerifier verifier, string qual
private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, CompilationOptions options = null, Verification verify = Verification.Passes)
{
return base.CompileAndVerify(source, expectedOutput: expectedOutput, additionalRefs: s_refs, options: (options ?? TestOptions.ReleaseExe).WithDeterministic(true), emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage)), verify: verify);
return base.CompileStandardAndVerify(source, expectedOutput: expectedOutput, additionalRefs: s_refs, options: (options ?? TestOptions.ReleaseExe).WithDeterministic(true), emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage)), verify: verify);
}
private CompilationVerifier CompileAndVerify((string Path, string Content)[] sources, string expectedOutput = null, CSharpCompilationOptions options = null)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册