提交 94a554e1 编写于 作者: C Cyrus Najmabadi

Simplify harness

上级 ce4cbae2
......@@ -96,12 +96,10 @@ private static OptionsCollection PreferExplicitTypeWithInfo()
string expectedMarkup,
int index = 0,
OptionsCollection options = null,
List<DiagnosticResult> expectedDiagnostics = null,
List<DiagnosticResult> fixedExpectedDiagnostics = null)
{
return TestInRegularAndScript1Async(
initialMarkup, expectedMarkup, index, new TestParameters(options: options),
expectedDiagnostics, fixedExpectedDiagnostics);
initialMarkup, expectedMarkup, index, new TestParameters(options: options), fixedExpectedDiagnostics);
}
private static Task TestInRegularAndScript1Async(
......@@ -109,12 +107,10 @@ private static OptionsCollection PreferExplicitTypeWithInfo()
string expectedMarkup,
int index = 0,
TestParameters? parameters = null,
List<DiagnosticResult> expectedDiagnostics = null,
List<DiagnosticResult> fixedExpectedDiagnostics = null)
{
return TestInRegularAndScript1Async(
new[] { initialMarkup }, new[] { expectedMarkup }, index, parameters,
expectedDiagnostics, fixedExpectedDiagnostics);
new[] { initialMarkup }, new[] { expectedMarkup }, index, parameters, fixedExpectedDiagnostics);
}
private static Task TestWithPickMembersDialogAsync(
......@@ -124,7 +120,6 @@ private static OptionsCollection PreferExplicitTypeWithInfo()
Action<ImmutableArray<PickMembersOption>> optionsCallback = null,
int index = 0,
TestParameters parameters = default,
List<DiagnosticResult> expectedDiagnostics = null,
List<DiagnosticResult> fixedExpectedDiagnostics = null)
{
return TestWithPickMembersDialogAsync(
......@@ -134,7 +129,6 @@ private static OptionsCollection PreferExplicitTypeWithInfo()
optionsCallback,
index,
parameters,
expectedDiagnostics,
fixedExpectedDiagnostics);
}
......@@ -145,7 +139,6 @@ private static OptionsCollection PreferExplicitTypeWithInfo()
Action<ImmutableArray<PickMembersOption>> optionsCallback = null,
int index = 0,
TestParameters parameters = default,
List<DiagnosticResult> expectedDiagnostics = null,
List<DiagnosticResult> fixedExpectedDiagnostics = null)
{
var pickMembersService = new TestPickMembersService(chosenSymbols.AsImmutableOrNull(), optionsCallback);
......@@ -153,7 +146,6 @@ private static OptionsCollection PreferExplicitTypeWithInfo()
initialMarkup, expectedMarkup,
index,
parameters.WithFixProviderData(pickMembersService),
expectedDiagnostics,
fixedExpectedDiagnostics);
}
......@@ -171,7 +163,6 @@ internal static void EnableOption(ImmutableArray<PickMembersOption> options, str
string[] expectedMarkup,
int index = 0,
TestParameters? parameters = null,
List<DiagnosticResult> expectedDiagnostics = null,
List<DiagnosticResult> fixedExpectedDiagnostics = null)
{
var test = new Test
......@@ -200,12 +191,6 @@ internal static void EnableOption(ImmutableArray<PickMembersOption> options, str
test.CompilationOptions = parameters?.compilationOptions;
foreach (var diagnostic in expectedDiagnostics ?? new List<DiagnosticResult>())
{
test.TestState.ExpectedDiagnostics.Add(diagnostic);
test.FixedState.ExpectedDiagnostics.Add(diagnostic);
}
foreach (var diagnostic in fixedExpectedDiagnostics ?? new List<DiagnosticResult>())
test.FixedState.ExpectedDiagnostics.Add(diagnostic);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册