Revert: Disable check for "Access to tree elements not allowed in tests" in completion tests.

This commit is contained in:
Ilya Gorbunov
2016-05-11 19:47:32 +03:00
parent f376c418dc
commit a0e8ed7186
2 changed files with 7 additions and 9 deletions
@@ -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");
* 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() {
protected fun doTest(testPath: String) {
configureByFile(getTestName(false) + ".kt", "")
// several tests require disabling this check after adding InclusiveRange, need to investigate why
// val shouldFail = testPath.contains("NoSpecifiedType")
// AstAccessControl.testWithControlledAccessToAst(shouldFail, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
val shouldFail = testPath.contains("NoSpecifiedType")
AstAccessControl.testWithControlledAccessToAst(shouldFail, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
testCompletion(file.text, JvmPlatform, { completionType, invocationCount ->
setType(completionType)
complete(invocationCount)
myItems
}, CompletionType.BASIC, 0)
// })
})
}
override fun getTestDataPath(): String {
@@ -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");
* 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) {
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 ->
setType(completionType)
complete(invocationCount)
myItems
}, CompletionType.SMART, 1)
// })
})
}
override fun getTestDataPath(): String {