432 references to TestParameters
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (16)
AbstractCodeActionOrUserDiagnosticTest.cs (14)
95public static readonly TestParameters Default = new(parseOptions: null); 98=> new(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title, testHost, workspaceKind); 101=> new(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title, testHost, workspaceKind); 104=> new(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title, testHost, workspaceKind); 107=> new(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title, testHost, workspaceKind); 110=> new(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title, testHost, workspaceKind); 113=> new(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title, testHost, workspaceKind); 116=> new(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title, testHost, workspaceKind); 119=> new(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title, testHost, workspaceKind); 122=> new(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, retainNonFixableDiagnostics, includeDiagnosticsOutsideSelection, title, testHost, workspaceKind); 318=> TestSmartTagTextAsync(initialMarkup, displayText, new TestParameters(index: index)); 321=> TestSmartTagGlyphTagsAsync(initialMarkup, glyphTags, new TestParameters(index: index)); 389new TestParameters(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, title: title, testHost: testHost)); 430new TestParameters(parseOptions, compilationOptions, options, globalOptions, fixProviderData, index, priority, testHost: testHost));
AbstractDiagnosticProviderBasedUserDiagnosticTest.cs (1)
211var testOptions = new TestParameters(parseOptions, compilationOptions, options: options, globalOptions: globalOptions);
AbstractUserDiagnosticTest.cs (1)
229new TestParameters(parseOptions, compilationOptions, options, globalOptions, fixProviderData),
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (358)
AddBracesTests.cs (16)
49new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 75new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 97new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 119new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 141new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 163new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 186new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 216new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 253new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 276new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 299new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 321new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 1457new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 1481new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 1507new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, (PreferBracesPreference)bracesPreference, NotificationOption2.Silent))); 1964await TestMissingInRegularAndScriptAsync(initialMarkup, new TestParameters(options: Option(CSharpCodeStyleOptions.PreferBraces, bracesPreference, NotificationOption2.Silent)));
AddExplicitCastTests.cs (8)
2589using (var workspace = CreateWorkspaceFromOptions(initialMarkup, new TestParameters())) 2591var (actions, actionToInvoke) = await GetCodeActionsAsync(workspace, new TestParameters()); 2657using (var workspace = CreateWorkspaceFromOptions(initialMarkup, new TestParameters())) 2659var (actions, actionToInvoke) = await GetCodeActionsAsync(workspace, new TestParameters()); 2814using (var workspace = CreateWorkspaceFromOptions(initialMarkup, new TestParameters())) 2816var (actions, actionToInvoke) = await GetCodeActionsAsync(workspace, new TestParameters()); 2893using (var workspace = CreateWorkspaceFromOptions(initialMarkup, new TestParameters())) 2895var (actions, actionToInvoke) = await GetCodeActionsAsync(workspace, new TestParameters());
AddRequiredExpressionParenthesesTests.cs (2)
32=> TestMissingInRegularAndScriptAsync(initialMarkup, new TestParameters(options: options)); 35=> TestInRegularAndScript1Async(initialMarkup, expected, parameters: new TestParameters(options: options));
AddRequiredPatternParenthesesTests.cs (2)
32=> TestMissingInRegularAndScriptAsync(initialMarkup, new TestParameters(options: options)); 35=> TestInRegularAndScript1Async(initialMarkup, expected, parameters: new TestParameters(options: options));
CSharpAsAndNullCheckTests.cs (10)
80}}", new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(version))); 98""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6))); 1166""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1205""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1471""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1502""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1557""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1589""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1652""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 1694""", parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8)));
CSharpDeclareAsNullableCodeFixTests.cs (1)
28private static readonly TestParameters s_nullableFeature = new TestParameters(parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8));
CSharpInlineDeclarationTests.cs (7)
221""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6))); 250""", new TestParameters(options: new UseImplicitTypeTests().ImplicitTypeEverywhere())); 279""", new TestParameters(options: new UseImplicitTypeTests().ImplicitTypeButKeepIntrinsics())); 651""", new TestParameters(options: new UseImplicitTypeTests().ImplicitTypeEverywhere())); 696""", new TestParameters(options: new UseImplicitTypeTests().ImplicitTypeEverywhere())); 733""", new TestParameters(options: new UseImplicitTypeTests().ImplicitTypeEverywhere())); 2442""", new TestParameters(TestOptions.Regular));
CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (2)
77""", new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6))); 657var testParameters = new TestParameters(options: options, parseOptions: TestOptions.Regular8);
InvokeDelegateWithConditionalAccessTests.cs (1)
142""", new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)));
MakeFieldReadonlyTests.cs (1)
2247""", new TestParameters(parseOptions: s_strictFeatureFlag));
MakeLocalFunctionStaticTests.cs (6)
86new TestParameters( 108""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 128""", parameters: new TestParameters(parseOptions: CSharp72ParseOptions)); 148""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 169""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 455""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions));
MakeMethodAsynchronousTests.cs (1)
96await TestActionCountAsync(initial, count: 1, new TestParameters(compilationOptions: new CSharpCompilationOptions(OutputKind.ConsoleApplication)));
MakeRefStructTests.cs (6)
74await TestMissingInRegularAndScriptAsync(text, new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview))); 89await TestMissingInRegularAndScriptAsync(text, new TestParameters(s_parseOptions)); 102await TestMissingInRegularAndScriptAsync(text, new TestParameters(s_parseOptions)); 155await TestMissingInRegularAndScriptAsync(text, new TestParameters(s_parseOptions)); 168await TestMissingInRegularAndScriptAsync(text, new TestParameters(s_parseOptions)); 203await TestMissingInRegularAndScriptAsync(text, new TestParameters(s_parseOptions));
MisplacedUsingDirectivesTests.cs (1)
72=> new(options: new OptionsCollection(GetLanguage()) { { CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, preferredPlacementOption } });
NamingStylesTests.cs (40)
45}", new TestParameters(options: s_options.ClassNamesArePascalCase)); 137}", new TestParameters(options: s_options.MethodNamesArePascalCase)); 157}}", new TestParameters(options: s_options.MethodNamesWithAccessibilityArePascalCase(ImmutableArray<Accessibility>.Empty))); 197}}", new TestParameters(options: s_options.SymbolKindsArePascalCaseEmpty())); 242}}", new TestParameters(options: s_options.SymbolKindsArePascalCase(alternateSymbolKind))); 249}}", new TestParameters(options: s_options.AccessibilitiesArePascalCase(ImmutableArray.Create(alternateAccessibility)))); 290}", new TestParameters(options: s_options.MethodNamesArePascalCase)); 300}", new TestParameters(options: s_options.MethodNamesArePascalCase)); 316}", new TestParameters(options: s_options.MethodNamesArePascalCase)); 331}", new TestParameters(options: s_options.MethodNamesArePascalCase)); 569}", new TestParameters(options: s_options.LocalNamesAreCamelCase)); 588}", new TestParameters(options: s_options.LocalNamesAreCamelCase)); 745}", new TestParameters(options: s_options.LocalNamesAreCamelCase)); 764}", new TestParameters(options: s_options.LocalNamesAreCamelCase)); 776}", new TestParameters(options: s_options.LocalNamesAreCamelCase)); 789}", new TestParameters(options: s_options.LocalNamesAreCamelCase)); 802}", new TestParameters(options: s_options.LocalNamesAreCamelCase)); 815}", new TestParameters(options: s_options.LocalNamesAreCamelCase)); 861}", new TestParameters(options: s_options.ConstantsAreUpperCase)); 874}", new TestParameters(options: s_options.ConstantsAreUpperCase)); 953}", new TestParameters(options: s_options.LocalFunctionNamesAreCamelCase)); 1012}", new TestParameters(options: s_options.AsyncFunctionNamesEndWithAsync)); 1027}", new TestParameters(options: s_options.AsyncFunctionNamesEndWithAsync)); 1092}", new TestParameters(options: s_options.MethodNamesArePascalCase)); 1107}", new TestParameters(options: s_options.MethodNamesArePascalCase)); 1150}", new TestParameters(options: s_options.MethodNamesArePascalCase)); 1193}", new TestParameters(options: s_options.PropertyNamesArePascalCase)); 1209}", new TestParameters(options: s_options.MethodNamesArePascalCase)); 1221", new TestParameters(options: s_options.InterfaceNamesStartWithI)); 1233var testParameters = new TestParameters(options: s_options.ClassNamesArePascalCase); 1258var testParameters = new TestParameters(options: s_options.InterfaceNamesStartWithI); 1286var testParameters = new TestParameters(options: s_options.TypeParameterNamesStartWithT); 1307new TestParameters(options: s_options.MergeStyles(s_options.PropertyNamesArePascalCase, s_options.ParameterNamesAreCamelCaseWithPUnderscorePrefix))); 1320new TestParameters(options: s_options.MergeStyles(s_options.PropertyNamesArePascalCase, s_options.ParameterNamesAreCamelCaseWithPUnderscorePrefix))); 1344}}", new TestParameters(options: s_options.ParameterNamesAreCamelCase)); 1360}}", new TestParameters(options: s_options.LocalNamesAreCamelCase)); 1376}", new TestParameters(options: s_options.PropertyNamesArePascalCase)); 1391}", new TestParameters(options: s_options.AsyncFunctionNamesEndWithAsync)); 1401", new TestParameters(options: s_options.AsyncFunctionNamesEndWithAsync)); 1412}", new TestParameters(options: s_options.MethodNamesArePascalCase));
QualifyMemberAccessTests.cs (1)
40=> TestMissingInRegularAndScriptAsync(code, new TestParameters(options: Option(option, true, notification)));
RemoveUnnecessaryExpressionParenthesesTests.cs (51)
43await TestMissingAsync(initial, parameters: new TestParameters(options: RequireAllParenthesesForClarity)); 65""", new TestParameters(options: IgnoreAllParentheses)); 95""", new TestParameters(options: RequireArithmeticBinaryParenthesesForClarity)); 151""", parameters: new TestParameters(options: RequireArithmeticBinaryParenthesesForClarity)); 166""", new TestParameters(options: RequireOtherBinaryParenthesesForClarity)); 190""", parameters: new TestParameters(options: RequireOtherBinaryParenthesesForClarity)); 650""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 665""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 705""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 720""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 759""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 898""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 913""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 928""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1076""", parameters: new TestParameters(options: RequireAllParenthesesForClarity)); 1093""", parameters: new TestParameters(options: RequireAllParenthesesForClarity)); 1108""", parameters: new TestParameters(options: RequireArithmeticBinaryParenthesesForClarity)); 1123""", parameters: new TestParameters(options: RequireAllParenthesesForClarity)); 1138""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1162""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1177""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1192""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1207""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1231""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1246""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1261""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1420""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1450""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1465""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 1480""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2572""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2587""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2612""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2637""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2661""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2685""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2709""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2724""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2739""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2754""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2779parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2795""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 2811""", new TestParameters(options: RemoveAllUnnecessaryParentheses), parentheticalExpressionDiagnostic); 2828""", new TestParameters(options: RemoveAllUnnecessaryParentheses), firstLineParentheticalExpressionDiagnostic); 2846""", new TestParameters(options: RemoveAllUnnecessaryParentheses), expectedDiagnostics); 2866""", new TestParameters(options: RemoveAllUnnecessaryParentheses), expectedDiagnostics); 2882var parameters = new TestParameters(options: RemoveAllUnnecessaryParentheses); 3043""", new TestParameters(options: RemoveAllUnnecessaryParentheses)); 3208""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses)); 3223""", parameters: new TestParameters( 3249""", parameters: new TestParameters(options: RemoveAllUnnecessaryParentheses));
RemoveUnnecessaryPatternParenthesesTests.cs (3)
41await TestMissingAsync(initial, parameters: new TestParameters(options: RequireAllParenthesesForClarity)); 69""", parameters: new TestParameters(options: RequireArithmeticBinaryParenthesesForClarity)); 84""", new TestParameters(options: RequireOtherBinaryParenthesesForClarity));
RemoveUnusedParametersTests.cs (3)
44=> TestDiagnosticMissingAsync(initialMarkup, new TestParameters(parseOptions, options: options, retainNonFixableDiagnostics: true)); 48=> TestDiagnosticsAsync(initialMarkup, new TestParameters(parseOptions, options: options, retainNonFixableDiagnostics: true), expectedDiagnostics); 1218var testParameters = new TestParameters(retainNonFixableDiagnostics: true);
RemoveUnusedValueAssignmentTests.cs (11)
1710}", new TestParameters(options: PreferUnusedLocal)); 1752}", new TestParameters(options: PreferUnusedLocal)); 2526}", new TestParameters(options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion))); 5516}", new TestParameters(options: PreferUnusedLocal)); 5581}", new TestParameters(options: PreferUnusedLocal)); 7101}", new TestParameters(options: PreferDiscard, retainNonFixableDiagnostics: true), 7146}}", new TestParameters(options: GetOptions(optionName), retainNonFixableDiagnostics: true)); 8338}", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8))); 8357}", new TestParameters(options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion))); 8372}", new TestParameters(options: PreferDiscard, parseOptions: new CSharpParseOptions(LanguageVersion.CSharp8))); 8470}", new TestParameters(options: PreferUnusedLocal, parseOptions: new CSharpParseOptions(languageVersion)));
RemoveUnusedValuesTestsBase.cs (2)
47=> TestMissingInRegularAndScriptAsync(initialMarkup, new TestParameters(options: options, parseOptions: parseOptions)); 66await TestMissingInRegularAndScriptAsync(initialMarkup, new TestParameters(options: options, parseOptions: parseOptions));
ReplaceDefaultLiteralTests.cs (1)
58new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(version)));
SimplifyInterpolationTests.cs (1)
32var parameters = new TestParameters(retainNonFixableDiagnostics: true, includeDiagnosticsOutsideSelection: true);
UpdateProjectToAllowUnsafeTests.cs (2)
32var parameters = new TestParameters(); 43await TestMissingAsync(initialMarkup, new TestParameters(compilationOptions:
UpgradeProjectTests.cs (2)
40var parameters = new TestParameters(parseOptions: parseOptions, index: index); 62var parameters = new TestParameters(parseOptions: parseOptions, index: index);
UseAutoPropertyTests.cs (5)
110""", new TestParameters(TestOptions.RegularPreview)); 470""", new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5))); 516""", new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5))); 2672""", new TestParameters(options: Option(FormattingOptions2.UseTabs, true))); 2692""", new TestParameters(options: Option(FormattingOptions2.UseTabs, false)));
UseConditionalExpressionForReturnTests.cs (5)
167""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6))); 730""", parameters: new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(languageVersion))); 796""", parameters: new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(languageVersion))); 831""", parameters: new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(languageVersion))); 866""", parameters: new(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(languageVersion)));
UseExplicitTypeTests.cs (53)
91""", new TestParameters(options: ExplicitTypeEverywhere())); 105""", new TestParameters(options: ExplicitTypeEverywhere())); 140await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 172await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 190""", new TestParameters(options: ExplicitTypeEverywhere())); 207""", new TestParameters(options: ExplicitTypeEverywhere())); 228""", new TestParameters(options: ExplicitTypeEverywhere())); 245""", new TestParameters(options: ExplicitTypeEverywhere())); 263""", new TestParameters(options: ExplicitTypeEverywhere())); 301""", new TestParameters(options: ExplicitTypeEverywhere())); 324""", new TestParameters(options: ExplicitTypeEverywhere())); 345""", new TestParameters(options: ExplicitTypeEverywhere())); 373await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 374await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeExceptWhereApparent())); 598await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 629await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 662await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 693await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 724await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 755await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 784await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 817await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 850await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 881await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 910await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 939await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 974await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 1007await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 1040await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 1077await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 1110await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 1164await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 1208""", new TestParameters(options: ExplicitTypeEverywhere())); 1231""", new TestParameters(options: ExplicitTypeEverywhere())); 1504""", new TestParameters(options: ExplicitTypeEverywhere())); 1521""", new TestParameters(options: ExplicitTypeEverywhere())); 2549""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2568""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2585""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2606""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2624""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2642""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2660""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2683""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2701""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2720""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2738""", new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2759""", new TestParameters(options: ExplicitTypeEverywhere())); 2775""", new TestParameters(options: ExplicitTypeEverywhere())); 2801await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2818await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeEverywhere())); 2819await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeForBuiltInTypesOnly())); 2820await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ExplicitTypeExceptWhereApparent()));
UseExpressionBodyForLambdasAnalyzerTests.cs (5)
80""", new TestParameters(options: UseExpressionBody)); 128""", new TestParameters(options: UseBlockBody)); 218""", new TestParameters(options: UseExpressionBody)); 238""", new TestParameters(options: UseExpressionBody)); 258""", new TestParameters(options: UseExpressionBody));
UseImplicitTypeTests.cs (59)
98""", new TestParameters(options: ImplicitTypeEverywhere())); 112""", new TestParameters(options: ImplicitTypeEverywhere())); 129""", new TestParameters(options: ImplicitTypeEverywhere())); 146""", new TestParameters(options: ImplicitTypeEverywhere())); 161""", new TestParameters(options: ImplicitTypeEverywhere())); 178""", new TestParameters(options: ImplicitTypeEverywhere())); 197""", new TestParameters(options: ImplicitTypeEverywhere())); 214""", new TestParameters(options: ImplicitTypeEverywhere())); 231""", new TestParameters(options: ImplicitTypeEverywhere())); 248""", new TestParameters(options: ImplicitTypeEverywhere())); 265""", new TestParameters(options: ImplicitTypeEverywhere())); 282""", new TestParameters(options: ImplicitTypeEverywhere())); 299""", new TestParameters(options: ImplicitTypeEverywhere())); 322""", new TestParameters(options: ImplicitTypeEverywhere())); 343""", new TestParameters(options: ImplicitTypeEverywhere())); 360""", new TestParameters(options: ImplicitTypeEverywhere())); 378""", new TestParameters(options: ImplicitTypeEverywhere())); 396""", new TestParameters(options: ImplicitTypeEverywhere())); 413""", new TestParameters(options: ImplicitTypeEverywhere())); 430""", new TestParameters(options: ImplicitTypeEverywhere())); 449""", new TestParameters(options: ImplicitTypeEverywhere())); 471""", new TestParameters(options: ImplicitTypeEverywhere())); 610""", new TestParameters(options: ImplicitTypeEverywhere())); 632""", new TestParameters(options: ImplicitTypeEverywhere())); 1447""", new TestParameters(options: ImplicitTypeButKeepIntrinsics())); 1466""", new TestParameters(options: ImplicitTypeButKeepIntrinsics())); 1485""", new TestParameters(options: ImplicitTypeButKeepIntrinsics())); 1558""", new TestParameters(options: ImplicitTypeWhereApparent())); 1634""", new TestParameters(options: ImplicitTypeWhereApparent())); 1652""", new TestParameters(options: ImplicitTypeWhereApparent())); 1678""", new TestParameters(options: ImplicitTypeWhereApparent())); 1967await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ImplicitTypeButKeepIntrinsics())); 1968await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ImplicitTypeWhereApparent())); // Preference of intrinsic types dominates 1992await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ImplicitTypeWhereApparent())); 2021await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ImplicitTypeWhereApparent())); 2031await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ImplicitTypeWhereApparentAndForIntrinsics())); 2032await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ImplicitTypeWhereApparent())); 2106new TestParameters(options: ImplicitTypeEverywhere())); 2143new TestParameters(options: ImplicitTypeEverywhere())); 2254await TestMissingInRegularAndScriptAsync(before, new TestParameters(options: ImplicitTypeButKeepIntrinsics())); 2276""", new TestParameters(options: ImplicitTypeEverywhere())); 2298""", new TestParameters(options: ImplicitTypeEverywhere())); 2320""", new TestParameters(options: ImplicitTypeEverywhere())); 2519""", new TestParameters(options: ImplicitTypeEverywhere())); 2536""", new TestParameters(options: ImplicitTypeEverywhere())); 2640""", new TestParameters(options: ImplicitTypeEverywhere())); 2660""", new TestParameters(options: ImplicitTypeEverywhere())); 2678""", new TestParameters(options: ImplicitTypeEverywhere())); 2706""", new TestParameters(options: ImplicitTypeEverywhere())); 2730""", new TestParameters(options: ImplicitTypeEverywhere())); 2759""", new TestParameters(options: ImplicitTypeEverywhere())); 2785""", new TestParameters(options: ImplicitTypeEverywhere())); 2817""", new TestParameters(options: ImplicitTypeEverywhere())); 2838""", new TestParameters(options: ImplicitTypeEverywhere())); 2865""", new TestParameters(options: ImplicitTypeEverywhere())); 2938""", parameters: new TestParameters(options: ImplicitTypeEverywhere())); 3012""", parameters: new TestParameters(options: ImplicitTypeEverywhere())); 3040""", parameters: new TestParameters(options: ImplicitTypeEverywhere())); 3058""", new TestParameters(options: ImplicitTypeEverywhere()));
UseInferredMemberNameTests.cs (4)
71""", parameters: new TestParameters(parseOptions: s_parseOptions)); 87""", count: 0, parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6))); 103""", count: 0, parameters: new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7))); 173""", parameters: new TestParameters(parseOptions: s_parseOptions));
UseInterpolatedVerbatimStringCodeFixTests.cs (6)
49""", parameters: new TestParameters().WithParseOptions(new CSharpParseOptions(LanguageVersion.CSharp7_3))); 64""", parameters: new TestParameters().WithParseOptions(new CSharpParseOptions(LanguageVersion.CSharp7_3))); 88""", parameters: new TestParameters().WithParseOptions(new CSharpParseOptions(LanguageVersion.CSharp7_3))); 114""", parameters: new TestParameters().WithParseOptions(new CSharpParseOptions(LanguageVersion.CSharp7_3))); 129""", parameters: new TestParameters().WithParseOptions(new CSharpParseOptions(LanguageVersion.CSharp7_3))); 144""", parameters: new TestParameters().WithParseOptions(new CSharpParseOptions(LanguageVersion.CSharp8)));
UseIsNullCheckForCastAndEqualityOperatorTests.cs (3)
95new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 115new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9))); 283""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)));
UseIsNullCheckForReferenceEqualsTests.cs (12)
99new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8))); 119new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9))); 239""", new TestParameters(parseOptions: CSharp7)); 269""", new TestParameters(parseOptions: CSharp9)); 287""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6))); 380""", new TestParameters(parseOptions: CSharp7)); 414""", new TestParameters(parseOptions: CSharp8)); 443""", new TestParameters(parseOptions: CSharp7)); 472""", new TestParameters(parseOptions: CSharp9)); 532""", new TestParameters(parseOptions: CSharp7)); 562""", new TestParameters(parseOptions: CSharp9)); 662""", new TestParameters(parseOptions: CSharp7));
UseLocalFunctionTests.cs (3)
53""", parameters: new TestParameters(parseOptions: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6))); 967new TestParameters(parseOptions: CSharp72ParseOptions)); 1525new TestParameters(parseOptions: CSharp72ParseOptions));
UseSimpleUsingStatementTests.cs (20)
83new TestParameters( 133""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 152""", parameters: new TestParameters(parseOptions: CSharp72ParseOptions)); 171""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 191""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 380new TestParameters(parseOptions: CSharp8ParseOptions)); 557new TestParameters(parseOptions: CSharp8ParseOptions)); 690""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 711""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 734""", parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 757parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 794parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 818parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 857parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 881parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 920parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 942parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 979parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 1003parameters: new TestParameters(parseOptions: CSharp8ParseOptions)); 1042parameters: new TestParameters(parseOptions: CSharp8ParseOptions));
UseSystemHashCodeTests.cs (1)
1337""", new TestParameters(options: UseVarTestExtensions.PreferImplicitTypeWithInfo(this)));
UseThrowExpressionTests.cs (1)
150""", new TestParameters(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)));
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (58)
AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest.vb (1)
43Await MyBase.TestMissingAsync(initialMarkupStr, New TestParameters(parseOptions:=Nothing, compilationOptions:=_compilationOptions))
AddExplicitCastTests.vb (6)
2943Dim workspace = CreateWorkspaceFromOptions(initialMarkup, New TestParameters()) 2944Dim actions = Await GetCodeActionsAsync(workspace, New TestParameters()) 3009Dim workspace = CreateWorkspaceFromOptions(initialMarkup, New TestParameters()) 3010Dim actions = Await GetCodeActionsAsync(workspace, New TestParameters()) 3198Dim workspace = CreateWorkspaceFromOptions(initialMarkup, New TestParameters()) 3199Dim actions = Await GetCodeActionsAsync(workspace, New TestParameters())
MakeFieldReadonlyTests.vb (1)
1171", New TestParameters(parseOptions:=s_strictFeatureFlag))
NamingStylesTests.vb (14)
186end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 234end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 287end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 316end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 328end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 342end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 356end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 365end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 375end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 385end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 395end module", New TestParameters(options:=s_options.LocalNamesAreCamelCase)) 431end module", New TestParameters(options:=s_options.ConstantsAreUpperCase)) 441end module", New TestParameters(options:=s_options.ConstantsAreUpperCase)) 502New TestParameters(options:=s_options.MethodNamesArePascalCase))
QualifyMemberAccessTests.vb (1)
36New TestParameters(options:=[Option](opt, True, notification)))
RemoveUnnecessaryImportsTests.vb (1)
944End Namespace|]</Text>.NormalizedValue, New TestParameters(parseOptions:=TestOptions.Regular))
RemoveUnnecessaryParenthesesTests.vb (23)
50Await TestMissingAsync(initial, parameters:=New TestParameters(options:=RequireAllParenthesesForClarity, compilationOptions:=compilationOptions)) 61end class", New TestParameters(options:=IgnoreAllParentheses)) 81end class", New TestParameters(options:=RequireArithmeticBinaryParenthesesForClarity)) 96end class", parameters:=New TestParameters(options:=RequireArithmeticBinaryParenthesesForClarity)) 106end class", New TestParameters(options:=RequireOtherBinaryParenthesesForClarity)) 121end class", parameters:=New TestParameters(options:=RequireOtherBinaryParenthesesForClarity)) 146end class", New TestParameters(options:=RequireArithmeticBinaryParenthesesForClarity)) 249end class", New TestParameters(options:=RequireAllParenthesesForClarity)) 421end class", New TestParameters(options:=RemoveAllUnnecessaryParentheses)) 431end class", New TestParameters(options:=RemoveAllUnnecessaryParentheses)) 499end class", parameters:=New TestParameters(options:=RequireAllParenthesesForClarity)) 513end class", parameters:=New TestParameters(options:=RequireAllParenthesesForClarity)) 523end class", parameters:=New TestParameters(options:=RequireArithmeticBinaryParenthesesForClarity)) 533end class", parameters:=New TestParameters(options:=RequireAllParenthesesForClarity)) 543end class", parameters:=New TestParameters(options:=RemoveAllUnnecessaryParentheses)) 553end class", parameters:=New TestParameters(options:=RemoveAllUnnecessaryParentheses)) 563end class", parameters:=New TestParameters(options:=RemoveAllUnnecessaryParentheses)) 578end class", parameters:=New TestParameters(options:=RemoveAllUnnecessaryParentheses)) 589end class", New TestParameters(options:=RemoveAllUnnecessaryParentheses), parentheticalExpressionDiagnostic) 601end class", New TestParameters(options:=RemoveAllUnnecessaryParentheses), firstLineParentheticalExpressionDiagnostic) 614end class", New TestParameters(options:=RemoveAllUnnecessaryParentheses, compilationOptions:=DoNotCheckOverflow), expectedDiagnostics) 629end class", New TestParameters(options:=RemoveAllUnnecessaryParentheses, compilationOptions:=DoNotCheckOverflow), expectedDiagnostics) 641Dim parameters = New TestParameters(options:=RemoveAllUnnecessaryParentheses)
RemoveUnusedMembersTests.vb (1)
20Return TestDiagnosticMissingAsync(initialMarkup, New TestParameters(retainNonFixableDiagnostics:=True))
RemoveUnusedParametersTests.vb (1)
20Return TestDiagnosticMissingAsync(initialMarkup, New TestParameters(retainNonFixableDiagnostics:=True))
RemoveUnusedValuesTestsBase.vb (1)
24Return TestMissingInRegularAndScriptAsync(initialMarkup, New TestParameters(options:=options))
SimplifyInterpolationTests.vb (1)
22Dim parameters = New TestParameters(retainNonFixableDiagnostics:=True, includeDiagnosticsOutsideSelection:=True)
UseAutoPropertyTests.vb (2)
342New TestParameters(VisualBasicParseOptions.Default.WithLanguageVersion(LanguageVersion.VisualBasic9))) 467New TestParameters(VisualBasicParseOptions.Default.WithLanguageVersion(LanguageVersion.VisualBasic12)))
UseInferredMemberNameTests.vb (3)
55", parameters:=New TestParameters(s_parseOptions)) 69", New TestParameters(s_parseOptions)) 147", parameters:=New TestParameters(s_parseOptions))
UseNullPropagationTests.vb (2)
51End Class", New TestParameters(VisualBasicParseOptions.Default.WithLanguageVersion(LanguageVersion.VisualBasic12))) 66End Class", New TestParameters(VisualBasicParseOptions.Default.WithLanguageVersion(LanguageVersion.VisualBasic12)))