mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
28 lines
1.3 KiB
Kotlin
28 lines
1.3 KiB
Kotlin
// 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.codeInspection.tests.kotlin
|
|
|
|
import com.intellij.codeInspection.tests.UnstableApiUsageInspectionTestBase
|
|
import com.intellij.jvm.analysis.JvmAnalysisKtTestsUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH
|
|
import com.intellij.openapi.vfs.VirtualFileFilter
|
|
import com.intellij.testFramework.TestDataPath
|
|
import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl
|
|
|
|
@TestDataPath("/testData/codeInspection/unstableApiUsage")
|
|
class KtUnstableApiUsageInspectionTest : UnstableApiUsageInspectionTestBase() {
|
|
override fun getBasePath() = "${TEST_DATA_PROJECT_RELATIVE_BASE_PATH}/codeInspection/unstableApiUsage"
|
|
|
|
override fun performAdditionalSetUp() {
|
|
// otherwise assertion in PsiFileImpl ("Access to tree elements not allowed") will not pass
|
|
(myFixture as CodeInsightTestFixtureImpl).setVirtualFileFilter(VirtualFileFilter.NONE)
|
|
}
|
|
|
|
fun testInspection() {
|
|
getInspection().myIgnoreInsideImports = false
|
|
myFixture.testHighlighting("UnstableElementsTest.kt")
|
|
}
|
|
|
|
fun testIgnoreImports() {
|
|
getInspection().myIgnoreInsideImports = true
|
|
myFixture.testHighlighting("UnstableElementsIgnoreImportsTest.kt")
|
|
}
|
|
} |