|
2 | 2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | 3 | // See the LICENSE file in the project root for more information. |
4 | 4 |
|
5 | | -#nullable disable |
6 | | - |
| 5 | +using System.Diagnostics.CodeAnalysis; |
| 6 | +using System.Threading.Tasks; |
7 | 7 | using Microsoft.CodeAnalysis.CSharp; |
8 | 8 | using Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions; |
9 | 9 | using Microsoft.CodeAnalysis.Editor.UnitTests.Diagnostics; |
10 | 10 | using Xunit.Abstractions; |
11 | 11 |
|
12 | 12 | namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics; |
13 | 13 |
|
14 | | -public abstract partial class AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_NoEditor : AbstractDiagnosticProviderBasedUserDiagnosticTest_NoEditor |
| 14 | +public abstract partial class AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_NoEditor(ITestOutputHelper? logger) |
| 15 | + : AbstractDiagnosticProviderBasedUserDiagnosticTest_NoEditor(logger) |
15 | 16 | { |
16 | 17 | private static readonly CSharpParseOptions Script = new(kind: SourceCodeKind.Script); |
17 | 18 |
|
18 | | - protected AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_NoEditor(ITestOutputHelper logger) |
19 | | - : base(logger) |
20 | | - { |
21 | | - } |
22 | | - |
23 | 19 | protected override ParseOptions GetScriptOptions() => Script; |
24 | 20 |
|
25 | 21 | protected internal override string GetLanguage() => LanguageNames.CSharp; |
@@ -154,4 +150,37 @@ public interface IAsyncEnumerator<out T> : IAsyncDisposable |
154 | 150 | internal OptionsCollection IgnoreAllParentheses => ParenthesesOptionsProvider.IgnoreAllParentheses; |
155 | 151 | internal OptionsCollection RemoveAllUnnecessaryParentheses => ParenthesesOptionsProvider.RemoveAllUnnecessaryParentheses; |
156 | 152 | internal OptionsCollection RequireAllParenthesesForClarity => ParenthesesOptionsProvider.RequireAllParenthesesForClarity; |
| 153 | + |
| 154 | + internal new Task TestInRegularAndScript1Async( |
| 155 | + [StringSyntax(PredefinedEmbeddedLanguageNames.CSharpTest)] string initialMarkup, |
| 156 | + [StringSyntax(PredefinedEmbeddedLanguageNames.CSharpTest)] string expectedMarkup, |
| 157 | + int index = 0, |
| 158 | + TestParameters? parameters = null) |
| 159 | + { |
| 160 | + return base.TestInRegularAndScript1Async(initialMarkup, expectedMarkup, index, parameters); |
| 161 | + } |
| 162 | + |
| 163 | + internal new Task TestInRegularAndScript1Async( |
| 164 | + [StringSyntax(PredefinedEmbeddedLanguageNames.CSharpTest)] string initialMarkup, |
| 165 | + [StringSyntax(PredefinedEmbeddedLanguageNames.CSharpTest)] string expectedMarkup, |
| 166 | + TestParameters parameters) |
| 167 | + { |
| 168 | + return base.TestInRegularAndScript1Async(initialMarkup, expectedMarkup, parameters); |
| 169 | + } |
| 170 | + |
| 171 | + protected new Task TestMissingInRegularAndScriptAsync( |
| 172 | + [StringSyntax(PredefinedEmbeddedLanguageNames.CSharpTest)] string initialMarkup, |
| 173 | + TestParameters? parameters = null, |
| 174 | + int codeActionIndex = 0) |
| 175 | + { |
| 176 | + return base.TestMissingInRegularAndScriptAsync(initialMarkup, parameters, codeActionIndex); |
| 177 | + } |
| 178 | + |
| 179 | + protected new Task TestMissingAsync( |
| 180 | + [StringSyntax(PredefinedEmbeddedLanguageNames.CSharpTest)] string initialMarkup, |
| 181 | + TestParameters? parameters = null, |
| 182 | + int codeActionIndex = 0) |
| 183 | + { |
| 184 | + return base.TestMissingAsync(initialMarkup, parameters, codeActionIndex); |
| 185 | + } |
157 | 186 | } |
0 commit comments