Search in sources :

Example 1 with GoVarDefinition

use of com.goide.psi.GoVarDefinition in project go-lang-idea-plugin by go-lang-plugin-org.

the class GoNamedElementTest method doTestGetUseScope.

private <T> void doTestGetUseScope(@NotNull String text, @NotNull Class<T> scope) {
    myFixture.configureByText("a.go", text);
    PsiFile file = myFixture.getFile();
    GoVarDefinition var = PsiTreeUtil.findChildOfType(file, GoVarDefinition.class);
    assertNotNull(var);
    assertTrue(scope.isInstance(var.getUseScope()));
}
Also used : GoVarDefinition(com.goide.psi.GoVarDefinition) PsiFile(com.intellij.psi.PsiFile)

Aggregations

GoVarDefinition (com.goide.psi.GoVarDefinition)1 PsiFile (com.intellij.psi.PsiFile)1