KTIJ-26423 [AA] Get rid of the old testdata for KtImportOptimizer
This testdata is some form will be transferred to the `intellij` repo
This commit is contained in:
-12
@@ -19,17 +19,6 @@ abstract class AbstractAnalysisApiImportOptimizerTest : AbstractAnalysisApiBased
|
||||
analyseImports(mainKtFile)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
val unusedImports = importsAnalysis.unusedImports
|
||||
|
||||
val unusedImportPaths = unusedImports
|
||||
.map { it.importPath ?: error("Import $it should have an import path, instead was ${it.text}") }
|
||||
.sortedBy { it.toString() } // for stable results
|
||||
|
||||
val actualUnusedImports = buildString {
|
||||
unusedImportPaths.forEach(::appendLine)
|
||||
}
|
||||
|
||||
val importAnalysisRendered = buildString {
|
||||
val sortedUsedDeclarations = importsAnalysis.usedDeclarations
|
||||
.toSortedMap(compareBy { importPath -> importPath.toString() })
|
||||
@@ -50,7 +39,6 @@ abstract class AbstractAnalysisApiImportOptimizerTest : AbstractAnalysisApiBased
|
||||
sortedUnresolvedNames.forEach(::appendLine)
|
||||
}
|
||||
|
||||
testServices.assertions.assertEqualsToTestDataFileSibling(actualUnusedImports, extension = ".imports")
|
||||
testServices.assertions.assertEqualsToTestDataFileSibling(importAnalysisRendered, extension = ".importsAnalysis")
|
||||
}
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.T
|
||||
-1
@@ -1 +0,0 @@
|
||||
a.a.Foo
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.Bar.Companion
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
test.SamePackage as Aliased
|
||||
test.samePackage as aliased
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.Bar as BarAlias
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.Bar.extFun
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.component3
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
test.Foo.extFuncFromBase
|
||||
test.Foo.extPropFromBase
|
||||
test.Foo.funcFromBase
|
||||
test.Foo.propFromBase
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
test.Foo.callableReference
|
||||
test.Foo.extFuncFromBase
|
||||
test.Foo.extPropFromBase
|
||||
test.Foo.funcFromBase
|
||||
test.Foo.invoke
|
||||
test.Foo.propFromBase
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
dependency.bar
|
||||
dependency.foo
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.Bar
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
dependency.Bar
|
||||
dependency.One
|
||||
dependency.Two
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
dependency.Bar.function
|
||||
dependency.Bar.property
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
dependency.Bar.callable
|
||||
dependency.Bar.function
|
||||
dependency.Bar.property
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
test.SamePackage
|
||||
test.samePackage
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.invoke
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.MyObject
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
KotlinChild.nonStaticFieldFromBase
|
||||
dependency.Child.STATIC_CONSTANT_FROM_BASE
|
||||
dependency.Child.staticFunFromBase
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.Bar
|
||||
-1
@@ -1 +0,0 @@
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
dependency.invoke
|
||||
-1
@@ -1 +0,0 @@
|
||||
dependency.invoke as str
|
||||
Reference in New Issue
Block a user