mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-19 10:20:56 +07:00
also split related tests - PsiNamesElementSignatureProviderTest, OffsetsElementSignatureProviderTest
24 lines
1.1 KiB
Java
24 lines
1.1 KiB
Java
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
|
package com.intellij.codeInsight.folding.impl;
|
|
|
|
import com.intellij.psi.PsiElement;
|
|
import com.intellij.psi.javadoc.PsiDocComment;
|
|
import com.intellij.psi.util.PsiTreeUtil;
|
|
|
|
public class JavaFoldingPolicyTest extends AbstractFoldingPolicyTest {
|
|
public void testAdditionalChildDocComments() {
|
|
myFixture.configureByText("Test.java",
|
|
"/** outer **/\n" +
|
|
"class Test {\n" +
|
|
"/** <caret>inner **/\n" +
|
|
"}");
|
|
PsiElement element = PsiTreeUtil.getParentOfType(myFixture.getFile().findElementAt(myFixture.getCaretOffset()),
|
|
PsiDocComment.class, false);
|
|
assertNotNull(element);
|
|
String signature = FoldingPolicy.getSignature(element);
|
|
if (signature != null) {
|
|
assertEquals(element, FoldingPolicy.restoreBySignature(element.getContainingFile(), signature));
|
|
}
|
|
}
|
|
}
|