Java to Kotlin converter: no more 2 conversion modes for each test, just a few tests to test non-standard settings
This commit is contained in:
@@ -1 +0,0 @@
|
||||
abstract fun getNoofGears(): Int
|
||||
@@ -1,2 +0,0 @@
|
||||
fun getT(): T {
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
fun getT(): T? {
|
||||
fun getT(): T {
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fun main() {
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package test
|
||||
|
||||
class Test() : Base() {
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
override fun equals(o: Any): Boolean {
|
||||
return super.equals(o)
|
||||
}
|
||||
|
||||
override fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
override fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
}
|
||||
|
||||
class Base() {
|
||||
public fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public fun equals(o: Any): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
public fun toString(): String {
|
||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
|
||||
protected fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
package test
|
||||
|
||||
open class Test() : Base() {
|
||||
class Test() : Base() {
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
override fun equals(o: Any?): Boolean {
|
||||
override fun equals(o: Any): Boolean {
|
||||
return super.equals(o)
|
||||
}
|
||||
|
||||
override fun clone(): Any? {
|
||||
override fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
override fun toString(): String? {
|
||||
override fun toString(): String {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
@@ -22,24 +22,24 @@ open class Test() : Base() {
|
||||
}
|
||||
}
|
||||
|
||||
open class Base() {
|
||||
public open fun hashCode(): Int {
|
||||
class Base() {
|
||||
public fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public open fun equals(o: Any?): Boolean {
|
||||
public fun equals(o: Any): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
protected open fun clone(): Any? {
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
public open fun toString(): String? {
|
||||
public fun toString(): String {
|
||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
|
||||
protected open fun finalize() {
|
||||
protected fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fun getString(): String {
|
||||
return ""
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
fun getString(): String? {
|
||||
fun getString(): String {
|
||||
return ""
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package demo
|
||||
|
||||
class Final() {
|
||||
fun test() {
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fun test() {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
class object {
|
||||
public fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
class object {
|
||||
public fun main(args: Array<String?>?) {
|
||||
public fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fun main(): String {
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
fun main(): String? {
|
||||
fun main(): String {
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fun main(): Int {
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fun main(): Boolean {
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fun isTrue(): Boolean {
|
||||
return true
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fun getString(): String {
|
||||
return ""
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
fun getString(): String? {
|
||||
fun getString(): String {
|
||||
return ""
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
class A() {
|
||||
fun a() {
|
||||
}
|
||||
}
|
||||
class B() : A() {
|
||||
override fun a() {
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
open class A() {
|
||||
open fun a() {
|
||||
class A() {
|
||||
fun a() {
|
||||
}
|
||||
}
|
||||
class B() : A() {
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
class A() {
|
||||
fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
class B() : A() {
|
||||
override fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
class C() : B() {
|
||||
override fun foo() {
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
open class A() {
|
||||
open fun foo() {
|
||||
class A() {
|
||||
fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
open class B() : A() {
|
||||
class B() : A() {
|
||||
override fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
open class C() : B() {
|
||||
class C() : B() {
|
||||
override fun foo() {
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package test
|
||||
|
||||
class Test() {
|
||||
public fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public fun equals(o: Any): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
public fun toString(): String {
|
||||
return getJavaClass<Test>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
|
||||
protected fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
package test
|
||||
|
||||
open class Test() {
|
||||
public open fun hashCode(): Int {
|
||||
class Test() {
|
||||
public fun hashCode(): Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
public open fun equals(o: Any?): Boolean {
|
||||
public fun equals(o: Any): Boolean {
|
||||
return this.identityEquals(o)
|
||||
}
|
||||
|
||||
protected open fun clone(): Any? {
|
||||
protected fun clone(): Any {
|
||||
return super.clone()
|
||||
}
|
||||
|
||||
public open fun toString(): String? {
|
||||
public fun toString(): String {
|
||||
return getJavaClass<Test>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
|
||||
protected open fun finalize() {
|
||||
protected fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fun <U> putU(u: U) {
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
fun <U> putU(u: U?) {
|
||||
fun <U> putU(u: U) {
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fun <U, V, W> putUVW(u: U, v: V, w: W) {
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
fun <U, V, W> putUVW(u: U?, v: V?, w: W?) {
|
||||
fun <U, V, W> putUVW(u: U, v: V, w: W) {
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
private fun test() {
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
protected fun test() {
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
public fun test() {
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package demo
|
||||
|
||||
class Test() {
|
||||
fun test(vararg args: Any) {
|
||||
args = array<Int>(1, 2, 3)
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package demo
|
||||
|
||||
open class Test() {
|
||||
open fun test(vararg args: Any?) {
|
||||
args = array<Int?>(1, 2, 3)
|
||||
class Test() {
|
||||
fun test(vararg args: Any) {
|
||||
args = array<Int>(1, 2, 3)
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package demo
|
||||
|
||||
class Test() {
|
||||
fun test(i: Int): Int {
|
||||
i = 10
|
||||
return i + 20
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package demo
|
||||
|
||||
open class Test() {
|
||||
open fun test(i: Int): Int {
|
||||
class Test() {
|
||||
fun test(i: Int): Int {
|
||||
i = 10
|
||||
return i + 20
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user