[VISUALIZER] Remove ignore directive from correct test files

This commit is contained in:
Ivan Kylchik
2021-02-20 17:01:20 +03:00
committed by TeamCityServer
parent 59416f447e
commit 13ef126d4c
29 changed files with 5 additions and 31 deletions
@@ -254,8 +254,8 @@ class FirVisualizer(private val firFile: FirFile) : BaseRenderer() {
expression.children.filter { it.node.elementType != KtNodeTypes.REFERENCE_EXPRESSION }.forEach { psi ->
when (psi) {
is KtLambdaArgument -> {
val firLambda = psi.firstOfType<FirLambdaArgumentExpression>()?.expression as FirAnonymousFunction
firLambda.receiverTypeRef?.let {
val firLambda = psi.firstOfType<FirLambdaArgumentExpression>()?.expression as? FirAnonymousFunction
firLambda?.receiverTypeRef?.let {
lastCallWithLambda = psi.getLambdaExpression()?.firstOfType<FirLabel>()?.name
implicitReceivers += it
psi.accept(this)
@@ -1,4 +1,3 @@
// FIR_IGNORE
abstract class A {
abstract class Nested
}
@@ -1,4 +1,3 @@
// FIR_IGNORE
object A {
constructor()
init {}
@@ -1,4 +1,3 @@
// FIR_IGNORE
open class Base<T>(val x: T)
// constructor Base<T>(T)
@@ -1,4 +1,3 @@
// FIR_IGNORE
fun test() {
// <anonymous>
// │
@@ -1,4 +1,3 @@
// FIR_IGNORE
import my.println
enum class Order {
@@ -1,4 +1,3 @@
// FIR_IGNORE
interface Some
object O1 : Some
@@ -1,4 +1,3 @@
// FIR_IGNORE
// T fun (() -> T).invoke(): T
// │ │
fun <T> simpleRun(f: () -> T): T = f()
@@ -1,4 +1,3 @@
// FIR_IGNORE
class NoPrimary {
// String
// │
@@ -1,4 +1,3 @@
// FIR_IGNORE
//constructor annotation/Target(vararg annotation/AnnotationTarget)
//│ enum class annotation/AnnotationTarget: Enum<annotation/AnnotationTarget>
//│ │ enum entry annotation/AnnotationTarget.EXPRESSION
@@ -1,4 +1,3 @@
// FIR_IGNORE
// WITH_RUNTIME
// fun (Int).plus(Int): Int
// Int │ distance.y: Int
@@ -1,4 +1,3 @@
// FIR_IGNORE
//WITH_RUNTIME
package test
@@ -1,4 +1,3 @@
// FIR_IGNORE
annotation class Ann1(val arr: IntArray)
annotation class Ann2(val arr: DoubleArray)
@@ -1,4 +1,3 @@
// FIR_IGNORE
data class Some(val first: Int, val second: Double, val third: String)
fun foo(some: Some) {
@@ -1,4 +1,3 @@
// FIR_IGNORE
fun foo() {
// Int
// │fun (Int).rangeTo(Int): ranges/IntRange
@@ -1,4 +1,3 @@
// FIR_IGNORE
// Nothing?
// │ Nothing?
// │ │
@@ -1,4 +1,3 @@
// FIR_IGNORE
class WithInit(x: Int) {
// Int
// │
@@ -1,4 +1,3 @@
// FIR_IGNORE
// WITH_RUNTIME
fun simple() {
// Int Int
@@ -1,4 +1,3 @@
// FIR_IGNORE
fun test() {
// class Array<T>: Any, Cloneable, java/io/Serializable
// │
@@ -1,4 +1,3 @@
// FIR_IGNORE
interface A {
fun foo() {}
}
@@ -1,4 +1,3 @@
// FIR_IGNORE
class Some {
// Int
// │ Int
@@ -1,4 +1,3 @@
// FIR_IGNORE
fun foo() {
// Int Int
// │ │
@@ -1,4 +1,3 @@
// FIR_IGNORE
// WITH_RUNTIME
fun foo(limit: Int) {
// Int Int
@@ -1,4 +1,3 @@
// FIR_IGNORE
interface Base {
fun printMessage()
fun printMessageLine()
@@ -1,4 +1,3 @@
// FIR_IGNORE
package p
class A {
@@ -1,4 +1,3 @@
// FIR_IGNORE
package org.jetbrains.kotlin.test
// Int Int
@@ -1,4 +1,3 @@
// FIR_IGNORE
interface Source<out T> {
fun nextT(): T
}
@@ -20,7 +20,7 @@ import java.io.File
abstract class AbstractFirVisualizer : AbstractVisualizer() {
override val frontendKind: FrontendKind<*> = FrontendKinds.FIR
override val frontendFacade: Constructor<FrontendFacade<*>> = { FirFrontendFacade(it) }
override val frontendFacade: Constructor<FrontendFacade<*>> = ::FirFrontendFacade
override val handler: Constructor<FrontendOutputHandler<*>> = {
object : FirAnalysisHandler(it) {
@@ -35,7 +35,7 @@ abstract class AbstractFirVisualizer : AbstractVisualizer() {
if (expectedText[0].startsWith("// FIR_IGNORE")) {
Assert.assertFalse(
"Files are identical, please delete ignore directive",
expectedText.filterIndexed { index, _ -> index > 0 }.joinToString("\n") == firRenderResult
expectedText.drop(1).joinToString("\n") == firRenderResult.trim()
)
return
}
@@ -19,7 +19,7 @@ import java.io.File
abstract class AbstractPsiVisualizer : AbstractVisualizer() {
override val frontendKind: FrontendKind<*> = FrontendKinds.ClassicFrontend
override val frontendFacade: Constructor<FrontendFacade<*>> = { ClassicFrontendFacade(it) }
override val frontendFacade: Constructor<FrontendFacade<*>> = ::ClassicFrontendFacade
override val handler: Constructor<FrontendOutputHandler<*>> = {
object : ClassicFrontendAnalysisHandler(it) {