QuickFixMultiModule: change tests structure
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
interface IFoo {
|
||||
val a: Int
|
||||
}
|
||||
|
||||
expect class End : IFoo
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
interface IFoo {
|
||||
val a: Int
|
||||
}
|
||||
|
||||
expect class End : IFoo
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Implement as constructor parameters" "true"
|
||||
|
||||
actual class <caret>End : IFoo
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Implement as constructor parameters" "true"
|
||||
|
||||
actual class End(override val a: Int) : IFoo
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
interface IFoo {
|
||||
val a: Int
|
||||
}
|
||||
|
||||
expect class End(i: Int) : IFoo
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Implement as constructor parameters" "false"
|
||||
// ERROR: Class 'End' is not abstract and does not implement abstract member public abstract val a: Int defined in IFoo
|
||||
// ACTION: Create test
|
||||
// ACTION: Implement members
|
||||
// ACTION: Make 'End' abstract
|
||||
// ACTION: Rename file to End.kt
|
||||
|
||||
actual class <caret>End actual constructor(i: Int) : IFoo
|
||||
@@ -0,0 +1,5 @@
|
||||
expect interface ExpInterface {
|
||||
fun first()
|
||||
}
|
||||
|
||||
expect class ExpImpl : ExpInterface { }
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
expect interface ExpInterface {
|
||||
fun first()
|
||||
}
|
||||
|
||||
expect class ExpImpl : ExpInterface { }
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove 'actual' modifier" "true"
|
||||
|
||||
actual interface ExpInterface {
|
||||
actual fun first()
|
||||
}
|
||||
|
||||
actual class ExpImpl : ExpInterface {
|
||||
actual override fun <caret>first() { }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove 'actual' modifier" "true"
|
||||
|
||||
actual interface ExpInterface {
|
||||
actual fun first()
|
||||
}
|
||||
|
||||
actual class ExpImpl : ExpInterface {
|
||||
override fun first() { }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
expect class Foo
|
||||
+1
@@ -0,0 +1 @@
|
||||
expect class Foo
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Add 'actual' modifier" "true"
|
||||
|
||||
class <caret>Foo
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Add 'actual' modifier" "true"
|
||||
|
||||
actual class Foo
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect class Foo {
|
||||
fun foo()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect class Foo {
|
||||
fun foo()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Add 'actual' modifier" "true"
|
||||
|
||||
actual class Foo {
|
||||
fun <caret>foo() {}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Add 'actual' modifier" "true"
|
||||
|
||||
actual class Foo {
|
||||
actual fun foo() {}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
expect fun foo()
|
||||
+1
@@ -0,0 +1 @@
|
||||
expect fun foo()
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Add 'actual' modifier" "true"
|
||||
|
||||
fun <caret>foo() {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Add 'actual' modifier" "true"
|
||||
|
||||
actual fun foo() {}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package foo
|
||||
|
||||
class Bar {
|
||||
|
||||
}
|
||||
idea/testData/multiModuleQuickFix/other/addFunctionToCommonClassFromJavaUsage/common/common.kt.after
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
package foo
|
||||
|
||||
class Bar {
|
||||
fun someFun() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Add method 'someFun' to 'Bar'" "true"
|
||||
|
||||
public class Use {
|
||||
public static void use(foo.Bar bar) {
|
||||
bar.s<caret>omeFun();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
expect class Foo {
|
||||
fun unaryMinus()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect class Foo {
|
||||
operator fun unaryMinus()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add 'operator' modifier" "true"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.AddOperatorModifierInspection
|
||||
|
||||
actual class Foo {
|
||||
actual fun <caret>unaryMinus() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add 'operator' modifier" "true"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.AddOperatorModifierInspection
|
||||
|
||||
actual class Foo {
|
||||
actual operator fun unaryMinus() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
actual class Foo {
|
||||
actual fun unaryMinus() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
actual class Foo {
|
||||
actual operator fun unaryMinus() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add 'operator' modifier" "true"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.AddOperatorModifierInspection
|
||||
|
||||
expect class Foo {
|
||||
fun <caret>unaryMinus()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Add 'operator' modifier" "true"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.AddOperatorModifierInspection
|
||||
|
||||
expect class Foo {
|
||||
operator fun unaryMinus()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
actual class Foo {
|
||||
actual fun unaryMinus() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
actual class Foo {
|
||||
actual operator fun unaryMinus() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
actual class Foo {
|
||||
actual fun unaryMinus() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
actual class Foo {
|
||||
actual operator fun unaryMinus() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
fun foo(param: String): Int
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
fun foo(param: String): Int
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class My {
|
||||
actual fun foo(param: String): Int {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect object O {
|
||||
fun <T : Any> hello(): MutableMap<String, T>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect object O {
|
||||
fun <T : Any> hello(): MutableMap<String, T>
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual object <caret>O {
|
||||
fun <T> hello(): MutableMap<String, T> {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual object O {
|
||||
fun <T> hello(): MutableMap<String, T> {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
actual fun <T : Any> hello(): MutableMap<String, T> {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My() {
|
||||
fun test()
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My() {
|
||||
fun test()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My {
|
||||
actual constructor()
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class My {
|
||||
actual constructor()
|
||||
|
||||
actual fun test() {
|
||||
}
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My(a: Int, b: String) {
|
||||
fun test()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My(a: Int, b: String) {
|
||||
fun test()
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My {
|
||||
actual constructor(a: Int, b: String)
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class My {
|
||||
actual constructor(a: Int, b: String)
|
||||
|
||||
actual fun test() {
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My(a: Int, b: String) {
|
||||
fun test()
|
||||
|
||||
constructor(b: String, a: Int)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My(a: Int, b: String) {
|
||||
fun test()
|
||||
|
||||
constructor(b: String, a: Int)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My {
|
||||
actual constructor(b: String, a: Int)
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class My actual constructor(a: Int, b: String) {
|
||||
actual constructor(b: String, a: Int)
|
||||
|
||||
actual fun test() {
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
fun foo(param: String): Int
|
||||
|
||||
fun foo(param: Int): Int
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
fun foo(param: String): Int
|
||||
|
||||
fun foo(param: Int): Int
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My {
|
||||
fun foo(param: String) = 42
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class My {
|
||||
fun foo(param: String) = 42
|
||||
actual fun foo(param: Int): Int {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
val name: String
|
||||
|
||||
val age: String
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
val name: String
|
||||
|
||||
val age: String
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My(actual val name: String)
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My(actual val name: String) {
|
||||
actual val age: String
|
||||
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
fun foo(param: String): Int
|
||||
|
||||
val x: String
|
||||
|
||||
val pi: Double
|
||||
|
||||
val correct: Boolean
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
fun foo(param: String): Int
|
||||
|
||||
val x: String
|
||||
|
||||
val pi: Double
|
||||
|
||||
val correct: Boolean
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My {
|
||||
actual fun foo(param: String) = 42
|
||||
|
||||
actual val correct = true
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My {
|
||||
actual fun foo(param: String) = 42
|
||||
|
||||
actual val correct = true
|
||||
actual val x: String
|
||||
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
|
||||
actual val pi: Double
|
||||
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
// Incompilable function
|
||||
fun foo() {}
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class My {
|
||||
// Incompilable function
|
||||
fun foo() {}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>My
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class My {
|
||||
actual fun foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class WithCompanion {
|
||||
companion object {
|
||||
fun foo()
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// DISABLE-ERRORS
|
||||
|
||||
expect class WithCompanion {
|
||||
companion object {
|
||||
fun foo()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>WithCompanion {
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Add missing actual members" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class WithCompanion {
|
||||
actual companion object {
|
||||
actual fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect enum class E {
|
||||
A, B, C
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
<caret>expect sealed class E {
|
||||
object A : E
|
||||
object B : E
|
||||
object C : E
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Convert to sealed class" "true"
|
||||
|
||||
actual enum class <caret>E {
|
||||
A, B, C
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Convert to sealed class" "true"
|
||||
|
||||
actual sealed class <caret>E {
|
||||
actual object A : E()
|
||||
actual object B : E()
|
||||
actual object C : E()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
actual enum class E {
|
||||
A, B, C
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
actual sealed class E {
|
||||
actual object A : E()
|
||||
actual object B : E()
|
||||
actual object C : E()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
expect sealed class E {
|
||||
object A : E
|
||||
object B : E
|
||||
object C : E
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
expect enum class E {
|
||||
A, B, C
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Convert to enum class" "true"
|
||||
|
||||
actual sealed class <caret>E {
|
||||
actual object A : E()
|
||||
actual object B : E()
|
||||
actual object C : E()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Convert to enum class" "true"
|
||||
|
||||
actual enum class <caret>E {
|
||||
A, B, C
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
actual sealed class E {
|
||||
actual object A : E()
|
||||
actual object B : E()
|
||||
actual object C : E()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
actual enum class E {
|
||||
A, B, C
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Convert to sealed class" "true"
|
||||
|
||||
expect enum class <caret>E {
|
||||
A, B, C
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// "Convert to sealed class" "true"
|
||||
|
||||
expect sealed class <caret>E {
|
||||
object A : E
|
||||
object B : E
|
||||
object C : E
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
actual enum class E {
|
||||
A, B, C
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<caret>actual sealed class E {
|
||||
actual object A : E()
|
||||
actual object B : E()
|
||||
actual object C : E()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
actual enum class E {
|
||||
A, B, C
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
actual sealed class E {
|
||||
actual object A : E()
|
||||
actual object B : E()
|
||||
actual object C : E()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Convert to enum class" "true"
|
||||
|
||||
expect sealed class <caret>E {
|
||||
object A : E
|
||||
object B : E
|
||||
object C : E
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// "Convert to enum class" "true"
|
||||
|
||||
expect enum class <caret>E {
|
||||
A, B, C
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
actual sealed class E {
|
||||
actual object A : E()
|
||||
actual object B : E()
|
||||
actual object C : E()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
actual enum class E {
|
||||
A, B, C
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
actual sealed class E {
|
||||
actual object A : E()
|
||||
actual object B : E()
|
||||
actual object C : E()
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user