-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PrettyPrintingUtil::displaySignature with extra dimensions
- Loading branch information
Showing
5 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...java/src/test/java/net/sourceforge/pmd/lang/java/ast/internal/PrettyPrintingUtilTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html | ||
*/ | ||
|
||
package net.sourceforge.pmd.lang.java.ast.internal; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import net.sourceforge.pmd.lang.java.ast.ASTCompilationUnit; | ||
import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration; | ||
import net.sourceforge.pmd.lang.java.symboltable.BaseNonParserTest; | ||
|
||
public class PrettyPrintingUtilTest extends BaseNonParserTest { | ||
|
||
@Test | ||
void displaySignatureTestWithExtraDimensions() { | ||
ASTCompilationUnit root = java.parse("class A { public void foo(String[] a[]) {} "); | ||
ASTMethodDeclaration m = root.descendants(ASTMethodDeclaration.class).firstOrThrow(); | ||
|
||
assertEquals("foo(String[][])", PrettyPrintingUtil.displaySignature(m)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters