KTIJ-26423 [kotlin] Enable passing "Optimize Imports" tests

GitOrigin-RevId: 9e567c40e11ec361b7710623733df277beee8f82
This commit is contained in:
Roman Golyshev
2024-08-12 09:58:57 +00:00
committed by intellij-monorepo-bot
parent d2ee644e48
commit e33fa46872
48 changed files with 0 additions and 52 deletions
@@ -1,4 +1,3 @@
// IGNORE_K2
import kotlin.Any
fun foo(): Any {
@@ -1,5 +1,3 @@
// IGNORE_K2
fun foo(): Any {
throw UnsupportedOperationException()
}
@@ -1,4 +1,3 @@
// IGNORE_K2
import foo.`val`.*
var v: `var`? = null
@@ -1,4 +1,3 @@
// IGNORE_K2
import foo.`val`.`var`
var v: `var`? = null
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS: 2
package test
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS: 2
package test
@@ -1,4 +1,3 @@
// IGNORE_K2
/**
Comment 1
*/
@@ -1,4 +1,3 @@
// IGNORE_K2
/**
Comment 1
*/
@@ -1,4 +1,3 @@
// IGNORE_K2
import java.util.ArrayList
// some comment
import java.util.HashSet
@@ -1,4 +1,3 @@
// IGNORE_K2
// some comment
val v: HashSet<ArrayList<String>>
@@ -1,4 +1,3 @@
// IGNORE_K2
import java.util.ArrayList
import java.util.ArrayList
@@ -1,5 +1,3 @@
// IGNORE_K2
class Action {
fun test() {
val test : ArrayList<Int>? = null
@@ -1,4 +1,3 @@
// IGNORE_K2
import java.lang.IllegalArgumentException
import kotlin.run
@@ -1,5 +1,3 @@
// IGNORE_K2
fun main(args: Array<String>) {
run {
throw IllegalArgumentException()
@@ -1,4 +1,3 @@
// IGNORE_K2
// TODO: it is quite similar to KDocRefernece.kt for K2 except no default imported ArrayList, see KTIJ-26751
import kotlin.concurrent.fixedRateTimer
import kotlin.concurrent.read
@@ -1,4 +1,3 @@
// IGNORE_K2
// TODO: it is quite similar to KDocRefernece.kt for K2 except no default imported ArrayList, see KTIJ-26751
import java.util.concurrent.locks.Lock
import kotlin.concurrent.fixedRateTimer
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 5
import p1.*
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 5
import p1.div
import p1.plus
@@ -1,4 +1,3 @@
// IGNORE_K2
import java.util.concurrent.*
val c = Callable { -> 1 }
@@ -1,4 +1,3 @@
// IGNORE_K2
import java.util.concurrent.Callable
val c = Callable { -> 1 }
@@ -1,4 +1,3 @@
// IGNORE_K2
import java.io.File as File
val file: File
@@ -1,4 +1,3 @@
// IGNORE_K2
import java.io.File
val file: File
@@ -1,4 +1,3 @@
// IGNORE_K2
import dep1.A
import dep1.B
import dep2.*
@@ -1,4 +1,3 @@
// IGNORE_K2
import dep1.A
import dep1.B
import dep2.BBB
@@ -1,4 +1,3 @@
// IGNORE_K2
import com.sun.corba.se.impl.util.JDKBridge
import com.sun.org.apache.xpath.internal.operations.And
import java.lang.StringBuilder
@@ -1,4 +1,3 @@
// IGNORE_K2
import kotlin.system.measureTimeMillis
import kotlin.test.Asserter
@@ -1,4 +1,3 @@
// IGNORE_K2
import java.io as JavaIO
import java.util.ArrayList
import java.util.ArrayList as SomeThing
@@ -1,5 +1,3 @@
// IGNORE_K2
class Action {
fun test() {
val test : ArrayList<Int>? = null
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
import java.lang.Character.*
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 1
import java.lang.Character.UPPERCASE_LETTER
@@ -1,4 +1,3 @@
// IGNORE_K2
package test
import JavaAnnotationWithValue
@@ -1,4 +1,3 @@
// IGNORE_K2
package test
import JavaAnnotationWithValue
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 2
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 2
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 2
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// NAME_COUNT_TO_USE_STAR_IMPORT: 2
package ppp
@@ -1,4 +1,3 @@
// IGNORE_K2
// PACKAGE_TO_USE_STAR_IMPORTS: java
// PACKAGE_TO_USE_STAR_IMPORTS: java.io
// PACKAGES_TO_USE_STAR_IMPORTS: java.util.concurrent
@@ -1,4 +1,3 @@
// IGNORE_K2
// PACKAGE_TO_USE_STAR_IMPORTS: java
// PACKAGE_TO_USE_STAR_IMPORTS: java.io
// PACKAGES_TO_USE_STAR_IMPORTS: java.util.concurrent
@@ -1,6 +1,5 @@
// "Optimize imports" "true"
// WITH_STDLIB
// IGNORE_K2
<caret>import java.io.*
import java.util.*
@@ -1,6 +1,5 @@
// "Optimize imports" "true"
// WITH_STDLIB
// IGNORE_K2
fun foo(list: ArrayList<String>) {
list.add("")