From 07a257b1fe6d7f9bfcc508736f2ffdd4ab7e4304 Mon Sep 17 00:00:00 2001 From: Alexey Sedunov Date: Tue, 29 Jul 2014 14:55:29 +0400 Subject: [PATCH] Drop JetPsiMatcher class and use JetPsiUnifier instead. Drop AbstractJetPsiMatcherTest --- .../jet/generators/tests/GenerateTests.kt | 6 - .../ReplaceWithOperatorAssignIntention.kt | 49 +- .../branchedTransformationUtils.kt | 32 +- .../declarations/DeclarationUtils.java | 5 +- .../jet/plugin/util/JetPsiMatcher.java | 288 ---------- .../expressions/arrayAccess/_arrayAccess1.kt | 2 - .../arrayAccess/_arrayAccess1.kt.2 | 1 - .../expressions/arrayAccess/_arrayAccess2.kt | 2 - .../arrayAccess/_arrayAccess2.kt.2 | 1 - .../expressions/arrayAccess/_arrayAccess3.kt | 2 - .../arrayAccess/_arrayAccess3.kt.2 | 1 - .../expressions/arrayAccess/arrayAccess1.kt | 1 - .../expressions/arrayAccess/arrayAccess1.kt.2 | 1 - .../expressions/arrayAccess/arrayAccess2.kt | 1 - .../expressions/arrayAccess/arrayAccess2.kt.2 | 1 - .../expressions/binaryExpr/_binaryExpr1.kt | 2 - .../expressions/binaryExpr/_binaryExpr1.kt.2 | 1 - .../expressions/binaryExpr/_binaryExpr2.kt | 2 - .../expressions/binaryExpr/_binaryExpr2.kt.2 | 1 - .../expressions/binaryExpr/_binaryExpr3.kt | 2 - .../expressions/binaryExpr/_binaryExpr3.kt.2 | 1 - .../expressions/binaryExpr/_binaryExpr4.kt | 2 - .../expressions/binaryExpr/_binaryExpr4.kt.2 | 1 - .../expressions/binaryExpr/_binaryExpr5.kt | 2 - .../expressions/binaryExpr/_binaryExpr5.kt.2 | 1 - .../expressions/binaryExpr/_binaryExpr6.kt | 2 - .../expressions/binaryExpr/_binaryExpr6.kt.2 | 1 - .../expressions/binaryExpr/binaryExpr1.kt | 1 - .../expressions/binaryExpr/binaryExpr1.kt.2 | 1 - .../expressions/binaryExpr/binaryExpr2.kt | 1 - .../expressions/binaryExpr/binaryExpr2.kt.2 | 1 - .../expressions/binaryExpr/binaryExpr3.kt | 1 - .../expressions/binaryExpr/binaryExpr3.kt.2 | 1 - .../expressions/binaryExpr/binaryExpr4.kt | 1 - .../expressions/binaryExpr/binaryExpr4.kt.2 | 1 - .../expressions/binaryExpr/binaryExpr5.kt | 1 - .../expressions/binaryExpr/binaryExpr5.kt.2 | 1 - .../jetPsiMatcher/expressions/call/_call1.kt | 2 - .../expressions/call/_call1.kt.2 | 1 - .../jetPsiMatcher/expressions/call/_call2.kt | 2 - .../expressions/call/_call2.kt.2 | 1 - .../jetPsiMatcher/expressions/call/_call3.kt | 2 - .../expressions/call/_call3.kt.2 | 1 - .../jetPsiMatcher/expressions/call/_call4.kt | 2 - .../expressions/call/_call4.kt.2 | 1 - .../jetPsiMatcher/expressions/call/call1.kt | 1 - .../jetPsiMatcher/expressions/call/call1.kt.2 | 1 - .../jetPsiMatcher/expressions/call/call2.kt | 1 - .../jetPsiMatcher/expressions/call/call2.kt.2 | 1 - .../jetPsiMatcher/expressions/call/call3.kt | 1 - .../jetPsiMatcher/expressions/call/call3.kt.2 | 1 - .../jetPsiMatcher/expressions/call/call4.kt | 1 - .../jetPsiMatcher/expressions/call/call4.kt.2 | 1 - .../jetPsiMatcher/expressions/const/_const.kt | 2 - .../expressions/const/_const.kt.2 | 1 - .../jetPsiMatcher/expressions/const/const.kt | 1 - .../expressions/const/const.kt.2 | 1 - .../jetPsiMatcher/expressions/misc/_misc1.kt | 2 - .../expressions/misc/_misc1.kt.2 | 1 - .../jetPsiMatcher/expressions/misc/_misc2.kt | 2 - .../expressions/misc/_misc2.kt.2 | 1 - .../jetPsiMatcher/expressions/misc/_misc3.kt | 2 - .../expressions/misc/_misc3.kt.2 | 1 - .../jetPsiMatcher/expressions/misc/misc1.kt | 1 - .../jetPsiMatcher/expressions/misc/misc1.kt.2 | 1 - .../jetPsiMatcher/expressions/misc/misc2.kt | 1 - .../jetPsiMatcher/expressions/misc/misc2.kt.2 | 1 - .../jetPsiMatcher/expressions/misc/misc3.kt | 1 - .../jetPsiMatcher/expressions/misc/misc3.kt.2 | 1 - .../expressions/simpleName/_simpleName.kt | 2 - .../expressions/simpleName/_simpleName.kt.2 | 2 - .../expressions/simpleName/simpleName.kt | 1 - .../expressions/simpleName/simpleName.kt.2 | 1 - .../expressions/simpleName/simpleName2.kt | 1 - .../expressions/simpleName/simpleName2.kt.2 | 1 - .../expressions/super/_super1.kt | 2 - .../expressions/super/_super1.kt.2 | 1 - .../expressions/super/_super2.kt | 2 - .../expressions/super/_super2.kt.2 | 1 - .../expressions/super/_super3.kt | 2 - .../expressions/super/_super3.kt.2 | 1 - .../expressions/super/_super4.kt | 2 - .../expressions/super/_super4.kt.2 | 1 - .../jetPsiMatcher/expressions/super/super1.kt | 1 - .../expressions/super/super1.kt.2 | 1 - .../jetPsiMatcher/expressions/super/super2.kt | 1 - .../expressions/super/super2.kt.2 | 1 - .../jetPsiMatcher/expressions/super/super3.kt | 1 - .../expressions/super/super3.kt.2 | 1 - .../jetPsiMatcher/expressions/super/super4.kt | 1 - .../expressions/super/super4.kt.2 | 1 - .../jetPsiMatcher/expressions/throw/_throw.kt | 2 - .../expressions/throw/_throw.kt.2 | 2 - .../jetPsiMatcher/expressions/throw/throw.kt | 1 - .../expressions/throw/throw.kt.2 | 1 - .../expressions/unaryExpr/_unaryExpr1.kt | 2 - .../expressions/unaryExpr/_unaryExpr1.kt.2 | 1 - .../expressions/unaryExpr/_unaryExpr2.kt | 2 - .../expressions/unaryExpr/_unaryExpr2.kt.2 | 2 - .../expressions/unaryExpr/_unaryExpr3.kt | 2 - .../expressions/unaryExpr/_unaryExpr3.kt.2 | 2 - .../expressions/unaryExpr/unaryExpr1.kt | 1 - .../expressions/unaryExpr/unaryExpr1.kt.2 | 1 - .../expressions/unaryExpr/unaryExpr2.kt | 1 - .../expressions/unaryExpr/unaryExpr2.kt.2 | 1 - .../jetPsiMatcher/types/_functional1.kt | 2 - .../jetPsiMatcher/types/_functional1.kt.2 | 1 - .../jetPsiMatcher/types/_functional2.kt | 2 - .../jetPsiMatcher/types/_functional2.kt.2 | 1 - .../jetPsiMatcher/types/_nullable1.kt | 2 - .../jetPsiMatcher/types/_nullable1.kt.2 | 1 - idea/testData/jetPsiMatcher/types/_user1.kt | 2 - idea/testData/jetPsiMatcher/types/_user1.kt.2 | 1 - idea/testData/jetPsiMatcher/types/_user2.kt | 2 - idea/testData/jetPsiMatcher/types/_user2.kt.2 | 1 - .../jetPsiMatcher/types/functional1.kt | 1 - .../jetPsiMatcher/types/functional1.kt.2 | 1 - .../jetPsiMatcher/types/functional2.kt | 1 - .../jetPsiMatcher/types/functional2.kt.2 | 1 - .../jetPsiMatcher/types/functional3.kt | 1 - .../jetPsiMatcher/types/functional3.kt.2 | 1 - .../testData/jetPsiMatcher/types/nullable1.kt | 1 - .../jetPsiMatcher/types/nullable1.kt.2 | 1 - idea/testData/jetPsiMatcher/types/user1.kt | 1 - idea/testData/jetPsiMatcher/types/user1.kt.2 | 1 - idea/testData/jetPsiMatcher/types/user2.kt | 1 - idea/testData/jetPsiMatcher/types/user2.kt.2 | 1 - .../jet/psi/AbstractJetPsiMatcherTest.java | 74 --- .../jet/psi/JetPsiMatcherTestGenerated.java | 513 ------------------ 129 files changed, 44 insertions(+), 1080 deletions(-) delete mode 100644 idea/src/org/jetbrains/jet/plugin/util/JetPsiMatcher.java delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr4.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr4.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr5.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr5.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr6.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr6.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr4.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr4.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr5.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr5.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/_call1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/_call1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/_call2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/_call2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/_call3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/_call3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/_call4.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/_call4.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/call1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/call1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/call2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/call2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/call3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/call3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/call4.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/call/call4.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/const/_const.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/const/_const.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/const/const.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/const/const.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/_misc1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/_misc1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/_misc2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/_misc2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/_misc3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/_misc3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/misc1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/misc1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/misc2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/misc2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/misc3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/misc/misc3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/simpleName/_simpleName.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/simpleName/_simpleName.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/simpleName/simpleName.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/simpleName/simpleName.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/simpleName/simpleName2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/simpleName/simpleName2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/_super1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/_super1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/_super2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/_super2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/_super3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/_super3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/_super4.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/_super4.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/super1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/super1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/super2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/super2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/super3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/super3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/super4.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/super/super4.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/throw/_throw.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/throw/_throw.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/throw/throw.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/throw/throw.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr3.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr1.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr2.kt delete mode 100644 idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/_functional1.kt delete mode 100644 idea/testData/jetPsiMatcher/types/_functional1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/_functional2.kt delete mode 100644 idea/testData/jetPsiMatcher/types/_functional2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/_nullable1.kt delete mode 100644 idea/testData/jetPsiMatcher/types/_nullable1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/_user1.kt delete mode 100644 idea/testData/jetPsiMatcher/types/_user1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/_user2.kt delete mode 100644 idea/testData/jetPsiMatcher/types/_user2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/functional1.kt delete mode 100644 idea/testData/jetPsiMatcher/types/functional1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/functional2.kt delete mode 100644 idea/testData/jetPsiMatcher/types/functional2.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/functional3.kt delete mode 100644 idea/testData/jetPsiMatcher/types/functional3.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/nullable1.kt delete mode 100644 idea/testData/jetPsiMatcher/types/nullable1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/user1.kt delete mode 100644 idea/testData/jetPsiMatcher/types/user1.kt.2 delete mode 100644 idea/testData/jetPsiMatcher/types/user2.kt delete mode 100644 idea/testData/jetPsiMatcher/types/user2.kt.2 delete mode 100644 idea/tests/org/jetbrains/jet/psi/AbstractJetPsiMatcherTest.java delete mode 100644 idea/tests/org/jetbrains/jet/psi/JetPsiMatcherTestGenerated.java diff --git a/generators/src/org/jetbrains/jet/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/jet/generators/tests/GenerateTests.kt index ad24de54345..69443282590 100644 --- a/generators/src/org/jetbrains/jet/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/jet/generators/tests/GenerateTests.kt @@ -42,7 +42,6 @@ import org.jetbrains.jet.jvm.compiler.AbstractWriteSignatureTest import org.jetbrains.jet.cli.AbstractKotlincExecutableTest import org.jetbrains.jet.repl.AbstractReplInterpreterTest import org.jetbrains.jet.cfg.AbstractControlFlowTest -import org.jetbrains.jet.psi.AbstractJetPsiMatcherTest import org.jetbrains.jet.checkers.AbstractJetPsiCheckerTest import org.jetbrains.jet.checkers.AbstractJetJsCheckerTest import org.jetbrains.jet.plugin.quickfix.AbstractQuickFixTest @@ -296,11 +295,6 @@ fun main(args: Array) { model("resolve/additionalLazyResolve") } - testClass(javaClass()) { - model("jetPsiMatcher/expressions", testMethod = "doTestExpressions") - model("jetPsiMatcher/types", testMethod = "doTestTypes") - } - testClass(javaClass()) { model("checker", recursive = false) model("checker/regression") diff --git a/idea/src/org/jetbrains/jet/plugin/intentions/ReplaceWithOperatorAssignIntention.kt b/idea/src/org/jetbrains/jet/plugin/intentions/ReplaceWithOperatorAssignIntention.kt index f10d9a38dc9..fc520b87005 100644 --- a/idea/src/org/jetbrains/jet/plugin/intentions/ReplaceWithOperatorAssignIntention.kt +++ b/idea/src/org/jetbrains/jet/plugin/intentions/ReplaceWithOperatorAssignIntention.kt @@ -23,9 +23,11 @@ import org.jetbrains.jet.lang.psi.JetPsiFactory import org.jetbrains.jet.lang.psi.JetSimpleNameExpression import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache import org.jetbrains.jet.lang.resolve.BindingContext -import org.jetbrains.jet.plugin.util.JetPsiMatcher import org.jetbrains.jet.lang.descriptors.ClassDescriptor import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns +import org.jetbrains.jet.plugin.util.psi.patternMatching.JetPsiUnifier +import org.jetbrains.jet.plugin.util.psi.patternMatching.UnificationResult +import org.jetbrains.jet.plugin.util.psi.patternMatching.matches public class ReplaceWithOperatorAssignIntention : JetSelfTargetingIntention("replace.with.operator.assign.intention", javaClass()) { @@ -46,33 +48,38 @@ public class ReplaceWithOperatorAssignIntention : JetSelfTargetingIntention { + return when { + variableExpression.matches(expression.getLeft()) -> { val validity = expression.getOperationToken() == JetTokens.PLUS || - expression.getOperationToken() == JetTokens.MINUS || - expression.getOperationToken() == JetTokens.MUL || - expression.getOperationToken() == JetTokens.DIV || - expression.getOperationToken() == JetTokens.PERC + expression.getOperationToken() == JetTokens.MINUS || + expression.getOperationToken() == JetTokens.MUL || + expression.getOperationToken() == JetTokens.DIV || + expression.getOperationToken() == JetTokens.PERC if (validity) { setText("Replace with ${expression.getOperationReference().getText()}= Expression") } - return validity + validity } - JetPsiMatcher.checkElementMatch(variableExpression, expression.getRight()) -> { + + variableExpression.matches(expression.getRight()) -> { val validity = (expression.getOperationToken() == JetTokens.PLUS || - expression.getOperationToken() == JetTokens.MUL) && - isPrimitiveOperation + expression.getOperationToken() == JetTokens.MUL) && + isPrimitiveOperation if (validity) { setText("Replace with ${expression.getOperationReference().getText()}= Expression") } - return validity + validity } - expression.getLeft() is JetBinaryExpression -> return isPrimitiveOperation && checkExpressionRepeat(variableExpression, expression.getLeft() as JetBinaryExpression) - else -> return false + + expression.getLeft() is JetBinaryExpression -> + isPrimitiveOperation && checkExpressionRepeat(variableExpression, expression.getLeft() as JetBinaryExpression) + + else -> + false } } @@ -87,21 +94,29 @@ public class ReplaceWithOperatorAssignIntention : JetSelfTargetingIntention { + variableExpression.matches(expression.getLeft()) -> { return "${variableExpression.getText()} ${expression.getOperationReference().getText()}= ${expression.getRight()!!.getText()} ${replacementBuilder.toString()}" } - JetPsiMatcher.checkElementMatch(variableExpression, expression.getRight()) -> { + + variableExpression.matches(expression.getRight()) -> { return "${variableExpression.getText()} ${expression.getOperationReference().getText()}= ${expression.getLeft()!!.getText()} ${replacementBuilder.toString()}" } + expression.getLeft() is JetBinaryExpression -> { return buildReplacement(variableExpression, expression.getLeft() as JetBinaryExpression, StringBuilder("${expression.getOperationReference().getText()} ${expression.getRight()!!.getText()} ${replacementBuilder.toString()}")) } + else -> { return replacementBuilder.toString() } } } - element.replace(JetPsiFactory(element).createExpression(buildReplacement(element.getLeft() as JetSimpleNameExpression, element.getRight() as JetBinaryExpression, StringBuilder()))) + val replacement = buildReplacement( + (element.getLeft() as JetSimpleNameExpression), + element.getRight() as JetBinaryExpression, + StringBuilder() + ) + element.replace(JetPsiFactory(element).createExpression(replacement)) } } \ No newline at end of file diff --git a/idea/src/org/jetbrains/jet/plugin/intentions/branchedTransformations/branchedTransformationUtils.kt b/idea/src/org/jetbrains/jet/plugin/intentions/branchedTransformations/branchedTransformationUtils.kt index 8a45ed4b5be..eda4c8875a6 100644 --- a/idea/src/org/jetbrains/jet/plugin/intentions/branchedTransformations/branchedTransformationUtils.kt +++ b/idea/src/org/jetbrains/jet/plugin/intentions/branchedTransformations/branchedTransformationUtils.kt @@ -18,7 +18,6 @@ package org.jetbrains.jet.plugin.intentions.branchedTransformations import org.jetbrains.jet.lang.psi.* import org.jetbrains.jet.lexer.JetTokens -import org.jetbrains.jet.plugin.util.JetPsiMatcher import org.jetbrains.jet.lang.psi.JetPsiUnparsingUtils.* import org.jetbrains.jet.lang.psi.psiUtil.* import java.util.ArrayList @@ -26,6 +25,11 @@ import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.PsiWhiteSpace import java.util.Collections import com.intellij.util.containers.ContainerUtil +import org.jetbrains.jet.plugin.util.psi.patternMatching.JetPsiUnifier +import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache +import org.jetbrains.jet.plugin.util.psi.patternMatching.toRange +import org.jetbrains.jet.plugin.util.psi.patternMatching.UnificationResult +import org.jetbrains.jet.plugin.util.psi.patternMatching.matches public val TRANSFORM_WITHOUT_CHECK: String = "Expression must be checked before applying transformation" @@ -70,8 +74,7 @@ public fun JetWhenExpression.canFlatten(): Boolean { val elseBranch = getElseExpression() if (elseBranch !is JetWhenExpression) return false - return JetPsiUtil.checkWhenExpressionHasSingleElse(elseBranch) && - JetPsiMatcher.checkElementMatch(subject, elseBranch.getSubjectExpression()) + return JetPsiUtil.checkWhenExpressionHasSingleElse(elseBranch) && subject.matches(elseBranch.getSubjectExpression()) } fun JetWhenExpression.getSubjectCandidate(): JetExpression? { @@ -113,7 +116,7 @@ fun JetWhenExpression.getSubjectCandidate(): JetExpression? { if (lastCandidate == null) { lastCandidate = currCandidate } - else if (!JetPsiMatcher.checkElementMatch(lastCandidate, currCandidate)) return null + else if (!lastCandidate.matches(currCandidate)) return null } } @@ -179,14 +182,7 @@ public fun JetWhenExpression.introduceSubject(): JetWhenExpression { when (op) { JetTokens.IN_KEYWORD -> builder.range(rhs, false) JetTokens.NOT_IN -> builder.range(rhs, true) - JetTokens.EQEQ -> { - if (JetPsiMatcher.checkElementMatch(subject, lhs)) { - builder.condition(rhs) - } - else { - builder.condition(lhs) - } - } + JetTokens.EQEQ -> builder.condition(if (subject.matches(lhs)) rhs else lhs) else -> assert(false, TRANSFORM_WITHOUT_CHECK) } } @@ -321,14 +317,8 @@ public fun JetWhenExpression.transformToIf() { } public fun JetWhenExpression.canMergeWithNext(): Boolean { - fun checkConditions(e1: JetWhenEntry, e2: JetWhenEntry): Boolean { - if (e1.isElse() != e2.isElse()) return false - - val conditions1 = e1.getConditions().toList() - val conditions2 = e2.getConditions().toList() - return conditions1.size == conditions2.size && - (conditions1 zip conditions2).all { pair -> JetPsiMatcher.checkElementMatch(pair.first, pair.second)} - } + fun checkConditions(e1: JetWhenEntry, e2: JetWhenEntry): Boolean = + e1.getConditions().toList().toRange().matches(e2.getConditions().toList().toRange()) fun JetWhenEntry.declarationNames(): Set = getExpression()?.blockExpressionsOrSingle() @@ -348,7 +338,7 @@ public fun JetWhenExpression.canMergeWithNext(): Boolean { val sibling = PsiTreeUtil.skipSiblingsForward(this, javaClass()) if (sibling !is JetWhenExpression) return false - if (!JetPsiMatcher.checkElementMatch(getSubjectExpression(), sibling.getSubjectExpression())) return false + if (!getSubjectExpression().matches(sibling.getSubjectExpression())) return false val entries1 = getEntries() val entries2 = sibling.getEntries() diff --git a/idea/src/org/jetbrains/jet/plugin/intentions/declarations/DeclarationUtils.java b/idea/src/org/jetbrains/jet/plugin/intentions/declarations/DeclarationUtils.java index 8da4b4a8d47..1d929afc7e8 100644 --- a/idea/src/org/jetbrains/jet/plugin/intentions/declarations/DeclarationUtils.java +++ b/idea/src/org/jetbrains/jet/plugin/intentions/declarations/DeclarationUtils.java @@ -17,7 +17,6 @@ package org.jetbrains.jet.plugin.intentions.declarations; import com.google.common.base.Predicate; -import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Pair; import com.intellij.psi.PsiComment; import com.intellij.psi.PsiElement; @@ -30,7 +29,6 @@ import org.jetbrains.jet.lang.types.JetType; import org.jetbrains.jet.lexer.JetTokens; import org.jetbrains.jet.plugin.codeInsight.ShortenReferences; import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache; -import org.jetbrains.jet.plugin.util.JetPsiMatcher; import org.jetbrains.jet.renderer.DescriptorRenderer; import static org.jetbrains.jet.lang.psi.PsiPackage.JetPsiFactory; @@ -77,8 +75,7 @@ public class DeclarationUtils { if (!(assignment.getLeft() instanceof JetSimpleNameExpression)) return null; if (assignment.getRight() == null) return null; - //noinspection ConstantConditions - if (!JetPsiMatcher.checkIdentifierMatch(property.getNameIdentifier().getText(), assignment.getLeft().getText())) return null; + if (!JetPsiUtil.unquoteIdentifier(assignment.getLeft().getText()).equals(property.getName())) return null; return new Pair(property, assignment); } diff --git a/idea/src/org/jetbrains/jet/plugin/util/JetPsiMatcher.java b/idea/src/org/jetbrains/jet/plugin/util/JetPsiMatcher.java deleted file mode 100644 index 1ac0a8088c5..00000000000 --- a/idea/src/org/jetbrains/jet/plugin/util/JetPsiMatcher.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright 2010-2013 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. - */ - -package org.jetbrains.jet.plugin.util; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import org.jetbrains.jet.lang.psi.*; - -import java.util.Arrays; -import java.util.List; - -public class JetPsiMatcher { - private JetPsiMatcher() { - } - - private static boolean checkTypeReferenceMatch(JetTypeReference t1, JetTypeReference t2) { - return (t1 == t2) || (t1 != null && t2 != null && t1.getText().equals(t2.getText())); - } - - private interface Predicate2 { - boolean apply(A a, B b); - } - - private static final Predicate2 DEFAULT_CHECKER = new Predicate2() { - @Override - public boolean apply(JetElement element1, JetElement element2) { - return checkElementMatch(element1, element2); - } - }; - - private static final Predicate2 VALUE_ARGUMENT_CHECKER = new Predicate2() { - @Override - public boolean apply(ValueArgument a1, ValueArgument a2) { - if (a1 == a2) return true; - if (a1 == null || a2 == null) return false; - - if (a1.getClass() != a2.getClass()) return false; - - if (a1.isNamed() != a2.isNamed()) return false; - - if (!checkElementMatch(a1.getArgumentExpression(), a2.getArgumentExpression())) return false; - - if (a1.isNamed()) { - return checkElementMatch(a1.getArgumentName(), a2.getArgumentName()); - } - - return true; - } - }; - - private static final Predicate2 PARAMETER_TYPE_CHECKER = new Predicate2() { - @Override - public boolean apply(JetParameter param1, JetParameter param2) { - return checkElementMatch(param1.getTypeReference(), param2.getTypeReference()); - } - }; - - private static boolean checkListMatch(List list1, List list2, Predicate2 checker) { - int n = list1.size(); - if (list2.size() != n) return false; - - for (int i = 0; i < n; i++) { - if (!checker.apply(list1.get(i), list2.get(i))) return false; - } - - return true; - } - - private static boolean checkListMatch(List list1, List list2) { - return checkListMatch(list1, list2, DEFAULT_CHECKER); - } - - private static final JetVisitor VISITOR = new JetVisitor() { - @Override - public Boolean visitJetElement(@NotNull JetElement element, JetElement data) { - return false; - } - - @Override - public Boolean visitArrayAccessExpression(@NotNull JetArrayAccessExpression aae1, JetElement data) { - JetArrayAccessExpression aae2 = (JetArrayAccessExpression) data; - - return checkElementMatch(aae1.getArrayExpression(), aae2.getArrayExpression()) && - checkListMatch(aae1.getIndexExpressions(), aae2.getIndexExpressions()); - } - - @Override - public Boolean visitBinaryExpression(@NotNull JetBinaryExpression be1, JetElement data) { - JetBinaryExpression be2 = (JetBinaryExpression) data; - - return be1.getOperationToken() == be2.getOperationToken() && - checkElementMatch(be1.getLeft(), be2.getLeft()) && - checkElementMatch(be1.getRight(), be2.getRight()); - } - - @Override - public Boolean visitBinaryWithTypeRHSExpression(@NotNull JetBinaryExpressionWithTypeRHS bet1, JetElement data) { - JetBinaryExpressionWithTypeRHS bet2 = (JetBinaryExpressionWithTypeRHS) data; - - return checkElementMatch(bet1.getLeft(), bet2.getLeft()) && - checkTypeReferenceMatch(bet1.getRight(), bet2.getRight()); - } - - @Override - public Boolean visitCallExpression(@NotNull JetCallExpression call1, JetElement data) { - JetCallExpression call2 = (JetCallExpression) data; - - if (!checkElementMatch(call1.getCalleeExpression(), call2.getCalleeExpression())) return false; - - return checkListMatch(call1.getValueArguments(), call2.getValueArguments(), VALUE_ARGUMENT_CHECKER); - } - - @Override - public Boolean visitSimpleNameExpression(@NotNull JetSimpleNameExpression expression, JetElement data) { - return checkIdentifierMatch(expression.getText(), data.getText()); - } - - @Override - public Boolean visitConstantExpression(@NotNull JetConstantExpression expression, JetElement data) { - return expression.getText().equals(data.getText()); - } - - @Override - public Boolean visitIsExpression(@NotNull JetIsExpression is1, JetElement data) { - JetIsExpression is2 = (JetIsExpression) data; - - return checkElementMatch(is1.getLeftHandSide(), is2.getLeftHandSide()) && - checkTypeReferenceMatch(is1.getTypeRef(), is2.getTypeRef()) && - is1.isNegated() == is2.isNegated(); - } - - @Override - public Boolean visitQualifiedExpression(@NotNull JetQualifiedExpression qe1, JetElement data) { - JetQualifiedExpression qe2 = (JetQualifiedExpression) data; - - return qe1.getOperationSign() == qe2.getOperationSign() && - checkElementMatch(qe1.getReceiverExpression(), qe2.getReceiverExpression()) && - checkElementMatch(qe1.getSelectorExpression(), qe2.getSelectorExpression()); - } - - @Override - public Boolean visitStringTemplateExpression(@NotNull JetStringTemplateExpression expression, JetElement data) { - return checkListMatch( - Arrays.asList(expression.getEntries()), - Arrays.asList(((JetStringTemplateExpression) data).getEntries()) - ); - } - - @Override - public Boolean visitStringTemplateEntryWithExpression(@NotNull JetStringTemplateEntryWithExpression entry, JetElement data) { - return checkElementMatch(entry.getExpression(), ((JetStringTemplateEntryWithExpression) data).getExpression()); - } - - @Override - public Boolean visitLiteralStringTemplateEntry(@NotNull JetLiteralStringTemplateEntry entry, JetElement data) { - return entry.getText().equals(data.getText()); - } - - @Override - public Boolean visitEscapeStringTemplateEntry(@NotNull JetEscapeStringTemplateEntry entry, JetElement data) { - return entry.getText().equals(data.getText()); - } - - @Override - public Boolean visitSuperExpression(@NotNull JetSuperExpression super1, JetElement data) { - JetSuperExpression super2 = (JetSuperExpression) data; - - return checkTypeReferenceMatch(super1.getSuperTypeQualifier(), super2.getSuperTypeQualifier()) && - checkElementMatch(super1.getInstanceReference(), super2.getInstanceReference()) && - checkElementMatch(super1.getTargetLabel(), super2.getTargetLabel()); - } - - @Override - public Boolean visitThrowExpression(@NotNull JetThrowExpression expression, JetElement data) { - return checkElementMatch(expression.getThrownExpression(), ((JetThrowExpression) data).getThrownExpression()); - } - - @Override - public Boolean visitThisExpression(@NotNull JetThisExpression this1, JetElement data) { - return checkElementMatch(this1.getTargetLabel(), ((JetThisExpression) data).getTargetLabel()); - } - - @Override - public Boolean visitUnaryExpression(@NotNull JetUnaryExpression ue1, JetElement data) { - JetUnaryExpression ue2 = (JetUnaryExpression) data; - - return checkElementMatch(ue1.getBaseExpression(), ue2.getBaseExpression()) && - checkElementMatch(ue1.getOperationReference(), ue2.getOperationReference()); - } - - @Override - public Boolean visitTypeReference(@NotNull JetTypeReference typeReference, JetElement data) { - return checkElementMatch(typeReference.getTypeElement(), ((JetTypeReference) data).getTypeElement()); - } - - @Override - public Boolean visitFunctionType(@NotNull JetFunctionType type1, JetElement data) { - JetFunctionType type2 = (JetFunctionType) data; - - return checkElementMatch(type1.getReceiverTypeRef(), type2.getReceiverTypeRef()) && - checkElementMatch(type1.getReturnTypeRef(), type2.getReturnTypeRef()) && - checkListMatch(type1.getParameters(), type2.getParameters(), PARAMETER_TYPE_CHECKER); - } - - @Override - public Boolean visitUserType(@NotNull JetUserType type1, JetElement data) { - JetUserType type2 = (JetUserType) data; - - return checkElementMatch(type1.getReferenceExpression(), type2.getReferenceExpression()) && - checkElementMatch(type1.getQualifier(), type2.getQualifier()) && - checkListMatch(type1.getTypeArgumentsAsTypes(), type2.getTypeArgumentsAsTypes()); - } - - @Override - public Boolean visitSelfType(@NotNull JetSelfType type, JetElement data) { - return true; - } - - @Override - public Boolean visitNullableType(@NotNull JetNullableType nullableType, JetElement data) { - return checkElementMatch(nullableType.getInnerType(), ((JetNullableType) data).getInnerType()); - } - - @Override - public Boolean visitWhenConditionWithExpression(@NotNull JetWhenConditionWithExpression condition, JetElement data) { - return checkElementMatch(condition.getExpression(), ((JetWhenConditionWithExpression) data).getExpression()); - } - - @Override - public Boolean visitWhenConditionInRange(@NotNull JetWhenConditionInRange condition, JetElement data) { - JetWhenConditionInRange other = (JetWhenConditionInRange) data; - return condition.isNegated() == other.isNegated() && - checkElementMatch(condition.getRangeExpression(), other.getRangeExpression()); - } - - @Override - public Boolean visitWhenConditionIsPattern(@NotNull JetWhenConditionIsPattern condition, JetElement data) { - JetWhenConditionIsPattern other = (JetWhenConditionIsPattern) data; - return condition.isNegated() == other.isNegated() && - checkElementMatch(condition.getTypeRef(), other.getTypeRef()); - } - }; - - private static JetElement unwrap(JetElement e) { - if (e instanceof JetExpression) { - return JetPsiUtil.deparenthesize((JetExpression) e); - } - return e; - } - - public static boolean checkElementMatch(@Nullable JetElement e1, @Nullable JetElement e2) { - e1 = unwrap(e1); - e2 = unwrap(e2); - - if (e1 == e2) return true; - if (e1 == null || e2 == null) return false; - - if (e1.getClass() != e2.getClass()) return false; - - return e1.accept(VISITOR, e2); - } - - @NotNull - private static String unquote(@NotNull String s) { - return (s.startsWith("`") && s.endsWith("`")) ? s.substring(1, s.length() - 1) : s; - } - - public static boolean checkIdentifierMatch(@Nullable String s1, @Nullable String s2) { - if (s1 == s2) return true; - if (s1 == null || s2 == null) return false; - - return unquote(s1).equals(unquote(s2)); - } -} diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess1.kt b/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess1.kt deleted file mode 100644 index aead762075d..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess1.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -a[0] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess1.kt.2 b/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess1.kt.2 deleted file mode 100644 index 7e47cf58a31..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -b[0] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess2.kt b/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess2.kt deleted file mode 100644 index aead762075d..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess2.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -a[0] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess2.kt.2 b/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess2.kt.2 deleted file mode 100644 index e4ce9c1e8bb..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a[2] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess3.kt b/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess3.kt deleted file mode 100644 index aead762075d..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess3.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -a[0] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess3.kt.2 b/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess3.kt.2 deleted file mode 100644 index f8d9bf02262..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a[n] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess1.kt b/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess1.kt deleted file mode 100644 index 1727bf901f2..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess1.kt +++ /dev/null @@ -1 +0,0 @@ -a[0] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess1.kt.2 b/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess1.kt.2 deleted file mode 100644 index 1727bf901f2..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a[0] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess2.kt b/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess2.kt deleted file mode 100644 index f8d9bf02262..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess2.kt +++ /dev/null @@ -1 +0,0 @@ -a[n] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess2.kt.2 b/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess2.kt.2 deleted file mode 100644 index f8d9bf02262..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a[n] \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr1.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr1.kt deleted file mode 100644 index cb38a52f476..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr1.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -1 + 2 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr1.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr1.kt.2 deleted file mode 100644 index 1ad61fe45a2..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -2 + 1 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr2.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr2.kt deleted file mode 100644 index cb38a52f476..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr2.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -1 + 2 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr2.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr2.kt.2 deleted file mode 100644 index 7ec0a893aef..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -1 - 2 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr3.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr3.kt deleted file mode 100644 index 2e1a1bf0cbd..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr3.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -a + 2 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr3.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr3.kt.2 deleted file mode 100644 index fe98fcd3d5a..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -b + 2 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr4.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr4.kt deleted file mode 100644 index be8c0c96fd4..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr4.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -a + b \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr4.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr4.kt.2 deleted file mode 100644 index 68bdebaba7f..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr4.kt.2 +++ /dev/null @@ -1 +0,0 @@ -c/d \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr5.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr5.kt deleted file mode 100644 index fcce78399aa..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr5.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -a is String \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr5.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr5.kt.2 deleted file mode 100644 index 01823a34497..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr5.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a as String \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr6.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr6.kt deleted file mode 100644 index 1383f3c6743..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr6.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -a !is String \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr6.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr6.kt.2 deleted file mode 100644 index 7ccaa0c9744..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr6.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a is String \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr1.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr1.kt deleted file mode 100644 index 193df0b550b..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr1.kt +++ /dev/null @@ -1 +0,0 @@ -1 + 2 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr1.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr1.kt.2 deleted file mode 100644 index 193df0b550b..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -1 + 2 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr2.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr2.kt deleted file mode 100644 index 2fdfd51e8d7..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr2.kt +++ /dev/null @@ -1 +0,0 @@ -a + b \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr2.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr2.kt.2 deleted file mode 100644 index 2fdfd51e8d7..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a + b \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr3.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr3.kt deleted file mode 100644 index 64dd70ad082..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr3.kt +++ /dev/null @@ -1 +0,0 @@ -a*10 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr3.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr3.kt.2 deleted file mode 100644 index 64dd70ad082..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a*10 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr4.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr4.kt deleted file mode 100644 index 7ccaa0c9744..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr4.kt +++ /dev/null @@ -1 +0,0 @@ -a is String \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr4.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr4.kt.2 deleted file mode 100644 index 7ccaa0c9744..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr4.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a is String \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr5.kt b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr5.kt deleted file mode 100644 index 36601b5c09b..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr5.kt +++ /dev/null @@ -1 +0,0 @@ -a !is String \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr5.kt.2 b/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr5.kt.2 deleted file mode 100644 index 36601b5c09b..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr5.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a !is String \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/_call1.kt b/idea/testData/jetPsiMatcher/expressions/call/_call1.kt deleted file mode 100644 index a0a6cc8e2f9..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/_call1.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -f() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/_call1.kt.2 b/idea/testData/jetPsiMatcher/expressions/call/_call1.kt.2 deleted file mode 100644 index 7476967925d..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/_call1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -f(0) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/_call2.kt b/idea/testData/jetPsiMatcher/expressions/call/_call2.kt deleted file mode 100644 index a0a6cc8e2f9..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/_call2.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -f() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/_call2.kt.2 b/idea/testData/jetPsiMatcher/expressions/call/_call2.kt.2 deleted file mode 100644 index 3a2765afd1e..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/_call2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -g() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/_call3.kt b/idea/testData/jetPsiMatcher/expressions/call/_call3.kt deleted file mode 100644 index 02e0aa5de2d..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/_call3.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -f(a, b) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/_call3.kt.2 b/idea/testData/jetPsiMatcher/expressions/call/_call3.kt.2 deleted file mode 100644 index 1bf42070b82..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/_call3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a.f(b) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/_call4.kt b/idea/testData/jetPsiMatcher/expressions/call/_call4.kt deleted file mode 100644 index 41e44980678..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/_call4.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -x.f(a, b) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/_call4.kt.2 b/idea/testData/jetPsiMatcher/expressions/call/_call4.kt.2 deleted file mode 100644 index 259b9c7f0be..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/_call4.kt.2 +++ /dev/null @@ -1 +0,0 @@ -y.f(c, z) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/call1.kt b/idea/testData/jetPsiMatcher/expressions/call/call1.kt deleted file mode 100644 index 300ddfaeb1d..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/call1.kt +++ /dev/null @@ -1 +0,0 @@ -f() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/call1.kt.2 b/idea/testData/jetPsiMatcher/expressions/call/call1.kt.2 deleted file mode 100644 index 300ddfaeb1d..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/call1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -f() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/call2.kt b/idea/testData/jetPsiMatcher/expressions/call/call2.kt deleted file mode 100644 index 7326bb66e0a..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/call2.kt +++ /dev/null @@ -1 +0,0 @@ -f(a) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/call2.kt.2 b/idea/testData/jetPsiMatcher/expressions/call/call2.kt.2 deleted file mode 100644 index 7326bb66e0a..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/call2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -f(a) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/call3.kt b/idea/testData/jetPsiMatcher/expressions/call/call3.kt deleted file mode 100644 index 655ee57c2c8..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/call3.kt +++ /dev/null @@ -1 +0,0 @@ -f(a, 1) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/call3.kt.2 b/idea/testData/jetPsiMatcher/expressions/call/call3.kt.2 deleted file mode 100644 index 655ee57c2c8..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/call3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -f(a, 1) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/call4.kt b/idea/testData/jetPsiMatcher/expressions/call/call4.kt deleted file mode 100644 index 2c8c8598b91..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/call4.kt +++ /dev/null @@ -1 +0,0 @@ -x.f(a, 1) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/call/call4.kt.2 b/idea/testData/jetPsiMatcher/expressions/call/call4.kt.2 deleted file mode 100644 index 2c8c8598b91..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/call/call4.kt.2 +++ /dev/null @@ -1 +0,0 @@ -x.f(a, 1) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/const/_const.kt b/idea/testData/jetPsiMatcher/expressions/const/_const.kt deleted file mode 100644 index ebd1a599403..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/const/_const.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -123 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/const/_const.kt.2 b/idea/testData/jetPsiMatcher/expressions/const/_const.kt.2 deleted file mode 100644 index 5ca234cb538..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/const/_const.kt.2 +++ /dev/null @@ -1 +0,0 @@ -345 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/const/const.kt b/idea/testData/jetPsiMatcher/expressions/const/const.kt deleted file mode 100644 index d800886d9c8..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/const/const.kt +++ /dev/null @@ -1 +0,0 @@ -123 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/const/const.kt.2 b/idea/testData/jetPsiMatcher/expressions/const/const.kt.2 deleted file mode 100644 index d800886d9c8..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/const/const.kt.2 +++ /dev/null @@ -1 +0,0 @@ -123 \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/_misc1.kt b/idea/testData/jetPsiMatcher/expressions/misc/_misc1.kt deleted file mode 100644 index 2901e88f945..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/_misc1.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -(a + b*x.f(n - 1)) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/_misc1.kt.2 b/idea/testData/jetPsiMatcher/expressions/misc/_misc1.kt.2 deleted file mode 100644 index dc0753c5111..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/_misc1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -(a + b)*x.f(n - 1) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/_misc2.kt b/idea/testData/jetPsiMatcher/expressions/misc/_misc2.kt deleted file mode 100644 index ca5f2ff5574..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/_misc2.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -(a.foo((n + 2)*(m - 1))[k[i]] is MyClass?) || (b.foo(n - 2)[i + 1] !is YourClass) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/_misc2.kt.2 b/idea/testData/jetPsiMatcher/expressions/misc/_misc2.kt.2 deleted file mode 100644 index f4b610a2ea8..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/_misc2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a.foo((n + 2*m - 1))[k[i]] is MyClass? || b.foo[n - 2](i + 1) !is YourClass \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/_misc3.kt b/idea/testData/jetPsiMatcher/expressions/misc/_misc3.kt deleted file mode 100644 index 21f39b31af4..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/_misc3.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -a > b[n] && (a < foo(x.bar(n + 2)) || a == n) && b[n - 1] != foo(a + 2) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/_misc3.kt.2 b/idea/testData/jetPsiMatcher/expressions/misc/_misc3.kt.2 deleted file mode 100644 index 26464ee1ae7..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/_misc3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a > b[n] && a < foo(x.bar(n + 2)) || (a == n) && (b[n - 1] != foo(a + 2)) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/misc1.kt b/idea/testData/jetPsiMatcher/expressions/misc/misc1.kt deleted file mode 100644 index a3cccb1e9b4..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/misc1.kt +++ /dev/null @@ -1 +0,0 @@ -(a + b*x.f(n - 1)) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/misc1.kt.2 b/idea/testData/jetPsiMatcher/expressions/misc/misc1.kt.2 deleted file mode 100644 index b1a5c6058d7..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/misc1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -(a) + b*x.f(n - 1) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/misc2.kt b/idea/testData/jetPsiMatcher/expressions/misc/misc2.kt deleted file mode 100644 index 0970212b5a9..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/misc2.kt +++ /dev/null @@ -1 +0,0 @@ -(a.foo((n + 2)*(m - 1))[k[i]] is MyClass?) || (b.foo(n - 2)[i + 1] !is YourClass) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/misc2.kt.2 b/idea/testData/jetPsiMatcher/expressions/misc/misc2.kt.2 deleted file mode 100644 index 4a37455cfcc..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/misc2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a.foo((n + 2)*(m - 1))[k[i]] is MyClass? || b.foo(n - 2)[i + 1] !is YourClass \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/misc3.kt b/idea/testData/jetPsiMatcher/expressions/misc/misc3.kt deleted file mode 100644 index 8f350410c20..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/misc3.kt +++ /dev/null @@ -1 +0,0 @@ -a > b[n] && (a < foo(x.bar(n + 2)) || a == n) && b[n - 1] != foo(a + 2) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/misc/misc3.kt.2 b/idea/testData/jetPsiMatcher/expressions/misc/misc3.kt.2 deleted file mode 100644 index b1fc711a891..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/misc/misc3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -a > b[n] && (a < foo(x.bar(n + 2)) || (a == n)) && (b[n - 1] != foo(a + 2)) \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/simpleName/_simpleName.kt b/idea/testData/jetPsiMatcher/expressions/simpleName/_simpleName.kt deleted file mode 100644 index 2244cd77052..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/simpleName/_simpleName.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -test \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/simpleName/_simpleName.kt.2 b/idea/testData/jetPsiMatcher/expressions/simpleName/_simpleName.kt.2 deleted file mode 100644 index 17f7fcd1dc9..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/simpleName/_simpleName.kt.2 +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -abcd \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName.kt b/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName.kt deleted file mode 100644 index 30d74d25844..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName.kt +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName.kt.2 b/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName.kt.2 deleted file mode 100644 index 30d74d25844..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName.kt.2 +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName2.kt b/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName2.kt deleted file mode 100644 index 30d74d25844..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName2.kt +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName2.kt.2 b/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName2.kt.2 deleted file mode 100644 index 666f3d302b9..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/simpleName/simpleName2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -`test` \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/_super1.kt b/idea/testData/jetPsiMatcher/expressions/super/_super1.kt deleted file mode 100644 index 1f5a6ca4d7f..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/_super1.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -super.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/_super1.kt.2 b/idea/testData/jetPsiMatcher/expressions/super/_super1.kt.2 deleted file mode 100644 index 426ee4d61c0..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/_super1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -super.bar() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/_super2.kt b/idea/testData/jetPsiMatcher/expressions/super/_super2.kt deleted file mode 100644 index b48a3487a9b..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/_super2.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -super.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/_super2.kt.2 b/idea/testData/jetPsiMatcher/expressions/super/_super2.kt.2 deleted file mode 100644 index c051b54557e..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/_super2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -super.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/_super3.kt b/idea/testData/jetPsiMatcher/expressions/super/_super3.kt deleted file mode 100644 index d169cbad4ef..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/_super3.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -super<>.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/_super3.kt.2 b/idea/testData/jetPsiMatcher/expressions/super/_super3.kt.2 deleted file mode 100644 index dfe6ebb4165..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/_super3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -super.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/_super4.kt b/idea/testData/jetPsiMatcher/expressions/super/_super4.kt deleted file mode 100644 index 307bad345cc..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/_super4.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -super@B.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/_super4.kt.2 b/idea/testData/jetPsiMatcher/expressions/super/_super4.kt.2 deleted file mode 100644 index d1e2e856f56..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/_super4.kt.2 +++ /dev/null @@ -1 +0,0 @@ -super@A.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/super1.kt b/idea/testData/jetPsiMatcher/expressions/super/super1.kt deleted file mode 100644 index dfe6ebb4165..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/super1.kt +++ /dev/null @@ -1 +0,0 @@ -super.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/super1.kt.2 b/idea/testData/jetPsiMatcher/expressions/super/super1.kt.2 deleted file mode 100644 index dfe6ebb4165..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/super1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -super.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/super2.kt b/idea/testData/jetPsiMatcher/expressions/super/super2.kt deleted file mode 100644 index c051b54557e..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/super2.kt +++ /dev/null @@ -1 +0,0 @@ -super.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/super2.kt.2 b/idea/testData/jetPsiMatcher/expressions/super/super2.kt.2 deleted file mode 100644 index c051b54557e..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/super2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -super.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/super3.kt b/idea/testData/jetPsiMatcher/expressions/super/super3.kt deleted file mode 100644 index 64f2753245e..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/super3.kt +++ /dev/null @@ -1 +0,0 @@ -super<>.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/super3.kt.2 b/idea/testData/jetPsiMatcher/expressions/super/super3.kt.2 deleted file mode 100644 index 64f2753245e..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/super3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -super<>.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/super4.kt b/idea/testData/jetPsiMatcher/expressions/super/super4.kt deleted file mode 100644 index 7520ea9ff7d..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/super4.kt +++ /dev/null @@ -1 +0,0 @@ -super@label.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/super/super4.kt.2 b/idea/testData/jetPsiMatcher/expressions/super/super4.kt.2 deleted file mode 100644 index 7520ea9ff7d..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/super/super4.kt.2 +++ /dev/null @@ -1 +0,0 @@ -super@label.foo() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/throw/_throw.kt b/idea/testData/jetPsiMatcher/expressions/throw/_throw.kt deleted file mode 100644 index cbd29c6905b..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/throw/_throw.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -throw X() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/throw/_throw.kt.2 b/idea/testData/jetPsiMatcher/expressions/throw/_throw.kt.2 deleted file mode 100644 index d6766b53139..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/throw/_throw.kt.2 +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -throw Z() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/throw/throw.kt b/idea/testData/jetPsiMatcher/expressions/throw/throw.kt deleted file mode 100644 index 36381ca5aef..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/throw/throw.kt +++ /dev/null @@ -1 +0,0 @@ -throw X() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/throw/throw.kt.2 b/idea/testData/jetPsiMatcher/expressions/throw/throw.kt.2 deleted file mode 100644 index 36381ca5aef..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/throw/throw.kt.2 +++ /dev/null @@ -1 +0,0 @@ -throw X() \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr1.kt b/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr1.kt deleted file mode 100644 index 5bfaf586de2..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr1.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -!false \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr1.kt.2 b/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr1.kt.2 deleted file mode 100644 index 3dc7170e670..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -!true \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr2.kt b/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr2.kt deleted file mode 100644 index bf2fa63cc04..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr2.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -!a \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr2.kt.2 b/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr2.kt.2 deleted file mode 100644 index ce85aad2824..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr2.kt.2 +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -++a \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr3.kt b/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr3.kt deleted file mode 100644 index bf2fa63cc04..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr3.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -!a \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr3.kt.2 b/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr3.kt.2 deleted file mode 100644 index c42c7cce71f..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr3.kt.2 +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -!x \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr1.kt b/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr1.kt deleted file mode 100644 index dfec184200f..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr1.kt +++ /dev/null @@ -1 +0,0 @@ -!false \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr1.kt.2 b/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr1.kt.2 deleted file mode 100644 index dfec184200f..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -!false \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr2.kt b/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr2.kt deleted file mode 100644 index fa7cdb18c3e..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr2.kt +++ /dev/null @@ -1 +0,0 @@ -!a \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr2.kt.2 b/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr2.kt.2 deleted file mode 100644 index fa7cdb18c3e..00000000000 --- a/idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -!a \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_functional1.kt b/idea/testData/jetPsiMatcher/types/_functional1.kt deleted file mode 100644 index f33284d37f3..00000000000 --- a/idea/testData/jetPsiMatcher/types/_functional1.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -val x: (s: String, b: Boolean) -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_functional1.kt.2 b/idea/testData/jetPsiMatcher/types/_functional1.kt.2 deleted file mode 100644 index 38402488d77..00000000000 --- a/idea/testData/jetPsiMatcher/types/_functional1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val x: (s: Boolean, b: String) -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_functional2.kt b/idea/testData/jetPsiMatcher/types/_functional2.kt deleted file mode 100644 index 10576c8c432..00000000000 --- a/idea/testData/jetPsiMatcher/types/_functional2.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -val x: String.(b: Boolean) -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_functional2.kt.2 b/idea/testData/jetPsiMatcher/types/_functional2.kt.2 deleted file mode 100644 index 310f441f850..00000000000 --- a/idea/testData/jetPsiMatcher/types/_functional2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val x: (s: String, b: Boolean) -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_nullable1.kt b/idea/testData/jetPsiMatcher/types/_nullable1.kt deleted file mode 100644 index acb4730cc08..00000000000 --- a/idea/testData/jetPsiMatcher/types/_nullable1.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -val x: String \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_nullable1.kt.2 b/idea/testData/jetPsiMatcher/types/_nullable1.kt.2 deleted file mode 100644 index b43528c36f1..00000000000 --- a/idea/testData/jetPsiMatcher/types/_nullable1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val x: String? \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_user1.kt b/idea/testData/jetPsiMatcher/types/_user1.kt deleted file mode 100644 index d85c1b188ac..00000000000 --- a/idea/testData/jetPsiMatcher/types/_user1.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -val x: Map> \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_user1.kt.2 b/idea/testData/jetPsiMatcher/types/_user1.kt.2 deleted file mode 100644 index eea5c86cdd2..00000000000 --- a/idea/testData/jetPsiMatcher/types/_user1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val y: Map> \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_user2.kt b/idea/testData/jetPsiMatcher/types/_user2.kt deleted file mode 100644 index 797debd3543..00000000000 --- a/idea/testData/jetPsiMatcher/types/_user2.kt +++ /dev/null @@ -1,2 +0,0 @@ -// NOT_EQUAL -val x: Collection \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/_user2.kt.2 b/idea/testData/jetPsiMatcher/types/_user2.kt.2 deleted file mode 100644 index 6c8662b0250..00000000000 --- a/idea/testData/jetPsiMatcher/types/_user2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val x: MutableCollection \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/functional1.kt b/idea/testData/jetPsiMatcher/types/functional1.kt deleted file mode 100644 index 40071fe2b1c..00000000000 --- a/idea/testData/jetPsiMatcher/types/functional1.kt +++ /dev/null @@ -1 +0,0 @@ -val x: String -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/functional1.kt.2 b/idea/testData/jetPsiMatcher/types/functional1.kt.2 deleted file mode 100644 index 799a25379cf..00000000000 --- a/idea/testData/jetPsiMatcher/types/functional1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val y: String -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/functional2.kt b/idea/testData/jetPsiMatcher/types/functional2.kt deleted file mode 100644 index 310f441f850..00000000000 --- a/idea/testData/jetPsiMatcher/types/functional2.kt +++ /dev/null @@ -1 +0,0 @@ -val x: (s: String, b: Boolean) -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/functional2.kt.2 b/idea/testData/jetPsiMatcher/types/functional2.kt.2 deleted file mode 100644 index 004a1d24a98..00000000000 --- a/idea/testData/jetPsiMatcher/types/functional2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val x: (x: String, y: Boolean) -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/functional3.kt b/idea/testData/jetPsiMatcher/types/functional3.kt deleted file mode 100644 index aac457e03f0..00000000000 --- a/idea/testData/jetPsiMatcher/types/functional3.kt +++ /dev/null @@ -1 +0,0 @@ -val x: String.(b: Boolean) -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/functional3.kt.2 b/idea/testData/jetPsiMatcher/types/functional3.kt.2 deleted file mode 100644 index 202b79b1e59..00000000000 --- a/idea/testData/jetPsiMatcher/types/functional3.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val x: String.(n: Boolean) -> Int \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/nullable1.kt b/idea/testData/jetPsiMatcher/types/nullable1.kt deleted file mode 100644 index b43528c36f1..00000000000 --- a/idea/testData/jetPsiMatcher/types/nullable1.kt +++ /dev/null @@ -1 +0,0 @@ -val x: String? \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/nullable1.kt.2 b/idea/testData/jetPsiMatcher/types/nullable1.kt.2 deleted file mode 100644 index bb095c9d12d..00000000000 --- a/idea/testData/jetPsiMatcher/types/nullable1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val y: String? \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/user1.kt b/idea/testData/jetPsiMatcher/types/user1.kt deleted file mode 100644 index b15fdf0cf95..00000000000 --- a/idea/testData/jetPsiMatcher/types/user1.kt +++ /dev/null @@ -1 +0,0 @@ -val x: Collection \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/user1.kt.2 b/idea/testData/jetPsiMatcher/types/user1.kt.2 deleted file mode 100644 index 809fba40a0e..00000000000 --- a/idea/testData/jetPsiMatcher/types/user1.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val y: Collection \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/user2.kt b/idea/testData/jetPsiMatcher/types/user2.kt deleted file mode 100644 index 3715d26a30f..00000000000 --- a/idea/testData/jetPsiMatcher/types/user2.kt +++ /dev/null @@ -1 +0,0 @@ -val x: Map> \ No newline at end of file diff --git a/idea/testData/jetPsiMatcher/types/user2.kt.2 b/idea/testData/jetPsiMatcher/types/user2.kt.2 deleted file mode 100644 index 95a905d3a30..00000000000 --- a/idea/testData/jetPsiMatcher/types/user2.kt.2 +++ /dev/null @@ -1 +0,0 @@ -val y: Map> \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/psi/AbstractJetPsiMatcherTest.java b/idea/tests/org/jetbrains/jet/psi/AbstractJetPsiMatcherTest.java deleted file mode 100644 index 9b01c6882a0..00000000000 --- a/idea/tests/org/jetbrains/jet/psi/AbstractJetPsiMatcherTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2010-2013 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. - */ - -package org.jetbrains.jet.psi; - -import com.intellij.openapi.util.io.FileUtil; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.jet.InTextDirectivesUtils; -import org.jetbrains.jet.JetLiteFixture; -import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment; -import org.jetbrains.jet.config.CompilerConfiguration; -import org.jetbrains.jet.lang.psi.JetExpression; -import org.jetbrains.jet.lang.psi.JetPsiFactory; -import org.jetbrains.jet.lang.psi.JetTypeReference; -import org.jetbrains.jet.plugin.util.JetPsiMatcher; - -import java.io.File; - -import static org.jetbrains.jet.lang.psi.PsiPackage.JetPsiFactory; - -public abstract class AbstractJetPsiMatcherTest extends JetLiteFixture { - public void doTestExpressions(@NotNull String path) throws Exception { - String fileText = FileUtil.loadFile(new File(path), true); - String fileText2 = FileUtil.loadFile(new File(path + ".2"), true); - - boolean equalityExpected = InTextDirectivesUtils.findStringWithPrefixes(fileText, "// NOT_EQUAL") == null; - - JetPsiFactory psiFactory = JetPsiFactory(getProject()); - JetExpression expr = psiFactory.createExpression(fileText); - JetExpression expr2 = psiFactory.createExpression(fileText2); - - assertTrue( - "JetPsiMatcher.checkElementMatch() should return " + equalityExpected, - equalityExpected == JetPsiMatcher.checkElementMatch(expr, expr2) - ); - } - - public void doTestTypes(@NotNull String path) throws Exception { - String fileText = FileUtil.loadFile(new File(path), true); - String fileText2 = FileUtil.loadFile(new File(path + ".2"), true); - - boolean equalityExpected = InTextDirectivesUtils.findStringWithPrefixes(fileText, "// NOT_EQUAL") == null; - - JetPsiFactory psiFactory = JetPsiFactory(getProject()); - JetTypeReference typeRef = psiFactory.createProperty(fileText).getTypeRef(); - JetTypeReference typeRef2 = psiFactory.createProperty(fileText2).getTypeRef(); - - assertNotNull(typeRef); - assertNotNull(typeRef2); - - assertTrue( - "JetPsiMatcher.checkElementMatch() should return " + equalityExpected, - equalityExpected == JetPsiMatcher.checkElementMatch(typeRef, typeRef2) - ); - } - - @Override - protected JetCoreEnvironment createEnvironment() { - return JetCoreEnvironment.createForTests(getTestRootDisposable(), new CompilerConfiguration()); - } -} diff --git a/idea/tests/org/jetbrains/jet/psi/JetPsiMatcherTestGenerated.java b/idea/tests/org/jetbrains/jet/psi/JetPsiMatcherTestGenerated.java deleted file mode 100644 index 4fa25efb7ec..00000000000 --- a/idea/tests/org/jetbrains/jet/psi/JetPsiMatcherTestGenerated.java +++ /dev/null @@ -1,513 +0,0 @@ -/* - * Copyright 2010-2014 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. - */ - -package org.jetbrains.jet.psi; - -import com.intellij.testFramework.TestDataPath; -import junit.framework.Test; -import junit.framework.TestSuite; -import org.junit.runner.RunWith; -import org.jetbrains.jet.JetTestUtils; -import org.jetbrains.jet.test.InnerTestClasses; -import org.jetbrains.jet.test.TestMetadata; -import org.jetbrains.jet.JUnit3RunnerWithInners; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@InnerTestClasses({JetPsiMatcherTestGenerated.Expressions.class, JetPsiMatcherTestGenerated.Types.class}) -@RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) -public class JetPsiMatcherTestGenerated extends AbstractJetPsiMatcherTest { - @TestMetadata("idea/testData/jetPsiMatcher/expressions") - @TestDataPath("$PROJECT_ROOT") - @InnerTestClasses({Expressions.ArrayAccess.class, Expressions.BinaryExpr.class, Expressions.Call.class, Expressions.Const.class, Expressions.Misc.class, Expressions.SimpleName.class, Expressions.Super.class, Expressions.Throw.class, Expressions.UnaryExpr.class}) - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class Expressions extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInExpressions() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("idea/testData/jetPsiMatcher/expressions/arrayAccess") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class ArrayAccess extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInArrayAccess() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions/arrayAccess"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("arrayAccess1.kt") - public void testArrayAccess1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("arrayAccess2.kt") - public void testArrayAccess2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/arrayAccess/arrayAccess2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_arrayAccess1.kt") - public void test_arrayAccess1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_arrayAccess2.kt") - public void test_arrayAccess2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_arrayAccess3.kt") - public void test_arrayAccess3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/arrayAccess/_arrayAccess3.kt"); - doTestExpressions(fileName); - } - - } - - @TestMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class BinaryExpr extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInBinaryExpr() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions/binaryExpr"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("binaryExpr1.kt") - public void testBinaryExpr1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("binaryExpr2.kt") - public void testBinaryExpr2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("binaryExpr3.kt") - public void testBinaryExpr3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr3.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("binaryExpr4.kt") - public void testBinaryExpr4() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr4.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("binaryExpr5.kt") - public void testBinaryExpr5() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/binaryExpr5.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_binaryExpr1.kt") - public void test_binaryExpr1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_binaryExpr2.kt") - public void test_binaryExpr2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_binaryExpr3.kt") - public void test_binaryExpr3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr3.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_binaryExpr4.kt") - public void test_binaryExpr4() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr4.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_binaryExpr5.kt") - public void test_binaryExpr5() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr5.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_binaryExpr6.kt") - public void test_binaryExpr6() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/binaryExpr/_binaryExpr6.kt"); - doTestExpressions(fileName); - } - - } - - @TestMetadata("idea/testData/jetPsiMatcher/expressions/call") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class Call extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInCall() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions/call"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("call1.kt") - public void testCall1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/call/call1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("call2.kt") - public void testCall2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/call/call2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("call3.kt") - public void testCall3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/call/call3.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("call4.kt") - public void testCall4() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/call/call4.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_call1.kt") - public void test_call1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/call/_call1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_call2.kt") - public void test_call2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/call/_call2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_call3.kt") - public void test_call3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/call/_call3.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_call4.kt") - public void test_call4() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/call/_call4.kt"); - doTestExpressions(fileName); - } - - } - - @TestMetadata("idea/testData/jetPsiMatcher/expressions/const") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class Const extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInConst() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions/const"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("const.kt") - public void testConst() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/const/const.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_const.kt") - public void test_const() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/const/_const.kt"); - doTestExpressions(fileName); - } - - } - - @TestMetadata("idea/testData/jetPsiMatcher/expressions/misc") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class Misc extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInMisc() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions/misc"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("misc1.kt") - public void testMisc1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/misc/misc1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("misc2.kt") - public void testMisc2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/misc/misc2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("misc3.kt") - public void testMisc3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/misc/misc3.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_misc1.kt") - public void test_misc1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/misc/_misc1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_misc2.kt") - public void test_misc2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/misc/_misc2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_misc3.kt") - public void test_misc3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/misc/_misc3.kt"); - doTestExpressions(fileName); - } - - } - - @TestMetadata("idea/testData/jetPsiMatcher/expressions/simpleName") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class SimpleName extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInSimpleName() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions/simpleName"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("simpleName.kt") - public void testSimpleName() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/simpleName/simpleName.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("simpleName2.kt") - public void testSimpleName2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/simpleName/simpleName2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_simpleName.kt") - public void test_simpleName() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/simpleName/_simpleName.kt"); - doTestExpressions(fileName); - } - - } - - @TestMetadata("idea/testData/jetPsiMatcher/expressions/super") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class Super extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInSuper() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions/super"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("super1.kt") - public void testSuper1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/super/super1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("super2.kt") - public void testSuper2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/super/super2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("super3.kt") - public void testSuper3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/super/super3.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("super4.kt") - public void testSuper4() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/super/super4.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_super1.kt") - public void test_super1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/super/_super1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_super2.kt") - public void test_super2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/super/_super2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_super3.kt") - public void test_super3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/super/_super3.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_super4.kt") - public void test_super4() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/super/_super4.kt"); - doTestExpressions(fileName); - } - - } - - @TestMetadata("idea/testData/jetPsiMatcher/expressions/throw") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class Throw extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInThrow() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions/throw"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("throw.kt") - public void testThrow() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/throw/throw.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_throw.kt") - public void test_throw() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/throw/_throw.kt"); - doTestExpressions(fileName); - } - - } - - @TestMetadata("idea/testData/jetPsiMatcher/expressions/unaryExpr") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class UnaryExpr extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInUnaryExpr() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/expressions/unaryExpr"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("unaryExpr1.kt") - public void testUnaryExpr1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("unaryExpr2.kt") - public void testUnaryExpr2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/unaryExpr/unaryExpr2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_unaryExpr1.kt") - public void test_unaryExpr1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr1.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_unaryExpr2.kt") - public void test_unaryExpr2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr2.kt"); - doTestExpressions(fileName); - } - - @TestMetadata("_unaryExpr3.kt") - public void test_unaryExpr3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/expressions/unaryExpr/_unaryExpr3.kt"); - doTestExpressions(fileName); - } - - } - - } - - @TestMetadata("idea/testData/jetPsiMatcher/types") - @TestDataPath("$PROJECT_ROOT") - @RunWith(org.jetbrains.jet.JUnit3RunnerWithInners.class) - public static class Types extends AbstractJetPsiMatcherTest { - public void testAllFilesPresentInTypes() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/jetPsiMatcher/types"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("functional1.kt") - public void testFunctional1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/functional1.kt"); - doTestTypes(fileName); - } - - @TestMetadata("functional2.kt") - public void testFunctional2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/functional2.kt"); - doTestTypes(fileName); - } - - @TestMetadata("functional3.kt") - public void testFunctional3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/functional3.kt"); - doTestTypes(fileName); - } - - @TestMetadata("nullable1.kt") - public void testNullable1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/nullable1.kt"); - doTestTypes(fileName); - } - - @TestMetadata("user1.kt") - public void testUser1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/user1.kt"); - doTestTypes(fileName); - } - - @TestMetadata("user2.kt") - public void testUser2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/user2.kt"); - doTestTypes(fileName); - } - - @TestMetadata("_functional1.kt") - public void test_functional1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/_functional1.kt"); - doTestTypes(fileName); - } - - @TestMetadata("_functional2.kt") - public void test_functional2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/_functional2.kt"); - doTestTypes(fileName); - } - - @TestMetadata("_nullable1.kt") - public void test_nullable1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/_nullable1.kt"); - doTestTypes(fileName); - } - - @TestMetadata("_user1.kt") - public void test_user1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/_user1.kt"); - doTestTypes(fileName); - } - - @TestMetadata("_user2.kt") - public void test_user2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/jetPsiMatcher/types/_user2.kt"); - doTestTypes(fileName); - } - - } - -}