From 31478ab519ba25a0c34d1dc04dc0febe59abb981 Mon Sep 17 00:00:00 2001 From: Neal Gafter Date: Tue, 5 Dec 2017 07:59:52 -0800 Subject: [PATCH] Update DiagnosticAnalyzerDriverAllInOne per syntax changes --- .../DiagnosticAnalyzerDriverTests.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/DiagnosticAnalyzerDriver/DiagnosticAnalyzerDriverTests.cs b/src/EditorFeatures/CSharpTest/Diagnostics/DiagnosticAnalyzerDriver/DiagnosticAnalyzerDriverTests.cs index 10726d087c6..a846688a3a9 100644 --- a/src/EditorFeatures/CSharpTest/Diagnostics/DiagnosticAnalyzerDriver/DiagnosticAnalyzerDriverTests.cs +++ b/src/EditorFeatures/CSharpTest/Diagnostics/DiagnosticAnalyzerDriver/DiagnosticAnalyzerDriverTests.cs @@ -30,6 +30,10 @@ public async Task DiagnosticAnalyzerDriverAllInOne() symbolKindsWithNoCodeBlocks.Add(SymbolKind.Property); symbolKindsWithNoCodeBlocks.Add(SymbolKind.NamedType); + // PROTOTYPE(patterns2): Add examples of all the new pattern types once supported. + var syntaxKinds = new HashSet(); + syntaxKinds.Add(SyntaxKind.SubpatternElement); + syntaxKinds.Add(SyntaxKind.DeconstructionPattern); var analyzer = new CSharpTrackingDiagnosticAnalyzer(); using (var workspace = TestWorkspace.CreateCSharp(source, TestOptions.Regular)) @@ -39,7 +43,7 @@ public async Task DiagnosticAnalyzerDriverAllInOne() await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(analyzer, document, new Text.TextSpan(0, document.GetTextAsync().Result.Length)); analyzer.VerifyAllAnalyzerMembersWereCalled(); analyzer.VerifyAnalyzeSymbolCalledForAllSymbolKinds(); - analyzer.VerifyAnalyzeNodeCalledForAllSyntaxKinds(new HashSet()); + analyzer.VerifyAnalyzeNodeCalledForAllSyntaxKinds(syntaxKinds); analyzer.VerifyOnCodeBlockCalledForAllSymbolAndMethodKinds(symbolKindsWithNoCodeBlocks, true); } } -- GitLab