Revert "Light annotations made strictly non-physical (KT-22565)"

This reverts commit cf6e21d
This commit is contained in:
Nicolay Mitropolsky
2018-02-16 13:55:40 +03:00
parent cc7bd80099
commit 47f3a0ce0a
2 changed files with 5 additions and 4 deletions
@@ -78,6 +78,7 @@ class KtLightAnnotationTest : KotlinLightCodeInsightFixtureTestCase() {
val annotation = myFixture.findClass("AnnotatedClass").methods.first { it.name == "bar" }.parameterList.parameters.single()
.expectAnnotations(2).single { it.qualifiedName == "Qualifier" }
val annotationAttributeVal = annotation.findAttributeValue("value") as PsiElement
TestCase.assertTrue(annotationAttributeVal.isPhysical)
assertTextRangeAndValue("\"foo\"", "foo", annotationAttributeVal)
}
@@ -500,7 +501,6 @@ class KtLightAnnotationTest : KotlinLightCodeInsightFixtureTestCase() {
private fun assertTextAndRange(expected: String, psiElement: PsiElement) {
TestCase.assertEquals("mismatch for $psiElement of ${psiElement.javaClass}", expected, psiElement.text)
TestCase.assertEquals(expected, psiElement.textRange.substring(psiElement.containingFile.text))
TestCase.assertEquals(psiElement, PsiAnchor.create(psiElement).retrieve())
}
private fun assertIsKtLightAnnotation(expected: String, psiElement: PsiElement) {