mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] disable recursion assertions in tests which expect cycles
GitOrigin-RevId: d8099b93c7d3ee2d036c126fa3401bc1b73bda12
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f633ee7073
commit
6c324f0bba
+8
-1
@@ -6,6 +6,7 @@ import com.siyeh.ig.junit.TestClassNamingConvention
|
||||
import org.jetbrains.plugins.groovy.codeInspection.assignment.GroovyAssignabilityCheckInspection
|
||||
import org.jetbrains.plugins.groovy.codeInspection.naming.NewGroovyClassNamingConventionInspection
|
||||
import org.jetbrains.plugins.groovy.codeInspection.untypedUnresolvedAccess.GrUnresolvedAccessInspection
|
||||
import org.jetbrains.plugins.groovy.transformations.TransformationUtilKt
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
@@ -21,6 +22,7 @@ class GroovyHighlightingTest extends GrHighlightingTestBase {
|
||||
}
|
||||
|
||||
void testCircularInheritance() {
|
||||
TransformationUtilKt.disableAssertOnRecursion(testRootDisposable)
|
||||
doTest()
|
||||
}
|
||||
|
||||
@@ -155,7 +157,10 @@ class A {
|
||||
|
||||
void testDuplicateParameterInClosableBlock() { doTest() }
|
||||
|
||||
void testCyclicInheritance() { doTest() }
|
||||
void testCyclicInheritance() {
|
||||
TransformationUtilKt.disableAssertOnRecursion(testRootDisposable)
|
||||
doTest()
|
||||
}
|
||||
|
||||
void testNoDefaultConstructor() { doTest() }
|
||||
|
||||
@@ -185,6 +190,7 @@ class A {
|
||||
}
|
||||
|
||||
void testSOFInDelegate() {
|
||||
TransformationUtilKt.disableAssertOnRecursion(testRootDisposable)
|
||||
doTest()
|
||||
}
|
||||
|
||||
@@ -1711,6 +1717,7 @@ A.foo = 3 //no error
|
||||
}
|
||||
|
||||
void testSOEIfExtendsItself() {
|
||||
TransformationUtilKt.disableAssertOnRecursion(testRootDisposable)
|
||||
testHighlighting('''\
|
||||
<error descr="Cyclic inheritance involving 'A'">class A extends A</error> {
|
||||
def foo
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2019 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 org.jetbrains.plugins.groovy.lang.resolve
|
||||
|
||||
import com.intellij.codeInsight.generation.OverrideImplementUtil
|
||||
@@ -20,6 +6,7 @@ import com.intellij.psi.PsiMethod
|
||||
import com.intellij.psi.PsiMirrorElement
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyFile
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrMethodCall
|
||||
import org.jetbrains.plugins.groovy.transformations.TransformationUtilKt
|
||||
import org.jetbrains.plugins.groovy.util.TestUtils
|
||||
|
||||
/**
|
||||
@@ -227,6 +214,7 @@ new B().fo<caret>o([''])
|
||||
}
|
||||
|
||||
void testCycle() {
|
||||
TransformationUtilKt.disableAssertOnRecursion(testRootDisposable)
|
||||
def file = myFixture.configureByText('a.groovy', '''
|
||||
class A {
|
||||
def foo() {}
|
||||
@@ -286,6 +274,7 @@ new B().fo<caret>o()''')
|
||||
}
|
||||
|
||||
void testInheritanceCycle() {
|
||||
TransformationUtilKt.disableAssertOnRecursion(testRootDisposable)
|
||||
def file = myFixture.configureByText('a.groovy', '''
|
||||
class Base {
|
||||
@Delegate A a
|
||||
|
||||
Reference in New Issue
Block a user