diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/Lightup/ConstantPatternSyntaxWrapperTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/Lightup/ConstantPatternSyntaxWrapperTests.cs index 4483c0c39..bd73f5aec 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/Lightup/ConstantPatternSyntaxWrapperTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/Lightup/ConstantPatternSyntaxWrapperTests.cs @@ -6,6 +6,7 @@ namespace StyleCop.Analyzers.Test.CSharp7.Lightup using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; + using StyleCop.Analyzers.Helpers; using StyleCop.Analyzers.Lightup; using Xunit; @@ -25,6 +26,9 @@ public void TestNull() public void TestExpression() { var syntaxNode = SyntaxFactory.ConstantPattern(SyntaxFactory.LiteralExpression(SyntaxKind.NullLiteralExpression)); + Assert.True(syntaxNode.IsKind(SyntaxKind.ConstantPattern)); + Assert.True(syntaxNode.IsKind(SyntaxKindEx.ConstantPattern)); + var constantPatternSyntax = (ConstantPatternSyntaxWrapper)syntaxNode; Assert.Same(syntaxNode, constantPatternSyntax.SyntaxNode); Assert.Same(syntaxNode.Expression, constantPatternSyntax.Expression); diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/Lightup/DeclarationPatternSyntaxWrapperTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/Lightup/DeclarationPatternSyntaxWrapperTests.cs index 498a9e76e..03502a63c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/Lightup/DeclarationPatternSyntaxWrapperTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/Lightup/DeclarationPatternSyntaxWrapperTests.cs @@ -7,6 +7,7 @@ namespace StyleCop.Analyzers.Test.CSharp7.Lightup using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; + using StyleCop.Analyzers.Helpers; using StyleCop.Analyzers.Lightup; using Xunit; @@ -30,6 +31,9 @@ public void TestProperties() var syntaxNode = SyntaxFactory.DeclarationPattern( SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.IntKeyword)), SyntaxFactory.DiscardDesignation()); + Assert.True(syntaxNode.IsKind(SyntaxKind.DeclarationPattern)); + Assert.True(syntaxNode.IsKind(SyntaxKindEx.DeclarationPattern)); + var declarationPatternSyntax = (DeclarationPatternSyntaxWrapper)syntaxNode; Assert.Same(syntaxNode, declarationPatternSyntax.SyntaxNode); Assert.Same(syntaxNode.Type, declarationPatternSyntax.Type);