未验证 提交 8c877b18 编写于 作者: J Jared Parsons 提交者: GitHub

Merge pull request #25022 from jaredpar/fix-test

Restrict overload stress tests to release
......@@ -13,7 +13,7 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests
public class OverloadResolutionPerfTests : CSharpTestBase
{
[WorkItem(13685, "https://github.com/dotnet/roslyn/issues/13685")]
[NoIOperationValidationFact]
[ConditionalFactAttribute(typeof(IsRelease), typeof(NoIOperationValidation))]
public void Overloads()
{
const int n = 3000;
......@@ -39,7 +39,7 @@ public void Overloads()
}
[WorkItem(13685, "https://github.com/dotnet/roslyn/issues/13685")]
[NoIOperationValidationFact]
[ConditionalFactAttribute(typeof(IsRelease), typeof(NoIOperationValidation))]
public void BinaryOperatorOverloads()
{
const int n = 3000;
......@@ -64,7 +64,7 @@ public void BinaryOperatorOverloads()
Diagnostic(ErrorCode.ERR_AmbigBinaryOps, "x + null").WithArguments("+", "C", "<null>").WithLocation(3, 29));
}
[Fact]
[ConditionalFact(typeof(IsRelease))]
public void StaticMethodsWithLambda()
{
const int n = 100;
......@@ -86,7 +86,7 @@ public void StaticMethodsWithLambda()
comp.VerifyDiagnostics();
}
[Fact]
[ConditionalFact(typeof(IsRelease))]
public void ConstructorsWithLambdaAndParams()
{
const int n = 100;
......@@ -109,7 +109,7 @@ public void ConstructorsWithLambdaAndParams()
comp.VerifyDiagnostics();
}
[Fact]
[ConditionalFact(typeof(IsRelease))]
public void ExtensionMethodsWithLambda()
{
const int n = 100;
......@@ -131,7 +131,7 @@ public void ExtensionMethodsWithLambda()
comp.VerifyDiagnostics();
}
[Fact]
[ConditionalFact(typeof(IsRelease))]
public void ExtensionMethodsWithLambdaAndParams()
{
const int n = 100;
......@@ -153,7 +153,7 @@ public void ExtensionMethodsWithLambdaAndParams()
comp.VerifyDiagnostics();
}
[NoIOperationValidationFact]
[ConditionalFactAttribute(typeof(IsRelease), typeof(NoIOperationValidation))]
public void ExtensionMethodsWithLambdaAndErrors()
{
const int n = 200;
......
......@@ -71,7 +71,7 @@ public class IsRelease : ExecutionCondition
public override bool ShouldSkip => false;
#endif
public override string SkipReason => "Not in release mode.";
public override string SkipReason => "Test not supported in DEBUG";
}
public class WindowsOnly : ExecutionCondition
......@@ -97,4 +97,16 @@ public class DesktopOnly : ExecutionCondition
public override bool ShouldSkip => CoreClrShim.AssemblyLoadContext.Type != null;
public override string SkipReason => "Test not supported on CoreCLR";
}
public class NoIOperationValidation : ExecutionCondition
{
#if TEST_IOPERATION_INTERFACE
public override bool ShouldSkip => true;
#else
public override bool ShouldSkip => false;
#endif
public override string SkipReason => "Test not supported in TEST_IOPERATION_INTERFACE";
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册