Revert: Disable check for "Access to tree elements not allowed in tests" in completion tests.
This commit is contained in:
+4
-5
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2015 JetBrains s.r.o.
|
* Copyright 2010-2016 JetBrains s.r.o.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -23,15 +23,14 @@ import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform
|
|||||||
abstract class AbstractMultiFileJvmBasicCompletionTest : KotlinCompletionTestCase() {
|
abstract class AbstractMultiFileJvmBasicCompletionTest : KotlinCompletionTestCase() {
|
||||||
protected fun doTest(testPath: String) {
|
protected fun doTest(testPath: String) {
|
||||||
configureByFile(getTestName(false) + ".kt", "")
|
configureByFile(getTestName(false) + ".kt", "")
|
||||||
// several tests require disabling this check after adding InclusiveRange, need to investigate why
|
val shouldFail = testPath.contains("NoSpecifiedType")
|
||||||
// val shouldFail = testPath.contains("NoSpecifiedType")
|
AstAccessControl.testWithControlledAccessToAst(shouldFail, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
|
||||||
// AstAccessControl.testWithControlledAccessToAst(shouldFail, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
|
|
||||||
testCompletion(file.text, JvmPlatform, { completionType, invocationCount ->
|
testCompletion(file.text, JvmPlatform, { completionType, invocationCount ->
|
||||||
setType(completionType)
|
setType(completionType)
|
||||||
complete(invocationCount)
|
complete(invocationCount)
|
||||||
myItems
|
myItems
|
||||||
}, CompletionType.BASIC, 0)
|
}, CompletionType.BASIC, 0)
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getTestDataPath(): String {
|
override fun getTestDataPath(): String {
|
||||||
|
|||||||
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2015 JetBrains s.r.o.
|
* Copyright 2010-2016 JetBrains s.r.o.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -28,14 +28,13 @@ abstract class AbstractMultiFileSmartCompletionTest : KotlinCompletionTestCase()
|
|||||||
|
|
||||||
protected fun doTest(testPath: String) {
|
protected fun doTest(testPath: String) {
|
||||||
configureByFile(getTestName(false) + ".kt", "")
|
configureByFile(getTestName(false) + ".kt", "")
|
||||||
// several tests require disabling this check after adding InclusiveRange, need to investigate why
|
AstAccessControl.testWithControlledAccessToAst(false, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
|
||||||
// AstAccessControl.testWithControlledAccessToAst(false, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
|
|
||||||
testCompletion(file.text, JvmPlatform, { completionType, invocationCount ->
|
testCompletion(file.text, JvmPlatform, { completionType, invocationCount ->
|
||||||
setType(completionType)
|
setType(completionType)
|
||||||
complete(invocationCount)
|
complete(invocationCount)
|
||||||
myItems
|
myItems
|
||||||
}, CompletionType.SMART, 1)
|
}, CompletionType.SMART, 1)
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getTestDataPath(): String {
|
override fun getTestDataPath(): String {
|
||||||
|
|||||||
Reference in New Issue
Block a user