From 77292da7af58a3a57394ce34eaf3e70ef2cc265d Mon Sep 17 00:00:00 2001 From: Maikel Steneker Date: Wed, 23 Dec 2020 10:46:34 +0100 Subject: [PATCH] Add test for empty C# comment. This was previously incorrectly tokenized, because it was recognized as the start of a documentation comment. --- .../net/sourceforge/pmd/lang/cs/cpd/testdata/comments.cs | 2 ++ .../net/sourceforge/pmd/lang/cs/cpd/testdata/comments.txt | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.cs b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.cs index 1757cf2afd..fe3d2575ce 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.cs +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.cs @@ -1,3 +1,5 @@ + /**/ +// the previous comment is an empty delimited comment and not a document comment class Foo { /// class X /* aaa diff --git a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.txt b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.txt index 92214cb4e9..0134960679 100644 --- a/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.txt +++ b/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/comments.txt @@ -1,8 +1,8 @@ [Image] or [Truncated image[ Bcol Ecol -L1 +L3 [class] 1 5 [Foo] 7 9 [{] 11 11 -L6 +L8 [}] 2 2 EOF