Migration to actual/expect: quick-fix CreateActualFix with tests

This commit is contained in:
Mikhail Glukhikh
2017-09-14 18:25:33 +03:00
parent 810d62bbaf
commit fba1a2a2db
41 changed files with 121 additions and 120 deletions
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JS" "true"
// "Create actual class for platform JS" "true"
header abstract class <caret>Abstract {
fun foo(param: String): Int
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JS" "true"
// "Create actual class for platform JS" "true"
header abstract class Abstract {
fun foo(param: String): Int
@@ -1,13 +1,13 @@
// Abstract: to be implemented
impl abstract class Abstract {
actual abstract class Abstract {
abstract fun String.bar(y: Double): Boolean
abstract var status: Int
impl fun foo(param: String): Int {
actual fun foo(param: String): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
impl val isGood: Boolean
actual val isGood: Boolean
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
+1 -1
View File
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
header class <caret>My {
fun foo(param: String): Int
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
header class My {
fun foo(param: String): Int
+6 -6
View File
@@ -1,22 +1,22 @@
// My: to be implemented
impl class My {
impl fun foo(param: String): Int {
actual class My {
actual fun foo(param: String): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
impl fun String.bar(y: Double): Boolean {
actual fun String.bar(y: Double): Boolean {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
impl fun baz() {}
actual fun baz() {}
constructor(flag: Boolean) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
impl val isGood: Boolean
actual val isGood: Boolean
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
impl var status: Int
actual var status: Int
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
set(value) {}
+1 -1
View File
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JS" "true"
// "Create actual class for platform JS" "true"
header enum class <caret>MyEnum {
FIRST,
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JS" "true"
// "Create actual class for platform JS" "true"
header enum class MyEnum {
FIRST,
+2 -2
View File
@@ -1,10 +1,10 @@
// MyEnum: to be implemented
impl enum class MyEnum {
actual enum class MyEnum {
FIRST,
SECOND,
LAST;
impl val num: Int
actual val num: Int
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -1,3 +1,3 @@
// "Create header function implementation for platform JVM" "true"
// "Create actual function for platform JVM" "true"
header fun <caret>foo(arg: Int): String
@@ -1,3 +1,3 @@
// "Create header function implementation for platform JVM" "true"
// "Create actual function for platform JVM" "true"
header fun foo(arg: Int): String
@@ -1,4 +1,4 @@
// foo: to be implemented
impl fun foo(arg: Int): String {
actual fun foo(arg: Int): String {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -1,4 +1,4 @@
// "Create header interface implementation for platform JVM" "true"
// "Create actual interface for platform JVM" "true"
header interface <caret>Interface {
fun foo(param: String): Int
@@ -1,4 +1,4 @@
// "Create header interface implementation for platform JVM" "true"
// "Create actual interface for platform JVM" "true"
header interface Interface {
fun foo(param: String): Int
@@ -1,5 +1,5 @@
// Interface: to be implemented
impl interface Interface {
actual interface Interface {
fun foo(param: String): Int
fun String.bar(y: Double): Boolean
+1 -1
View File
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
header class <caret>WithNested {
fun foo(): Int
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
header class WithNested {
fun foo(): Int
@@ -1,5 +1,5 @@
// WithNested: to be implemented
impl class WithNested {
actual class WithNested {
class Nested {
fun bar()
@@ -9,7 +9,7 @@ impl class WithNested {
fun baz()
}
impl fun foo(): Int {
actual fun foo(): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
header object <caret>Object {
fun foo(): String
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
header object Object {
fun foo(): String
@@ -1,6 +1,6 @@
// Object: to be implemented
impl object Object {
impl fun foo(): String {
actual object Object {
actual fun foo(): String {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
package test.inner
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
package test.inner
+1 -1
View File
@@ -1,3 +1,3 @@
package test.inner
impl class My
actual class My
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
package test.inner
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
package test.inner
@@ -1,3 +1,3 @@
package test.inner
impl class My
actual class My
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
package test.inner
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JVM" "true"
// "Create actual class for platform JVM" "true"
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
package test.inner
@@ -1,3 +1,3 @@
package test.inner
impl class My
actual class My
@@ -1,3 +1,3 @@
// "Create header property implementation for platform JVM" "true"
// "Create actual property for platform JVM" "true"
header var <caret>x: Int
@@ -1,3 +1,3 @@
// "Create header property implementation for platform JVM" "true"
// "Create actual property for platform JVM" "true"
header var x: Int
+1 -1
View File
@@ -1,4 +1,4 @@
// x: to be implemented
impl var x: Int
actual var x: Int
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
set(value) {}
+1 -1
View File
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JS" "true"
// "Create actual class for platform JS" "true"
header sealed class <caret>Sealed {
object Obj : Sealed
@@ -1,4 +1,4 @@
// "Create header class implementation for platform JS" "true"
// "Create actual class for platform JS" "true"
header sealed class Sealed {
object Obj : Sealed
@@ -1,5 +1,5 @@
// Sealed: to be implemented
impl sealed class Sealed {
actual sealed class Sealed {
object Obj : Sealed
class Klass(x: Int) : Sealed
@@ -1,4 +1,4 @@
// "Create header function implementation for platform JVM" "true"
// "Create actual function for platform JVM" "true"
package test
@@ -1,4 +1,4 @@
// "Create header function implementation for platform JVM" "true"
// "Create actual function for platform JVM" "true"
package test
@@ -2,4 +2,4 @@
package test
impl fun testHelper() {}
actual fun testHelper() {}