diff --git a/src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxListTests.cs b/src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxListTests.cs index 8d4e0a14fb2c8830aeba3a79f2005d683c63aeb6..26cfbc18eccfc1d4eaa649e554441a5ee33dffde 100644 --- a/src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxListTests.cs +++ b/src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxListTests.cs @@ -226,9 +226,13 @@ public void AddEmptySyntaxList() } [Fact] - public void AddNamespaceAttributeLists() + public void AddNamespaceAttributeListsAndModifiers() { var declaration = SyntaxFactory.NamespaceDeclaration(SyntaxFactory.ParseName("M")); + + Assert.True(declaration.AttributeLists.Count == 0); + Assert.True(declaration.Modifiers.Count == 0); + declaration = declaration.AddAttributeLists(new[] { SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList( @@ -236,6 +240,12 @@ public void AddNamespaceAttributeLists() }); Assert.True(declaration.AttributeLists.Count == 1); + Assert.True(declaration.Modifiers.Count == 0); + + declaration = declaration.AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword)); + + Assert.True(declaration.AttributeLists.Count == 1); + Assert.True(declaration.Modifiers.Count == 1); } [Fact]