mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
junit 5: fix source signature for primitive arrays (IDEA-189846)
This commit is contained in:
@@ -297,6 +297,9 @@ public class ClassUtil {
|
||||
public String visitArrayType(PsiArrayType arrayType) {
|
||||
PsiType componentType = arrayType.getComponentType();
|
||||
String typePresentation = componentType.accept(this);
|
||||
if (arrayType.getDeepComponentType() instanceof PsiPrimitiveType) {
|
||||
return typePresentation + "[]";
|
||||
}
|
||||
if (componentType instanceof PsiClassType) {
|
||||
typePresentation = "L" + typePresentation + ";";
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class JUnit5NamingTest extends JUnit5CodeInsightTest {
|
||||
Arrays.stream(file.getClasses()[0].getMethods())
|
||||
.map(method -> JUnitConfiguration.Data.getMethodPresentation(method))
|
||||
.toArray(String[]::new);
|
||||
Assertions.assertArrayEquals(new String[] {"foo([int)",
|
||||
Assertions.assertArrayEquals(new String[] {"foo(int[])",
|
||||
"foo(int)",
|
||||
"foo([Ljava.lang.String;)",
|
||||
"foo(java.lang.String)",
|
||||
|
||||
Reference in New Issue
Block a user